001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.Team;
020    
021    /**
022     * The persistence interface for the team service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see TeamPersistenceImpl
030     * @see TeamUtil
031     * @generated
032     */
033    @ProviderType
034    public interface TeamPersistence extends BasePersistence<Team> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link TeamUtil} to access the team persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns all the teams where groupId = &#63;.
043            *
044            * @param groupId the group ID
045            * @return the matching teams
046            */
047            public java.util.List<com.liferay.portal.model.Team> findByGroupId(
048                    long groupId);
049    
050            /**
051            * Returns a range of all the teams where groupId = &#63;.
052            *
053            * <p>
054            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
055            * </p>
056            *
057            * @param groupId the group ID
058            * @param start the lower bound of the range of teams
059            * @param end the upper bound of the range of teams (not inclusive)
060            * @return the range of matching teams
061            */
062            public java.util.List<com.liferay.portal.model.Team> findByGroupId(
063                    long groupId, int start, int end);
064    
065            /**
066            * Returns an ordered range of all the teams where groupId = &#63;.
067            *
068            * <p>
069            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
070            * </p>
071            *
072            * @param groupId the group ID
073            * @param start the lower bound of the range of teams
074            * @param end the upper bound of the range of teams (not inclusive)
075            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
076            * @return the ordered range of matching teams
077            */
078            public java.util.List<com.liferay.portal.model.Team> findByGroupId(
079                    long groupId, int start, int end,
080                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
081    
082            /**
083            * Returns the first team in the ordered set where groupId = &#63;.
084            *
085            * @param groupId the group ID
086            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
087            * @return the first matching team
088            * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found
089            */
090            public com.liferay.portal.model.Team findByGroupId_First(long groupId,
091                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator)
092                    throws com.liferay.portal.NoSuchTeamException;
093    
094            /**
095            * Returns the first team in the ordered set where groupId = &#63;.
096            *
097            * @param groupId the group ID
098            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
099            * @return the first matching team, or <code>null</code> if a matching team could not be found
100            */
101            public com.liferay.portal.model.Team fetchByGroupId_First(long groupId,
102                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
103    
104            /**
105            * Returns the last team in the ordered set where groupId = &#63;.
106            *
107            * @param groupId the group ID
108            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
109            * @return the last matching team
110            * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found
111            */
112            public com.liferay.portal.model.Team findByGroupId_Last(long groupId,
113                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator)
114                    throws com.liferay.portal.NoSuchTeamException;
115    
116            /**
117            * Returns the last team in the ordered set where groupId = &#63;.
118            *
119            * @param groupId the group ID
120            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
121            * @return the last matching team, or <code>null</code> if a matching team could not be found
122            */
123            public com.liferay.portal.model.Team fetchByGroupId_Last(long groupId,
124                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
125    
126            /**
127            * Returns the teams before and after the current team in the ordered set where groupId = &#63;.
128            *
129            * @param teamId the primary key of the current team
130            * @param groupId the group ID
131            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
132            * @return the previous, current, and next team
133            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
134            */
135            public com.liferay.portal.model.Team[] findByGroupId_PrevAndNext(
136                    long teamId, long groupId,
137                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator)
138                    throws com.liferay.portal.NoSuchTeamException;
139    
140            /**
141            * Returns all the teams that the user has permission to view where groupId = &#63;.
142            *
143            * @param groupId the group ID
144            * @return the matching teams that the user has permission to view
145            */
146            public java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
147                    long groupId);
148    
149            /**
150            * Returns a range of all the teams that the user has permission to view where groupId = &#63;.
151            *
152            * <p>
153            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
154            * </p>
155            *
156            * @param groupId the group ID
157            * @param start the lower bound of the range of teams
158            * @param end the upper bound of the range of teams (not inclusive)
159            * @return the range of matching teams that the user has permission to view
160            */
161            public java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
162                    long groupId, int start, int end);
163    
164            /**
165            * Returns an ordered range of all the teams that the user has permissions to view where groupId = &#63;.
166            *
167            * <p>
168            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
169            * </p>
170            *
171            * @param groupId the group ID
172            * @param start the lower bound of the range of teams
173            * @param end the upper bound of the range of teams (not inclusive)
174            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
175            * @return the ordered range of matching teams that the user has permission to view
176            */
177            public java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
178                    long groupId, int start, int end,
179                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
180    
181            /**
182            * 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;.
183            *
184            * @param teamId the primary key of the current team
185            * @param groupId the group ID
186            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
187            * @return the previous, current, and next team
188            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
189            */
190            public com.liferay.portal.model.Team[] filterFindByGroupId_PrevAndNext(
191                    long teamId, long groupId,
192                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator)
193                    throws com.liferay.portal.NoSuchTeamException;
194    
195            /**
196            * Removes all the teams where groupId = &#63; from the database.
197            *
198            * @param groupId the group ID
199            */
200            public void removeByGroupId(long groupId);
201    
202            /**
203            * Returns the number of teams where groupId = &#63;.
204            *
205            * @param groupId the group ID
206            * @return the number of matching teams
207            */
208            public int countByGroupId(long groupId);
209    
210            /**
211            * Returns the number of teams that the user has permission to view where groupId = &#63;.
212            *
213            * @param groupId the group ID
214            * @return the number of matching teams that the user has permission to view
215            */
216            public int filterCountByGroupId(long groupId);
217    
218            /**
219            * Returns the team where groupId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchTeamException} if it could not be found.
220            *
221            * @param groupId the group ID
222            * @param name the name
223            * @return the matching team
224            * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found
225            */
226            public com.liferay.portal.model.Team findByG_N(long groupId,
227                    java.lang.String name) throws com.liferay.portal.NoSuchTeamException;
228    
229            /**
230            * Returns the team where groupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
231            *
232            * @param groupId the group ID
233            * @param name the name
234            * @return the matching team, or <code>null</code> if a matching team could not be found
235            */
236            public com.liferay.portal.model.Team fetchByG_N(long groupId,
237                    java.lang.String name);
238    
239            /**
240            * 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.
241            *
242            * @param groupId the group ID
243            * @param name the name
244            * @param retrieveFromCache whether to use the finder cache
245            * @return the matching team, or <code>null</code> if a matching team could not be found
246            */
247            public com.liferay.portal.model.Team fetchByG_N(long groupId,
248                    java.lang.String name, boolean retrieveFromCache);
249    
250            /**
251            * Removes the team where groupId = &#63; and name = &#63; from the database.
252            *
253            * @param groupId the group ID
254            * @param name the name
255            * @return the team that was removed
256            */
257            public com.liferay.portal.model.Team removeByG_N(long groupId,
258                    java.lang.String name) throws com.liferay.portal.NoSuchTeamException;
259    
260            /**
261            * Returns the number of teams where groupId = &#63; and name = &#63;.
262            *
263            * @param groupId the group ID
264            * @param name the name
265            * @return the number of matching teams
266            */
267            public int countByG_N(long groupId, java.lang.String name);
268    
269            /**
270            * Caches the team in the entity cache if it is enabled.
271            *
272            * @param team the team
273            */
274            public void cacheResult(com.liferay.portal.model.Team team);
275    
276            /**
277            * Caches the teams in the entity cache if it is enabled.
278            *
279            * @param teams the teams
280            */
281            public void cacheResult(java.util.List<com.liferay.portal.model.Team> teams);
282    
283            /**
284            * Creates a new team with the primary key. Does not add the team to the database.
285            *
286            * @param teamId the primary key for the new team
287            * @return the new team
288            */
289            public com.liferay.portal.model.Team create(long teamId);
290    
291            /**
292            * Removes the team with the primary key from the database. Also notifies the appropriate model listeners.
293            *
294            * @param teamId the primary key of the team
295            * @return the team that was removed
296            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
297            */
298            public com.liferay.portal.model.Team remove(long teamId)
299                    throws com.liferay.portal.NoSuchTeamException;
300    
301            public com.liferay.portal.model.Team updateImpl(
302                    com.liferay.portal.model.Team team);
303    
304            /**
305            * Returns the team with the primary key or throws a {@link com.liferay.portal.NoSuchTeamException} if it could not be found.
306            *
307            * @param teamId the primary key of the team
308            * @return the team
309            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
310            */
311            public com.liferay.portal.model.Team findByPrimaryKey(long teamId)
312                    throws com.liferay.portal.NoSuchTeamException;
313    
314            /**
315            * Returns the team with the primary key or returns <code>null</code> if it could not be found.
316            *
317            * @param teamId the primary key of the team
318            * @return the team, or <code>null</code> if a team with the primary key could not be found
319            */
320            public com.liferay.portal.model.Team fetchByPrimaryKey(long teamId);
321    
322            @Override
323            public java.util.Map<java.io.Serializable, com.liferay.portal.model.Team> fetchByPrimaryKeys(
324                    java.util.Set<java.io.Serializable> primaryKeys);
325    
326            /**
327            * Returns all the teams.
328            *
329            * @return the teams
330            */
331            public java.util.List<com.liferay.portal.model.Team> findAll();
332    
333            /**
334            * Returns a range of all the teams.
335            *
336            * <p>
337            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
338            * </p>
339            *
340            * @param start the lower bound of the range of teams
341            * @param end the upper bound of the range of teams (not inclusive)
342            * @return the range of teams
343            */
344            public java.util.List<com.liferay.portal.model.Team> findAll(int start,
345                    int end);
346    
347            /**
348            * Returns an ordered range of all the teams.
349            *
350            * <p>
351            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
352            * </p>
353            *
354            * @param start the lower bound of the range of teams
355            * @param end the upper bound of the range of teams (not inclusive)
356            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
357            * @return the ordered range of teams
358            */
359            public java.util.List<com.liferay.portal.model.Team> findAll(int start,
360                    int end,
361                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
362    
363            /**
364            * Removes all the teams from the database.
365            */
366            public void removeAll();
367    
368            /**
369            * Returns the number of teams.
370            *
371            * @return the number of teams
372            */
373            public int countAll();
374    
375            /**
376            * Returns the primaryKeys of users associated with the team.
377            *
378            * @param pk the primary key of the team
379            * @return long[] of the primaryKeys of users associated with the team
380            */
381            public long[] getUserPrimaryKeys(long pk);
382    
383            /**
384            * Returns all the users associated with the team.
385            *
386            * @param pk the primary key of the team
387            * @return the users associated with the team
388            */
389            public java.util.List<com.liferay.portal.model.User> getUsers(long pk);
390    
391            /**
392            * Returns a range of all the users associated with the team.
393            *
394            * <p>
395            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
396            * </p>
397            *
398            * @param pk the primary key of the team
399            * @param start the lower bound of the range of teams
400            * @param end the upper bound of the range of teams (not inclusive)
401            * @return the range of users associated with the team
402            */
403            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
404                    int start, int end);
405    
406            /**
407            * Returns an ordered range of all the users associated with the team.
408            *
409            * <p>
410            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
411            * </p>
412            *
413            * @param pk the primary key of the team
414            * @param start the lower bound of the range of teams
415            * @param end the upper bound of the range of teams (not inclusive)
416            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
417            * @return the ordered range of users associated with the team
418            */
419            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
420                    int start, int end,
421                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator);
422    
423            /**
424            * Returns the number of users associated with the team.
425            *
426            * @param pk the primary key of the team
427            * @return the number of users associated with the team
428            */
429            public int getUsersSize(long pk);
430    
431            /**
432            * Returns <code>true</code> if the user is associated with the team.
433            *
434            * @param pk the primary key of the team
435            * @param userPK the primary key of the user
436            * @return <code>true</code> if the user is associated with the team; <code>false</code> otherwise
437            */
438            public boolean containsUser(long pk, long userPK);
439    
440            /**
441            * Returns <code>true</code> if the team has any users associated with it.
442            *
443            * @param pk the primary key of the team to check for associations with users
444            * @return <code>true</code> if the team has any users associated with it; <code>false</code> otherwise
445            */
446            public boolean containsUsers(long pk);
447    
448            /**
449            * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
450            *
451            * @param pk the primary key of the team
452            * @param userPK the primary key of the user
453            */
454            public void addUser(long pk, long userPK);
455    
456            /**
457            * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
458            *
459            * @param pk the primary key of the team
460            * @param user the user
461            */
462            public void addUser(long pk, com.liferay.portal.model.User user);
463    
464            /**
465            * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
466            *
467            * @param pk the primary key of the team
468            * @param userPKs the primary keys of the users
469            */
470            public void addUsers(long pk, long[] userPKs);
471    
472            /**
473            * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
474            *
475            * @param pk the primary key of the team
476            * @param users the users
477            */
478            public void addUsers(long pk,
479                    java.util.List<com.liferay.portal.model.User> users);
480    
481            /**
482            * Clears all associations between the team and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
483            *
484            * @param pk the primary key of the team to clear the associated users from
485            */
486            public void clearUsers(long pk);
487    
488            /**
489            * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
490            *
491            * @param pk the primary key of the team
492            * @param userPK the primary key of the user
493            */
494            public void removeUser(long pk, long userPK);
495    
496            /**
497            * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
498            *
499            * @param pk the primary key of the team
500            * @param user the user
501            */
502            public void removeUser(long pk, com.liferay.portal.model.User user);
503    
504            /**
505            * Removes the association between the team and the users. 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 userPKs the primary keys of the users
509            */
510            public void removeUsers(long pk, long[] userPKs);
511    
512            /**
513            * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
514            *
515            * @param pk the primary key of the team
516            * @param users the users
517            */
518            public void removeUsers(long pk,
519                    java.util.List<com.liferay.portal.model.User> users);
520    
521            /**
522            * 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.
523            *
524            * @param pk the primary key of the team
525            * @param userPKs the primary keys of the users to be associated with the team
526            */
527            public void setUsers(long pk, long[] userPKs);
528    
529            /**
530            * 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.
531            *
532            * @param pk the primary key of the team
533            * @param users the users to be associated with the team
534            */
535            public void setUsers(long pk,
536                    java.util.List<com.liferay.portal.model.User> users);
537    
538            /**
539            * Returns the primaryKeys of user groups associated with the team.
540            *
541            * @param pk the primary key of the team
542            * @return long[] of the primaryKeys of user groups associated with the team
543            */
544            public long[] getUserGroupPrimaryKeys(long pk);
545    
546            /**
547            * Returns all the user groups associated with the team.
548            *
549            * @param pk the primary key of the team
550            * @return the user groups associated with the team
551            */
552            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
553                    long pk);
554    
555            /**
556            * Returns a range of all the user groups associated with the team.
557            *
558            * <p>
559            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
560            * </p>
561            *
562            * @param pk the primary key of the team
563            * @param start the lower bound of the range of teams
564            * @param end the upper bound of the range of teams (not inclusive)
565            * @return the range of user groups associated with the team
566            */
567            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
568                    long pk, int start, int end);
569    
570            /**
571            * Returns an ordered range of all the user groups associated with the team.
572            *
573            * <p>
574            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
575            * </p>
576            *
577            * @param pk the primary key of the team
578            * @param start the lower bound of the range of teams
579            * @param end the upper bound of the range of teams (not inclusive)
580            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
581            * @return the ordered range of user groups associated with the team
582            */
583            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
584                    long pk, int start, int end,
585                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> orderByComparator);
586    
587            /**
588            * Returns the number of user groups associated with the team.
589            *
590            * @param pk the primary key of the team
591            * @return the number of user groups associated with the team
592            */
593            public int getUserGroupsSize(long pk);
594    
595            /**
596            * Returns <code>true</code> if the user group is associated with the team.
597            *
598            * @param pk the primary key of the team
599            * @param userGroupPK the primary key of the user group
600            * @return <code>true</code> if the user group is associated with the team; <code>false</code> otherwise
601            */
602            public boolean containsUserGroup(long pk, long userGroupPK);
603    
604            /**
605            * Returns <code>true</code> if the team has any user groups associated with it.
606            *
607            * @param pk the primary key of the team to check for associations with user groups
608            * @return <code>true</code> if the team has any user groups associated with it; <code>false</code> otherwise
609            */
610            public boolean containsUserGroups(long pk);
611    
612            /**
613            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
614            *
615            * @param pk the primary key of the team
616            * @param userGroupPK the primary key of the user group
617            */
618            public void addUserGroup(long pk, long userGroupPK);
619    
620            /**
621            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
622            *
623            * @param pk the primary key of the team
624            * @param userGroup the user group
625            */
626            public void addUserGroup(long pk,
627                    com.liferay.portal.model.UserGroup userGroup);
628    
629            /**
630            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
631            *
632            * @param pk the primary key of the team
633            * @param userGroupPKs the primary keys of the user groups
634            */
635            public void addUserGroups(long pk, long[] userGroupPKs);
636    
637            /**
638            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
639            *
640            * @param pk the primary key of the team
641            * @param userGroups the user groups
642            */
643            public void addUserGroups(long pk,
644                    java.util.List<com.liferay.portal.model.UserGroup> userGroups);
645    
646            /**
647            * Clears all associations between the team and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
648            *
649            * @param pk the primary key of the team to clear the associated user groups from
650            */
651            public void clearUserGroups(long pk);
652    
653            /**
654            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
655            *
656            * @param pk the primary key of the team
657            * @param userGroupPK the primary key of the user group
658            */
659            public void removeUserGroup(long pk, long userGroupPK);
660    
661            /**
662            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
663            *
664            * @param pk the primary key of the team
665            * @param userGroup the user group
666            */
667            public void removeUserGroup(long pk,
668                    com.liferay.portal.model.UserGroup userGroup);
669    
670            /**
671            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
672            *
673            * @param pk the primary key of the team
674            * @param userGroupPKs the primary keys of the user groups
675            */
676            public void removeUserGroups(long pk, long[] userGroupPKs);
677    
678            /**
679            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
680            *
681            * @param pk the primary key of the team
682            * @param userGroups the user groups
683            */
684            public void removeUserGroups(long pk,
685                    java.util.List<com.liferay.portal.model.UserGroup> userGroups);
686    
687            /**
688            * 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.
689            *
690            * @param pk the primary key of the team
691            * @param userGroupPKs the primary keys of the user groups to be associated with the team
692            */
693            public void setUserGroups(long pk, long[] userGroupPKs);
694    
695            /**
696            * 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.
697            *
698            * @param pk the primary key of the team
699            * @param userGroups the user groups to be associated with the team
700            */
701            public void setUserGroups(long pk,
702                    java.util.List<com.liferay.portal.model.UserGroup> userGroups);
703    }