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