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