001    /**
002     * Copyright (c) 2000-present 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.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    
026    /**
027     * Provides the local service interface for Team. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see TeamLocalServiceUtil
034     * @see com.liferay.portal.service.base.TeamLocalServiceBaseImpl
035     * @see com.liferay.portal.service.impl.TeamLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface TeamLocalService extends BaseLocalService,
042            PersistedModelLocalService {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * 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.
047             */
048    
049            /**
050            * Adds the team to the database. Also notifies the appropriate model listeners.
051            *
052            * @param team the team
053            * @return the team that was added
054            */
055            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
056            public com.liferay.portal.model.Team addTeam(
057                    com.liferay.portal.model.Team team);
058    
059            public com.liferay.portal.model.Team addTeam(long userId, long groupId,
060                    java.lang.String name, java.lang.String description)
061                    throws com.liferay.portal.kernel.exception.PortalException;
062    
063            public void addUserGroupTeam(long userGroupId,
064                    com.liferay.portal.model.Team team);
065    
066            public void addUserGroupTeam(long userGroupId, long teamId);
067    
068            public void addUserGroupTeams(long userGroupId,
069                    java.util.List<com.liferay.portal.model.Team> Teams);
070    
071            public void addUserGroupTeams(long userGroupId, long[] teamIds);
072    
073            public void addUserTeam(long userId, com.liferay.portal.model.Team team);
074    
075            public void addUserTeam(long userId, long teamId);
076    
077            public void addUserTeams(long userId,
078                    java.util.List<com.liferay.portal.model.Team> Teams);
079    
080            public void addUserTeams(long userId, long[] teamIds);
081    
082            public void clearUserGroupTeams(long userGroupId);
083    
084            public void clearUserTeams(long userId);
085    
086            /**
087            * Creates a new team with the primary key. Does not add the team to the database.
088            *
089            * @param teamId the primary key for the new team
090            * @return the new team
091            */
092            public com.liferay.portal.model.Team createTeam(long teamId);
093    
094            /**
095            * @throws PortalException
096            */
097            @Override
098            public com.liferay.portal.model.PersistedModel deletePersistedModel(
099                    com.liferay.portal.model.PersistedModel persistedModel)
100                    throws com.liferay.portal.kernel.exception.PortalException;
101    
102            /**
103            * Deletes the team from the database. Also notifies the appropriate model listeners.
104            *
105            * @param team the team
106            * @return the team that was removed
107            * @throws PortalException
108            */
109            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
110            public com.liferay.portal.model.Team deleteTeam(
111                    com.liferay.portal.model.Team team)
112                    throws com.liferay.portal.kernel.exception.PortalException;
113    
114            /**
115            * Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.
116            *
117            * @param teamId the primary key of the team
118            * @return the team that was removed
119            * @throws PortalException if a team with the primary key could not be found
120            */
121            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
122            public com.liferay.portal.model.Team deleteTeam(long teamId)
123                    throws com.liferay.portal.kernel.exception.PortalException;
124    
125            public void deleteTeams(long groupId)
126                    throws com.liferay.portal.kernel.exception.PortalException;
127    
128            public void deleteUserGroupTeam(long userGroupId,
129                    com.liferay.portal.model.Team team);
130    
131            public void deleteUserGroupTeam(long userGroupId, long teamId);
132    
133            public void deleteUserGroupTeams(long userGroupId,
134                    java.util.List<com.liferay.portal.model.Team> Teams);
135    
136            public void deleteUserGroupTeams(long userGroupId, long[] teamIds);
137    
138            public void deleteUserTeam(long userId, com.liferay.portal.model.Team team);
139    
140            public void deleteUserTeam(long userId, long teamId);
141    
142            public void deleteUserTeams(long userId,
143                    java.util.List<com.liferay.portal.model.Team> Teams);
144    
145            public void deleteUserTeams(long userId, long[] teamIds);
146    
147            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
148    
149            /**
150            * Performs a dynamic query on the database and returns the matching rows.
151            *
152            * @param dynamicQuery the dynamic query
153            * @return the matching rows
154            */
155            public <T> java.util.List<T> dynamicQuery(
156                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
157    
158            /**
159            * Performs a dynamic query on the database and returns a range of the matching rows.
160            *
161            * <p>
162            * 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.
163            * </p>
164            *
165            * @param dynamicQuery the dynamic query
166            * @param start the lower bound of the range of model instances
167            * @param end the upper bound of the range of model instances (not inclusive)
168            * @return the range of matching rows
169            */
170            public <T> java.util.List<T> dynamicQuery(
171                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
172                    int end);
173    
174            /**
175            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
176            *
177            * <p>
178            * 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.
179            * </p>
180            *
181            * @param dynamicQuery the dynamic query
182            * @param start the lower bound of the range of model instances
183            * @param end the upper bound of the range of model instances (not inclusive)
184            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
185            * @return the ordered range of matching rows
186            */
187            public <T> java.util.List<T> dynamicQuery(
188                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
189                    int end,
190                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
191    
192            /**
193            * Returns the number of rows matching the dynamic query.
194            *
195            * @param dynamicQuery the dynamic query
196            * @return the number of rows matching the dynamic query
197            */
198            public long dynamicQueryCount(
199                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
200    
201            /**
202            * Returns the number of rows matching the dynamic query.
203            *
204            * @param dynamicQuery the dynamic query
205            * @param projection the projection to apply to the query
206            * @return the number of rows matching the dynamic query
207            */
208            public long dynamicQueryCount(
209                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
210                    com.liferay.portal.kernel.dao.orm.Projection projection);
211    
212            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213            public com.liferay.portal.model.Team fetchTeam(long teamId);
214    
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
217    
218            /**
219            * Returns the Spring bean ID for this bean.
220            *
221            * @return the Spring bean ID for this bean
222            */
223            public java.lang.String getBeanIdentifier();
224    
225            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226            public java.util.List<com.liferay.portal.model.Team> getGroupTeams(
227                    long groupId);
228    
229            @Override
230            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231            public com.liferay.portal.model.PersistedModel getPersistedModel(
232                    java.io.Serializable primaryKeyObj)
233                    throws com.liferay.portal.kernel.exception.PortalException;
234    
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public com.liferay.portal.model.Team getTeam(long groupId,
237                    java.lang.String name)
238                    throws com.liferay.portal.kernel.exception.PortalException;
239    
240            /**
241            * Returns the team with the primary key.
242            *
243            * @param teamId the primary key of the team
244            * @return the team
245            * @throws PortalException if a team with the primary key could not be found
246            */
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public com.liferay.portal.model.Team getTeam(long teamId)
249                    throws com.liferay.portal.kernel.exception.PortalException;
250    
251            /**
252            * Returns a range of all the teams.
253            *
254            * <p>
255            * 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.
256            * </p>
257            *
258            * @param start the lower bound of the range of teams
259            * @param end the upper bound of the range of teams (not inclusive)
260            * @return the range of teams
261            */
262            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263            public java.util.List<com.liferay.portal.model.Team> getTeams(int start,
264                    int end);
265    
266            /**
267            * Returns the number of teams.
268            *
269            * @return the number of teams
270            */
271            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272            public int getTeamsCount();
273    
274            /**
275            * Returns the userGroupIds of the user groups associated with the team.
276            *
277            * @param teamId the teamId of the team
278            * @return long[] the userGroupIds of user groups associated with the team
279            */
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public long[] getUserGroupPrimaryKeys(long teamId);
282    
283            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
284            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
285                    long userGroupId);
286    
287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
289                    long userGroupId, int start, int end);
290    
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
293                    long userGroupId, int start, int end,
294                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
295    
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public int getUserGroupTeamsCount(long userGroupId);
298    
299            /**
300            * Returns the userIds of the users associated with the team.
301            *
302            * @param teamId the teamId of the team
303            * @return long[] the userIds of users associated with the team
304            */
305            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306            public long[] getUserPrimaryKeys(long teamId);
307    
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
310                    long userId);
311    
312            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
314                    long userId, long groupId);
315    
316            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
317            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
318                    long userId, int start, int end);
319    
320            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
322                    long userId, int start, int end,
323                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
324    
325            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326            public int getUserTeamsCount(long userId);
327    
328            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
329            public boolean hasUserGroupTeam(long userGroupId, long teamId);
330    
331            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
332            public boolean hasUserGroupTeams(long userGroupId);
333    
334            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
335            public boolean hasUserTeam(long userId, long teamId);
336    
337            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338            public boolean hasUserTeams(long userId);
339    
340            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341            public java.util.List<com.liferay.portal.model.Team> search(long groupId,
342                    java.lang.String name, java.lang.String description,
343                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
344                    int start, int end,
345                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> obc);
346    
347            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348            public int searchCount(long groupId, java.lang.String name,
349                    java.lang.String description,
350                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
351    
352            /**
353            * Sets the Spring bean ID for this bean.
354            *
355            * @param beanIdentifier the Spring bean ID for this bean
356            */
357            public void setBeanIdentifier(java.lang.String beanIdentifier);
358    
359            public void setUserGroupTeams(long userGroupId, long[] teamIds);
360    
361            public void setUserTeams(long userId, long[] teamIds);
362    
363            /**
364            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
365            *
366            * @param team the team
367            * @return the team that was updated
368            */
369            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
370            public com.liferay.portal.model.Team updateTeam(
371                    com.liferay.portal.model.Team team);
372    
373            public com.liferay.portal.model.Team updateTeam(long teamId,
374                    java.lang.String name, java.lang.String description)
375                    throws com.liferay.portal.kernel.exception.PortalException;
376    }