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.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.Team;
020    
021    /**
022     * The persistence interface for the team service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see TeamPersistenceImpl
030     * @see TeamUtil
031     * @generated
032     */
033    @ProviderType
034    public interface TeamPersistence extends BasePersistence<Team> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link TeamUtil} to access the team persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns all the teams where groupId = &#63;.
043            *
044            * @param groupId the group ID
045            * @return the matching teams
046            * @throws SystemException if a system exception occurred
047            */
048            public java.util.List<com.liferay.portal.model.Team> findByGroupId(
049                    long groupId)
050                    throws com.liferay.portal.kernel.exception.SystemException;
051    
052            /**
053            * Returns a range of all the teams where groupId = &#63;.
054            *
055            * <p>
056            * 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.
057            * </p>
058            *
059            * @param groupId the group ID
060            * @param start the lower bound of the range of teams
061            * @param end the upper bound of the range of teams (not inclusive)
062            * @return the range of matching teams
063            * @throws SystemException if a system exception occurred
064            */
065            public java.util.List<com.liferay.portal.model.Team> findByGroupId(
066                    long groupId, int start, int end)
067                    throws com.liferay.portal.kernel.exception.SystemException;
068    
069            /**
070            * Returns an ordered range of all the teams where groupId = &#63;.
071            *
072            * <p>
073            * 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.
074            * </p>
075            *
076            * @param groupId the group ID
077            * @param start the lower bound of the range of teams
078            * @param end the upper bound of the range of teams (not inclusive)
079            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
080            * @return the ordered range of matching teams
081            * @throws SystemException if a system exception occurred
082            */
083            public java.util.List<com.liferay.portal.model.Team> findByGroupId(
084                    long groupId, int start, int end,
085                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
086                    throws com.liferay.portal.kernel.exception.SystemException;
087    
088            /**
089            * Returns the first team in the ordered set where groupId = &#63;.
090            *
091            * @param groupId the group ID
092            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
093            * @return the first matching team
094            * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found
095            * @throws SystemException if a system exception occurred
096            */
097            public com.liferay.portal.model.Team findByGroupId_First(long groupId,
098                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
099                    throws com.liferay.portal.NoSuchTeamException,
100                            com.liferay.portal.kernel.exception.SystemException;
101    
102            /**
103            * Returns the first team in the ordered set where groupId = &#63;.
104            *
105            * @param groupId the group ID
106            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
107            * @return the first matching team, or <code>null</code> if a matching team could not be found
108            * @throws SystemException if a system exception occurred
109            */
110            public com.liferay.portal.model.Team fetchByGroupId_First(long groupId,
111                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
112                    throws com.liferay.portal.kernel.exception.SystemException;
113    
114            /**
115            * Returns the last team in the ordered set where groupId = &#63;.
116            *
117            * @param groupId the group ID
118            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
119            * @return the last matching team
120            * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found
121            * @throws SystemException if a system exception occurred
122            */
123            public com.liferay.portal.model.Team findByGroupId_Last(long groupId,
124                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
125                    throws com.liferay.portal.NoSuchTeamException,
126                            com.liferay.portal.kernel.exception.SystemException;
127    
128            /**
129            * Returns the last team in the ordered set where groupId = &#63;.
130            *
131            * @param groupId the group ID
132            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
133            * @return the last matching team, or <code>null</code> if a matching team could not be found
134            * @throws SystemException if a system exception occurred
135            */
136            public com.liferay.portal.model.Team fetchByGroupId_Last(long groupId,
137                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
138                    throws com.liferay.portal.kernel.exception.SystemException;
139    
140            /**
141            * Returns the teams before and after the current team in the ordered set where groupId = &#63;.
142            *
143            * @param teamId the primary key of the current team
144            * @param groupId the group ID
145            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
146            * @return the previous, current, and next team
147            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
148            * @throws SystemException if a system exception occurred
149            */
150            public com.liferay.portal.model.Team[] findByGroupId_PrevAndNext(
151                    long teamId, long groupId,
152                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
153                    throws com.liferay.portal.NoSuchTeamException,
154                            com.liferay.portal.kernel.exception.SystemException;
155    
156            /**
157            * Returns all the teams that the user has permission to view where groupId = &#63;.
158            *
159            * @param groupId the group ID
160            * @return the matching teams that the user has permission to view
161            * @throws SystemException if a system exception occurred
162            */
163            public java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
164                    long groupId)
165                    throws com.liferay.portal.kernel.exception.SystemException;
166    
167            /**
168            * Returns a range of all the teams that the user has permission to view where groupId = &#63;.
169            *
170            * <p>
171            * 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.
172            * </p>
173            *
174            * @param groupId the group ID
175            * @param start the lower bound of the range of teams
176            * @param end the upper bound of the range of teams (not inclusive)
177            * @return the range of matching teams that the user has permission to view
178            * @throws SystemException if a system exception occurred
179            */
180            public java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
181                    long groupId, int start, int end)
182                    throws com.liferay.portal.kernel.exception.SystemException;
183    
184            /**
185            * Returns an ordered range of all the teams that the user has permissions to view where groupId = &#63;.
186            *
187            * <p>
188            * 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.
189            * </p>
190            *
191            * @param groupId the group ID
192            * @param start the lower bound of the range of teams
193            * @param end the upper bound of the range of teams (not inclusive)
194            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
195            * @return the ordered range of matching teams that the user has permission to view
196            * @throws SystemException if a system exception occurred
197            */
198            public java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
199                    long groupId, int start, int end,
200                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
201                    throws com.liferay.portal.kernel.exception.SystemException;
202    
203            /**
204            * Returns the teams before and after the current team in the ordered set of teams that the user has permission to view where groupId = &#63;.
205            *
206            * @param teamId the primary key of the current team
207            * @param groupId the group ID
208            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
209            * @return the previous, current, and next team
210            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
211            * @throws SystemException if a system exception occurred
212            */
213            public com.liferay.portal.model.Team[] filterFindByGroupId_PrevAndNext(
214                    long teamId, long groupId,
215                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
216                    throws com.liferay.portal.NoSuchTeamException,
217                            com.liferay.portal.kernel.exception.SystemException;
218    
219            /**
220            * Removes all the teams where groupId = &#63; from the database.
221            *
222            * @param groupId the group ID
223            * @throws SystemException if a system exception occurred
224            */
225            public void removeByGroupId(long groupId)
226                    throws com.liferay.portal.kernel.exception.SystemException;
227    
228            /**
229            * Returns the number of teams where groupId = &#63;.
230            *
231            * @param groupId the group ID
232            * @return the number of matching teams
233            * @throws SystemException if a system exception occurred
234            */
235            public int countByGroupId(long groupId)
236                    throws com.liferay.portal.kernel.exception.SystemException;
237    
238            /**
239            * Returns the number of teams that the user has permission to view where groupId = &#63;.
240            *
241            * @param groupId the group ID
242            * @return the number of matching teams that the user has permission to view
243            * @throws SystemException if a system exception occurred
244            */
245            public int filterCountByGroupId(long groupId)
246                    throws com.liferay.portal.kernel.exception.SystemException;
247    
248            /**
249            * Returns the team where groupId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchTeamException} if it could not be found.
250            *
251            * @param groupId the group ID
252            * @param name the name
253            * @return the matching team
254            * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found
255            * @throws SystemException if a system exception occurred
256            */
257            public com.liferay.portal.model.Team findByG_N(long groupId,
258                    java.lang.String name)
259                    throws com.liferay.portal.NoSuchTeamException,
260                            com.liferay.portal.kernel.exception.SystemException;
261    
262            /**
263            * Returns the team where groupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
264            *
265            * @param groupId the group ID
266            * @param name the name
267            * @return the matching team, or <code>null</code> if a matching team could not be found
268            * @throws SystemException if a system exception occurred
269            */
270            public com.liferay.portal.model.Team fetchByG_N(long groupId,
271                    java.lang.String name)
272                    throws com.liferay.portal.kernel.exception.SystemException;
273    
274            /**
275            * Returns the team where groupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
276            *
277            * @param groupId the group ID
278            * @param name the name
279            * @param retrieveFromCache whether to use the finder cache
280            * @return the matching team, or <code>null</code> if a matching team could not be found
281            * @throws SystemException if a system exception occurred
282            */
283            public com.liferay.portal.model.Team fetchByG_N(long groupId,
284                    java.lang.String name, boolean retrieveFromCache)
285                    throws com.liferay.portal.kernel.exception.SystemException;
286    
287            /**
288            * Removes the team where groupId = &#63; and name = &#63; from the database.
289            *
290            * @param groupId the group ID
291            * @param name the name
292            * @return the team that was removed
293            * @throws SystemException if a system exception occurred
294            */
295            public com.liferay.portal.model.Team removeByG_N(long groupId,
296                    java.lang.String name)
297                    throws com.liferay.portal.NoSuchTeamException,
298                            com.liferay.portal.kernel.exception.SystemException;
299    
300            /**
301            * Returns the number of teams where groupId = &#63; and name = &#63;.
302            *
303            * @param groupId the group ID
304            * @param name the name
305            * @return the number of matching teams
306            * @throws SystemException if a system exception occurred
307            */
308            public int countByG_N(long groupId, java.lang.String name)
309                    throws com.liferay.portal.kernel.exception.SystemException;
310    
311            /**
312            * Caches the team in the entity cache if it is enabled.
313            *
314            * @param team the team
315            */
316            public void cacheResult(com.liferay.portal.model.Team team);
317    
318            /**
319            * Caches the teams in the entity cache if it is enabled.
320            *
321            * @param teams the teams
322            */
323            public void cacheResult(java.util.List<com.liferay.portal.model.Team> teams);
324    
325            /**
326            * Creates a new team with the primary key. Does not add the team to the database.
327            *
328            * @param teamId the primary key for the new team
329            * @return the new team
330            */
331            public com.liferay.portal.model.Team create(long teamId);
332    
333            /**
334            * Removes the team with the primary key from the database. Also notifies the appropriate model listeners.
335            *
336            * @param teamId the primary key of the team
337            * @return the team that was removed
338            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
339            * @throws SystemException if a system exception occurred
340            */
341            public com.liferay.portal.model.Team remove(long teamId)
342                    throws com.liferay.portal.NoSuchTeamException,
343                            com.liferay.portal.kernel.exception.SystemException;
344    
345            public com.liferay.portal.model.Team updateImpl(
346                    com.liferay.portal.model.Team team)
347                    throws com.liferay.portal.kernel.exception.SystemException;
348    
349            /**
350            * Returns the team with the primary key or throws a {@link com.liferay.portal.NoSuchTeamException} if it could not be found.
351            *
352            * @param teamId the primary key of the team
353            * @return the team
354            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
355            * @throws SystemException if a system exception occurred
356            */
357            public com.liferay.portal.model.Team findByPrimaryKey(long teamId)
358                    throws com.liferay.portal.NoSuchTeamException,
359                            com.liferay.portal.kernel.exception.SystemException;
360    
361            /**
362            * Returns the team with the primary key or returns <code>null</code> if it could not be found.
363            *
364            * @param teamId the primary key of the team
365            * @return the team, or <code>null</code> if a team with the primary key could not be found
366            * @throws SystemException if a system exception occurred
367            */
368            public com.liferay.portal.model.Team fetchByPrimaryKey(long teamId)
369                    throws com.liferay.portal.kernel.exception.SystemException;
370    
371            /**
372            * Returns all the teams.
373            *
374            * @return the teams
375            * @throws SystemException if a system exception occurred
376            */
377            public java.util.List<com.liferay.portal.model.Team> findAll()
378                    throws com.liferay.portal.kernel.exception.SystemException;
379    
380            /**
381            * Returns a range of all the teams.
382            *
383            * <p>
384            * 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.
385            * </p>
386            *
387            * @param start the lower bound of the range of teams
388            * @param end the upper bound of the range of teams (not inclusive)
389            * @return the range of teams
390            * @throws SystemException if a system exception occurred
391            */
392            public java.util.List<com.liferay.portal.model.Team> findAll(int start,
393                    int end) throws com.liferay.portal.kernel.exception.SystemException;
394    
395            /**
396            * Returns an ordered range of all the teams.
397            *
398            * <p>
399            * 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.
400            * </p>
401            *
402            * @param start the lower bound of the range of teams
403            * @param end the upper bound of the range of teams (not inclusive)
404            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
405            * @return the ordered range of teams
406            * @throws SystemException if a system exception occurred
407            */
408            public java.util.List<com.liferay.portal.model.Team> findAll(int start,
409                    int end,
410                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
411                    throws com.liferay.portal.kernel.exception.SystemException;
412    
413            /**
414            * Removes all the teams from the database.
415            *
416            * @throws SystemException if a system exception occurred
417            */
418            public void removeAll()
419                    throws com.liferay.portal.kernel.exception.SystemException;
420    
421            /**
422            * Returns the number of teams.
423            *
424            * @return the number of teams
425            * @throws SystemException if a system exception occurred
426            */
427            public int countAll()
428                    throws com.liferay.portal.kernel.exception.SystemException;
429    
430            /**
431            * Returns all the users associated with the team.
432            *
433            * @param pk the primary key of the team
434            * @return the users associated with the team
435            * @throws SystemException if a system exception occurred
436            */
437            public java.util.List<com.liferay.portal.model.User> getUsers(long pk)
438                    throws com.liferay.portal.kernel.exception.SystemException;
439    
440            /**
441            * Returns a range of all the users associated with the team.
442            *
443            * <p>
444            * 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.
445            * </p>
446            *
447            * @param pk the primary key of the team
448            * @param start the lower bound of the range of teams
449            * @param end the upper bound of the range of teams (not inclusive)
450            * @return the range of users associated with the team
451            * @throws SystemException if a system exception occurred
452            */
453            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
454                    int start, int end)
455                    throws com.liferay.portal.kernel.exception.SystemException;
456    
457            /**
458            * Returns an ordered range of all the users associated with the team.
459            *
460            * <p>
461            * 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.
462            * </p>
463            *
464            * @param pk the primary key of the team
465            * @param start the lower bound of the range of teams
466            * @param end the upper bound of the range of teams (not inclusive)
467            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
468            * @return the ordered range of users associated with the team
469            * @throws SystemException if a system exception occurred
470            */
471            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
472                    int start, int end,
473                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
474                    throws com.liferay.portal.kernel.exception.SystemException;
475    
476            /**
477            * Returns the number of users associated with the team.
478            *
479            * @param pk the primary key of the team
480            * @return the number of users associated with the team
481            * @throws SystemException if a system exception occurred
482            */
483            public int getUsersSize(long pk)
484                    throws com.liferay.portal.kernel.exception.SystemException;
485    
486            /**
487            * Returns <code>true</code> if the user is associated with the team.
488            *
489            * @param pk the primary key of the team
490            * @param userPK the primary key of the user
491            * @return <code>true</code> if the user is associated with the team; <code>false</code> otherwise
492            * @throws SystemException if a system exception occurred
493            */
494            public boolean containsUser(long pk, long userPK)
495                    throws com.liferay.portal.kernel.exception.SystemException;
496    
497            /**
498            * Returns <code>true</code> if the team has any users associated with it.
499            *
500            * @param pk the primary key of the team to check for associations with users
501            * @return <code>true</code> if the team has any users associated with it; <code>false</code> otherwise
502            * @throws SystemException if a system exception occurred
503            */
504            public boolean containsUsers(long pk)
505                    throws com.liferay.portal.kernel.exception.SystemException;
506    
507            /**
508            * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
509            *
510            * @param pk the primary key of the team
511            * @param userPK the primary key of the user
512            * @throws SystemException if a system exception occurred
513            */
514            public void addUser(long pk, long userPK)
515                    throws com.liferay.portal.kernel.exception.SystemException;
516    
517            /**
518            * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
519            *
520            * @param pk the primary key of the team
521            * @param user the user
522            * @throws SystemException if a system exception occurred
523            */
524            public void addUser(long pk, com.liferay.portal.model.User user)
525                    throws com.liferay.portal.kernel.exception.SystemException;
526    
527            /**
528            * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
529            *
530            * @param pk the primary key of the team
531            * @param userPKs the primary keys of the users
532            * @throws SystemException if a system exception occurred
533            */
534            public void addUsers(long pk, long[] userPKs)
535                    throws com.liferay.portal.kernel.exception.SystemException;
536    
537            /**
538            * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
539            *
540            * @param pk the primary key of the team
541            * @param users the users
542            * @throws SystemException if a system exception occurred
543            */
544            public void addUsers(long pk,
545                    java.util.List<com.liferay.portal.model.User> users)
546                    throws com.liferay.portal.kernel.exception.SystemException;
547    
548            /**
549            * Clears all associations between the team and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
550            *
551            * @param pk the primary key of the team to clear the associated users from
552            * @throws SystemException if a system exception occurred
553            */
554            public void clearUsers(long pk)
555                    throws com.liferay.portal.kernel.exception.SystemException;
556    
557            /**
558            * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
559            *
560            * @param pk the primary key of the team
561            * @param userPK the primary key of the user
562            * @throws SystemException if a system exception occurred
563            */
564            public void removeUser(long pk, long userPK)
565                    throws com.liferay.portal.kernel.exception.SystemException;
566    
567            /**
568            * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
569            *
570            * @param pk the primary key of the team
571            * @param user the user
572            * @throws SystemException if a system exception occurred
573            */
574            public void removeUser(long pk, com.liferay.portal.model.User user)
575                    throws com.liferay.portal.kernel.exception.SystemException;
576    
577            /**
578            * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
579            *
580            * @param pk the primary key of the team
581            * @param userPKs the primary keys of the users
582            * @throws SystemException if a system exception occurred
583            */
584            public void removeUsers(long pk, long[] userPKs)
585                    throws com.liferay.portal.kernel.exception.SystemException;
586    
587            /**
588            * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
589            *
590            * @param pk the primary key of the team
591            * @param users the users
592            * @throws SystemException if a system exception occurred
593            */
594            public void removeUsers(long pk,
595                    java.util.List<com.liferay.portal.model.User> users)
596                    throws com.liferay.portal.kernel.exception.SystemException;
597    
598            /**
599            * Sets the users associated with the team, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
600            *
601            * @param pk the primary key of the team
602            * @param userPKs the primary keys of the users to be associated with the team
603            * @throws SystemException if a system exception occurred
604            */
605            public void setUsers(long pk, long[] userPKs)
606                    throws com.liferay.portal.kernel.exception.SystemException;
607    
608            /**
609            * Sets the users associated with the team, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
610            *
611            * @param pk the primary key of the team
612            * @param users the users to be associated with the team
613            * @throws SystemException if a system exception occurred
614            */
615            public void setUsers(long pk,
616                    java.util.List<com.liferay.portal.model.User> users)
617                    throws com.liferay.portal.kernel.exception.SystemException;
618    
619            /**
620            * Returns all the user groups associated with the team.
621            *
622            * @param pk the primary key of the team
623            * @return the user groups associated with the team
624            * @throws SystemException if a system exception occurred
625            */
626            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
627                    long pk) throws com.liferay.portal.kernel.exception.SystemException;
628    
629            /**
630            * Returns a range of all the user groups associated with the team.
631            *
632            * <p>
633            * 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.
634            * </p>
635            *
636            * @param pk the primary key of the team
637            * @param start the lower bound of the range of teams
638            * @param end the upper bound of the range of teams (not inclusive)
639            * @return the range of user groups associated with the team
640            * @throws SystemException if a system exception occurred
641            */
642            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
643                    long pk, int start, int end)
644                    throws com.liferay.portal.kernel.exception.SystemException;
645    
646            /**
647            * Returns an ordered range of all the user groups associated with the team.
648            *
649            * <p>
650            * 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.
651            * </p>
652            *
653            * @param pk the primary key of the team
654            * @param start the lower bound of the range of teams
655            * @param end the upper bound of the range of teams (not inclusive)
656            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
657            * @return the ordered range of user groups associated with the team
658            * @throws SystemException if a system exception occurred
659            */
660            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
661                    long pk, int start, int end,
662                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
663                    throws com.liferay.portal.kernel.exception.SystemException;
664    
665            /**
666            * Returns the number of user groups associated with the team.
667            *
668            * @param pk the primary key of the team
669            * @return the number of user groups associated with the team
670            * @throws SystemException if a system exception occurred
671            */
672            public int getUserGroupsSize(long pk)
673                    throws com.liferay.portal.kernel.exception.SystemException;
674    
675            /**
676            * Returns <code>true</code> if the user group is associated with the team.
677            *
678            * @param pk the primary key of the team
679            * @param userGroupPK the primary key of the user group
680            * @return <code>true</code> if the user group is associated with the team; <code>false</code> otherwise
681            * @throws SystemException if a system exception occurred
682            */
683            public boolean containsUserGroup(long pk, long userGroupPK)
684                    throws com.liferay.portal.kernel.exception.SystemException;
685    
686            /**
687            * Returns <code>true</code> if the team has any user groups associated with it.
688            *
689            * @param pk the primary key of the team to check for associations with user groups
690            * @return <code>true</code> if the team has any user groups associated with it; <code>false</code> otherwise
691            * @throws SystemException if a system exception occurred
692            */
693            public boolean containsUserGroups(long pk)
694                    throws com.liferay.portal.kernel.exception.SystemException;
695    
696            /**
697            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
698            *
699            * @param pk the primary key of the team
700            * @param userGroupPK the primary key of the user group
701            * @throws SystemException if a system exception occurred
702            */
703            public void addUserGroup(long pk, long userGroupPK)
704                    throws com.liferay.portal.kernel.exception.SystemException;
705    
706            /**
707            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
708            *
709            * @param pk the primary key of the team
710            * @param userGroup the user group
711            * @throws SystemException if a system exception occurred
712            */
713            public void addUserGroup(long pk,
714                    com.liferay.portal.model.UserGroup userGroup)
715                    throws com.liferay.portal.kernel.exception.SystemException;
716    
717            /**
718            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
719            *
720            * @param pk the primary key of the team
721            * @param userGroupPKs the primary keys of the user groups
722            * @throws SystemException if a system exception occurred
723            */
724            public void addUserGroups(long pk, long[] userGroupPKs)
725                    throws com.liferay.portal.kernel.exception.SystemException;
726    
727            /**
728            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
729            *
730            * @param pk the primary key of the team
731            * @param userGroups the user groups
732            * @throws SystemException if a system exception occurred
733            */
734            public void addUserGroups(long pk,
735                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
736                    throws com.liferay.portal.kernel.exception.SystemException;
737    
738            /**
739            * Clears all associations between the team and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
740            *
741            * @param pk the primary key of the team to clear the associated user groups from
742            * @throws SystemException if a system exception occurred
743            */
744            public void clearUserGroups(long pk)
745                    throws com.liferay.portal.kernel.exception.SystemException;
746    
747            /**
748            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
749            *
750            * @param pk the primary key of the team
751            * @param userGroupPK the primary key of the user group
752            * @throws SystemException if a system exception occurred
753            */
754            public void removeUserGroup(long pk, long userGroupPK)
755                    throws com.liferay.portal.kernel.exception.SystemException;
756    
757            /**
758            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
759            *
760            * @param pk the primary key of the team
761            * @param userGroup the user group
762            * @throws SystemException if a system exception occurred
763            */
764            public void removeUserGroup(long pk,
765                    com.liferay.portal.model.UserGroup userGroup)
766                    throws com.liferay.portal.kernel.exception.SystemException;
767    
768            /**
769            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
770            *
771            * @param pk the primary key of the team
772            * @param userGroupPKs the primary keys of the user groups
773            * @throws SystemException if a system exception occurred
774            */
775            public void removeUserGroups(long pk, long[] userGroupPKs)
776                    throws com.liferay.portal.kernel.exception.SystemException;
777    
778            /**
779            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
780            *
781            * @param pk the primary key of the team
782            * @param userGroups the user groups
783            * @throws SystemException if a system exception occurred
784            */
785            public void removeUserGroups(long pk,
786                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
787                    throws com.liferay.portal.kernel.exception.SystemException;
788    
789            /**
790            * Sets the user groups associated with the team, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
791            *
792            * @param pk the primary key of the team
793            * @param userGroupPKs the primary keys of the user groups to be associated with the team
794            * @throws SystemException if a system exception occurred
795            */
796            public void setUserGroups(long pk, long[] userGroupPKs)
797                    throws com.liferay.portal.kernel.exception.SystemException;
798    
799            /**
800            * Sets the user groups associated with the team, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
801            *
802            * @param pk the primary key of the team
803            * @param userGroups the user groups to be associated with the team
804            * @throws SystemException if a system exception occurred
805            */
806            public void setUserGroups(long pk,
807                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
808                    throws com.liferay.portal.kernel.exception.SystemException;
809    }