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