001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.transaction.Isolation;
020    import com.liferay.portal.kernel.transaction.Propagation;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    
023    /**
024     * Provides the local service interface for Team. Methods of this
025     * service will not have security checks based on the propagated JAAS
026     * credentials because this service can only be accessed from within the same
027     * VM.
028     *
029     * @author Brian Wing Shun Chan
030     * @see TeamLocalServiceUtil
031     * @see com.liferay.portal.service.base.TeamLocalServiceBaseImpl
032     * @see com.liferay.portal.service.impl.TeamLocalServiceImpl
033     * @generated
034     */
035    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
036            PortalException.class, SystemException.class})
037    public interface TeamLocalService extends BaseLocalService,
038            PersistedModelLocalService {
039            /*
040             * NOTE FOR DEVELOPERS:
041             *
042             * Never modify or reference this interface directly. Always use {@link TeamLocalServiceUtil} to access the team local service. Add custom service methods to {@link com.liferay.portal.service.impl.TeamLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
043             */
044    
045            /**
046            * Adds the team to the database. Also notifies the appropriate model listeners.
047            *
048            * @param team the team
049            * @return the team that was added
050            * @throws SystemException if a system exception occurred
051            */
052            public com.liferay.portal.model.Team addTeam(
053                    com.liferay.portal.model.Team team)
054                    throws com.liferay.portal.kernel.exception.SystemException;
055    
056            /**
057            * Creates a new team with the primary key. Does not add the team to the database.
058            *
059            * @param teamId the primary key for the new team
060            * @return the new team
061            */
062            public com.liferay.portal.model.Team createTeam(long teamId);
063    
064            /**
065            * Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param teamId the primary key of the team
068            * @return the team that was removed
069            * @throws PortalException if a team with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public com.liferay.portal.model.Team deleteTeam(long teamId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            /**
077            * Deletes the team from the database. Also notifies the appropriate model listeners.
078            *
079            * @param team the team
080            * @return the team that was removed
081            * @throws PortalException
082            * @throws SystemException if a system exception occurred
083            */
084            public com.liferay.portal.model.Team deleteTeam(
085                    com.liferay.portal.model.Team team)
086                    throws com.liferay.portal.kernel.exception.PortalException,
087                            com.liferay.portal.kernel.exception.SystemException;
088    
089            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
090    
091            /**
092            * Performs a dynamic query on the database and returns the matching rows.
093            *
094            * @param dynamicQuery the dynamic query
095            * @return the matching rows
096            * @throws SystemException if a system exception occurred
097            */
098            @SuppressWarnings("rawtypes")
099            public java.util.List dynamicQuery(
100                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
101                    throws com.liferay.portal.kernel.exception.SystemException;
102    
103            /**
104            * Performs a dynamic query on the database and returns a range of the matching rows.
105            *
106            * <p>
107            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
108            * </p>
109            *
110            * @param dynamicQuery the dynamic query
111            * @param start the lower bound of the range of model instances
112            * @param end the upper bound of the range of model instances (not inclusive)
113            * @return the range of matching rows
114            * @throws SystemException if a system exception occurred
115            */
116            @SuppressWarnings("rawtypes")
117            public java.util.List dynamicQuery(
118                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
119                    int end) throws com.liferay.portal.kernel.exception.SystemException;
120    
121            /**
122            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
123            *
124            * <p>
125            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
126            * </p>
127            *
128            * @param dynamicQuery the dynamic query
129            * @param start the lower bound of the range of model instances
130            * @param end the upper bound of the range of model instances (not inclusive)
131            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
132            * @return the ordered range of matching rows
133            * @throws SystemException if a system exception occurred
134            */
135            @SuppressWarnings("rawtypes")
136            public java.util.List dynamicQuery(
137                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
138                    int end,
139                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
140                    throws com.liferay.portal.kernel.exception.SystemException;
141    
142            /**
143            * Returns the number of rows that match the dynamic query.
144            *
145            * @param dynamicQuery the dynamic query
146            * @return the number of rows that match the dynamic query
147            * @throws SystemException if a system exception occurred
148            */
149            public long dynamicQueryCount(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            /**
154            * Returns the number of rows that match the dynamic query.
155            *
156            * @param dynamicQuery the dynamic query
157            * @param projection the projection to apply to the query
158            * @return the number of rows that match the dynamic query
159            * @throws SystemException if a system exception occurred
160            */
161            public long dynamicQueryCount(
162                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
163                    com.liferay.portal.kernel.dao.orm.Projection projection)
164                    throws com.liferay.portal.kernel.exception.SystemException;
165    
166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167            public com.liferay.portal.model.Team fetchTeam(long teamId)
168                    throws com.liferay.portal.kernel.exception.SystemException;
169    
170            /**
171            * Returns the team with the primary key.
172            *
173            * @param teamId the primary key of the team
174            * @return the team
175            * @throws PortalException if a team with the primary key could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179            public com.liferay.portal.model.Team getTeam(long teamId)
180                    throws com.liferay.portal.kernel.exception.PortalException,
181                            com.liferay.portal.kernel.exception.SystemException;
182    
183            @Override
184            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185            public com.liferay.portal.model.PersistedModel getPersistedModel(
186                    java.io.Serializable primaryKeyObj)
187                    throws com.liferay.portal.kernel.exception.PortalException,
188                            com.liferay.portal.kernel.exception.SystemException;
189    
190            /**
191            * Returns a range of all the teams.
192            *
193            * <p>
194            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
195            * </p>
196            *
197            * @param start the lower bound of the range of teams
198            * @param end the upper bound of the range of teams (not inclusive)
199            * @return the range of teams
200            * @throws SystemException if a system exception occurred
201            */
202            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203            public java.util.List<com.liferay.portal.model.Team> getTeams(int start,
204                    int end) throws com.liferay.portal.kernel.exception.SystemException;
205    
206            /**
207            * Returns the number of teams.
208            *
209            * @return the number of teams
210            * @throws SystemException if a system exception occurred
211            */
212            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213            public int getTeamsCount()
214                    throws com.liferay.portal.kernel.exception.SystemException;
215    
216            /**
217            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
218            *
219            * @param team the team
220            * @return the team that was updated
221            * @throws SystemException if a system exception occurred
222            */
223            public com.liferay.portal.model.Team updateTeam(
224                    com.liferay.portal.model.Team team)
225                    throws com.liferay.portal.kernel.exception.SystemException;
226    
227            /**
228            * @throws SystemException if a system exception occurred
229            */
230            public void addUserTeam(long userId, long teamId)
231                    throws com.liferay.portal.kernel.exception.SystemException;
232    
233            /**
234            * @throws SystemException if a system exception occurred
235            */
236            public void addUserTeam(long userId, com.liferay.portal.model.Team team)
237                    throws com.liferay.portal.kernel.exception.SystemException;
238    
239            /**
240            * @throws SystemException if a system exception occurred
241            */
242            public void addUserTeams(long userId, long[] teamIds)
243                    throws com.liferay.portal.kernel.exception.SystemException;
244    
245            /**
246            * @throws SystemException if a system exception occurred
247            */
248            public void addUserTeams(long userId,
249                    java.util.List<com.liferay.portal.model.Team> Teams)
250                    throws com.liferay.portal.kernel.exception.SystemException;
251    
252            /**
253            * @throws SystemException if a system exception occurred
254            */
255            public void clearUserTeams(long userId)
256                    throws com.liferay.portal.kernel.exception.SystemException;
257    
258            /**
259            * @throws SystemException if a system exception occurred
260            */
261            public void deleteUserTeam(long userId, long teamId)
262                    throws com.liferay.portal.kernel.exception.SystemException;
263    
264            /**
265            * @throws SystemException if a system exception occurred
266            */
267            public void deleteUserTeam(long userId, com.liferay.portal.model.Team team)
268                    throws com.liferay.portal.kernel.exception.SystemException;
269    
270            /**
271            * @throws SystemException if a system exception occurred
272            */
273            public void deleteUserTeams(long userId, long[] teamIds)
274                    throws com.liferay.portal.kernel.exception.SystemException;
275    
276            /**
277            * @throws SystemException if a system exception occurred
278            */
279            public void deleteUserTeams(long userId,
280                    java.util.List<com.liferay.portal.model.Team> Teams)
281                    throws com.liferay.portal.kernel.exception.SystemException;
282    
283            /**
284            * @throws SystemException if a system exception occurred
285            */
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
288                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
289    
290            /**
291            * @throws SystemException if a system exception occurred
292            */
293            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
295                    long userId, int start, int end)
296                    throws com.liferay.portal.kernel.exception.SystemException;
297    
298            /**
299            * @throws SystemException if a system exception occurred
300            */
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
303                    long userId, int start, int end,
304                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
305                    throws com.liferay.portal.kernel.exception.SystemException;
306    
307            /**
308            * @throws SystemException if a system exception occurred
309            */
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public int getUserTeamsCount(long userId)
312                    throws com.liferay.portal.kernel.exception.SystemException;
313    
314            /**
315            * @throws SystemException if a system exception occurred
316            */
317            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318            public boolean hasUserTeam(long userId, long teamId)
319                    throws com.liferay.portal.kernel.exception.SystemException;
320    
321            /**
322            * @throws SystemException if a system exception occurred
323            */
324            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325            public boolean hasUserTeams(long userId)
326                    throws com.liferay.portal.kernel.exception.SystemException;
327    
328            /**
329            * @throws SystemException if a system exception occurred
330            */
331            public void setUserTeams(long userId, long[] teamIds)
332                    throws com.liferay.portal.kernel.exception.SystemException;
333    
334            /**
335            * @throws SystemException if a system exception occurred
336            */
337            public void addUserGroupTeam(long userGroupId, long teamId)
338                    throws com.liferay.portal.kernel.exception.SystemException;
339    
340            /**
341            * @throws SystemException if a system exception occurred
342            */
343            public void addUserGroupTeam(long userGroupId,
344                    com.liferay.portal.model.Team team)
345                    throws com.liferay.portal.kernel.exception.SystemException;
346    
347            /**
348            * @throws SystemException if a system exception occurred
349            */
350            public void addUserGroupTeams(long userGroupId, long[] teamIds)
351                    throws com.liferay.portal.kernel.exception.SystemException;
352    
353            /**
354            * @throws SystemException if a system exception occurred
355            */
356            public void addUserGroupTeams(long userGroupId,
357                    java.util.List<com.liferay.portal.model.Team> Teams)
358                    throws com.liferay.portal.kernel.exception.SystemException;
359    
360            /**
361            * @throws SystemException if a system exception occurred
362            */
363            public void clearUserGroupTeams(long userGroupId)
364                    throws com.liferay.portal.kernel.exception.SystemException;
365    
366            /**
367            * @throws SystemException if a system exception occurred
368            */
369            public void deleteUserGroupTeam(long userGroupId, long teamId)
370                    throws com.liferay.portal.kernel.exception.SystemException;
371    
372            /**
373            * @throws SystemException if a system exception occurred
374            */
375            public void deleteUserGroupTeam(long userGroupId,
376                    com.liferay.portal.model.Team team)
377                    throws com.liferay.portal.kernel.exception.SystemException;
378    
379            /**
380            * @throws SystemException if a system exception occurred
381            */
382            public void deleteUserGroupTeams(long userGroupId, long[] teamIds)
383                    throws com.liferay.portal.kernel.exception.SystemException;
384    
385            /**
386            * @throws SystemException if a system exception occurred
387            */
388            public void deleteUserGroupTeams(long userGroupId,
389                    java.util.List<com.liferay.portal.model.Team> Teams)
390                    throws com.liferay.portal.kernel.exception.SystemException;
391    
392            /**
393            * @throws SystemException if a system exception occurred
394            */
395            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
396            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
397                    long userGroupId)
398                    throws com.liferay.portal.kernel.exception.SystemException;
399    
400            /**
401            * @throws SystemException if a system exception occurred
402            */
403            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
404            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
405                    long userGroupId, int start, int end)
406                    throws com.liferay.portal.kernel.exception.SystemException;
407    
408            /**
409            * @throws SystemException if a system exception occurred
410            */
411            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
412            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
413                    long userGroupId, int start, int end,
414                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415                    throws com.liferay.portal.kernel.exception.SystemException;
416    
417            /**
418            * @throws SystemException if a system exception occurred
419            */
420            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
421            public int getUserGroupTeamsCount(long userGroupId)
422                    throws com.liferay.portal.kernel.exception.SystemException;
423    
424            /**
425            * @throws SystemException if a system exception occurred
426            */
427            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
428            public boolean hasUserGroupTeam(long userGroupId, long teamId)
429                    throws com.liferay.portal.kernel.exception.SystemException;
430    
431            /**
432            * @throws SystemException if a system exception occurred
433            */
434            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
435            public boolean hasUserGroupTeams(long userGroupId)
436                    throws com.liferay.portal.kernel.exception.SystemException;
437    
438            /**
439            * @throws SystemException if a system exception occurred
440            */
441            public void setUserGroupTeams(long userGroupId, long[] teamIds)
442                    throws com.liferay.portal.kernel.exception.SystemException;
443    
444            /**
445            * Returns the Spring bean ID for this bean.
446            *
447            * @return the Spring bean ID for this bean
448            */
449            public java.lang.String getBeanIdentifier();
450    
451            /**
452            * Sets the Spring bean ID for this bean.
453            *
454            * @param beanIdentifier the Spring bean ID for this bean
455            */
456            public void setBeanIdentifier(java.lang.String beanIdentifier);
457    
458            public com.liferay.portal.model.Team addTeam(long userId, long groupId,
459                    java.lang.String name, java.lang.String description)
460                    throws com.liferay.portal.kernel.exception.PortalException,
461                            com.liferay.portal.kernel.exception.SystemException;
462    
463            public void deleteTeams(long groupId)
464                    throws com.liferay.portal.kernel.exception.PortalException,
465                            com.liferay.portal.kernel.exception.SystemException;
466    
467            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
468            public java.util.List<com.liferay.portal.model.Team> getGroupTeams(
469                    long groupId)
470                    throws com.liferay.portal.kernel.exception.SystemException;
471    
472            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
473            public com.liferay.portal.model.Team getTeam(long groupId,
474                    java.lang.String name)
475                    throws com.liferay.portal.kernel.exception.PortalException,
476                            com.liferay.portal.kernel.exception.SystemException;
477    
478            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
479            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
480                    long userId, long groupId)
481                    throws com.liferay.portal.kernel.exception.SystemException;
482    
483            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
484            public java.util.List<com.liferay.portal.model.Team> search(long groupId,
485                    java.lang.String name, java.lang.String description,
486                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
487                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
488                    throws com.liferay.portal.kernel.exception.SystemException;
489    
490            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
491            public int searchCount(long groupId, java.lang.String name,
492                    java.lang.String description,
493                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
494                    throws com.liferay.portal.kernel.exception.SystemException;
495    
496            public com.liferay.portal.model.Team updateTeam(long teamId,
497                    java.lang.String name, java.lang.String description)
498                    throws com.liferay.portal.kernel.exception.PortalException,
499                            com.liferay.portal.kernel.exception.SystemException;
500    }