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