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 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 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) throws PortalException;
112    
113            /**
114            * Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.
115            *
116            * @param teamId the primary key of the team
117            * @return the team that was removed
118            * @throws PortalException if a team with the primary key could not be found
119            */
120            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
121            public com.liferay.portal.model.Team deleteTeam(long teamId)
122                    throws PortalException;
123    
124            public void deleteTeams(long groupId) throws PortalException;
125    
126            public void deleteUserGroupTeam(long userGroupId,
127                    com.liferay.portal.model.Team team);
128    
129            public void deleteUserGroupTeam(long userGroupId, long teamId);
130    
131            public void deleteUserGroupTeams(long userGroupId,
132                    java.util.List<com.liferay.portal.model.Team> Teams);
133    
134            public void deleteUserGroupTeams(long userGroupId, long[] teamIds);
135    
136            public void deleteUserTeam(long userId, com.liferay.portal.model.Team team);
137    
138            public void deleteUserTeam(long userId, long teamId);
139    
140            public void deleteUserTeams(long userId,
141                    java.util.List<com.liferay.portal.model.Team> Teams);
142    
143            public void deleteUserTeams(long userId, long[] teamIds);
144    
145            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
146    
147            /**
148            * Performs a dynamic query on the database and returns the matching rows.
149            *
150            * @param dynamicQuery the dynamic query
151            * @return the matching rows
152            */
153            public <T> java.util.List<T> dynamicQuery(
154                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
155    
156            /**
157            * Performs a dynamic query on the database and returns a range of the matching rows.
158            *
159            * <p>
160            * 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.
161            * </p>
162            *
163            * @param dynamicQuery the dynamic query
164            * @param start the lower bound of the range of model instances
165            * @param end the upper bound of the range of model instances (not inclusive)
166            * @return the range of matching rows
167            */
168            public <T> java.util.List<T> dynamicQuery(
169                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
170                    int end);
171    
172            /**
173            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
174            *
175            * <p>
176            * 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.
177            * </p>
178            *
179            * @param dynamicQuery the dynamic query
180            * @param start the lower bound of the range of model instances
181            * @param end the upper bound of the range of model instances (not inclusive)
182            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
183            * @return the ordered range of matching rows
184            */
185            public <T> java.util.List<T> dynamicQuery(
186                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
187                    int end,
188                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
189    
190            /**
191            * Returns the number of rows matching the dynamic query.
192            *
193            * @param dynamicQuery the dynamic query
194            * @return the number of rows matching the dynamic query
195            */
196            public long dynamicQueryCount(
197                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
198    
199            /**
200            * Returns the number of rows matching the dynamic query.
201            *
202            * @param dynamicQuery the dynamic query
203            * @param projection the projection to apply to the query
204            * @return the number of rows matching the dynamic query
205            */
206            public long dynamicQueryCount(
207                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
208                    com.liferay.portal.kernel.dao.orm.Projection projection);
209    
210            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211            public com.liferay.portal.model.Team fetchTeam(long teamId);
212    
213            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
215    
216            /**
217            * Returns the Spring bean ID for this bean.
218            *
219            * @return the Spring bean ID for this bean
220            */
221            public java.lang.String getBeanIdentifier();
222    
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public java.util.List<com.liferay.portal.model.Team> getGroupTeams(
225                    long groupId);
226    
227            @Override
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public com.liferay.portal.model.PersistedModel getPersistedModel(
230                    java.io.Serializable primaryKeyObj) throws PortalException;
231    
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public com.liferay.portal.model.Team getTeam(long groupId,
234                    java.lang.String name) throws PortalException;
235    
236            /**
237            * Returns the team with the primary key.
238            *
239            * @param teamId the primary key of the team
240            * @return the team
241            * @throws PortalException if a team with the primary key could not be found
242            */
243            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244            public com.liferay.portal.model.Team getTeam(long teamId)
245                    throws PortalException;
246    
247            /**
248            * Returns a range of all the teams.
249            *
250            * <p>
251            * 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.
252            * </p>
253            *
254            * @param start the lower bound of the range of teams
255            * @param end the upper bound of the range of teams (not inclusive)
256            * @return the range of teams
257            */
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public java.util.List<com.liferay.portal.model.Team> getTeams(int start,
260                    int end);
261    
262            /**
263            * Returns the number of teams.
264            *
265            * @return the number of teams
266            */
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public int getTeamsCount();
269    
270            /**
271            * Returns the userGroupIds of the user groups associated with the team.
272            *
273            * @param teamId the teamId of the team
274            * @return long[] the userGroupIds of user groups associated with the team
275            */
276            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277            public long[] getUserGroupPrimaryKeys(long teamId);
278    
279            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
281                    long userGroupId);
282    
283            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
284            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
285                    long userGroupId, int start, int end);
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                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
291    
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public int getUserGroupTeamsCount(long userGroupId);
294    
295            /**
296            * Returns the userIds of the users associated with the team.
297            *
298            * @param teamId the teamId of the team
299            * @return long[] the userIds of users associated with the team
300            */
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public long[] getUserPrimaryKeys(long teamId);
303    
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
306                    long userId);
307    
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
310                    long userId, long groupId);
311    
312            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
314                    long userId, int start, int end);
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                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
320    
321            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322            public int getUserTeamsCount(long userId);
323    
324            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325            public boolean hasUserGroupTeam(long userGroupId, long teamId);
326    
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public boolean hasUserGroupTeams(long userGroupId);
329    
330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
331            public boolean hasUserTeam(long userId, long teamId);
332    
333            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334            public boolean hasUserTeams(long userId);
335    
336            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
337            public java.util.List<com.liferay.portal.model.Team> search(long groupId,
338                    java.lang.String name, java.lang.String description,
339                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
340                    int start, int end,
341                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> obc);
342    
343            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344            public int searchCount(long groupId, java.lang.String name,
345                    java.lang.String description,
346                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
347    
348            /**
349            * Sets the Spring bean ID for this bean.
350            *
351            * @param beanIdentifier the Spring bean ID for this bean
352            */
353            public void setBeanIdentifier(java.lang.String beanIdentifier);
354    
355            public void setUserGroupTeams(long userGroupId, long[] teamIds);
356    
357            public void setUserTeams(long userId, long[] teamIds);
358    
359            /**
360            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
361            *
362            * @param team the team
363            * @return the team that was updated
364            */
365            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
366            public com.liferay.portal.model.Team updateTeam(
367                    com.liferay.portal.model.Team team);
368    
369            public com.liferay.portal.model.Team updateTeam(long teamId,
370                    java.lang.String name, java.lang.String description)
371                    throws PortalException;
372    }