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