001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.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.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.Team;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * 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.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see TeamPersistence
036     * @see TeamPersistenceImpl
037     * @generated
038     */
039    public class TeamUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(Team team) {
057                    getPersistence().clearCache(team);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<Team> findWithDynamicQuery(DynamicQuery dynamicQuery)
072                    throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<Team> findWithDynamicQuery(DynamicQuery dynamicQuery,
080                    int start, int end) throws SystemException {
081                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
082            }
083    
084            /**
085             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
086             */
087            public static List<Team> findWithDynamicQuery(DynamicQuery dynamicQuery,
088                    int start, int end, OrderByComparator orderByComparator)
089                    throws SystemException {
090                    return getPersistence()
091                                       .findWithDynamicQuery(dynamicQuery, start, end,
092                            orderByComparator);
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
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
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. Does not add the team to the database.
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
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            * Returns 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
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            * Returns 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
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            * Returns all the teams where groupId = &#63;.
188            *
189            * @param groupId the group ID
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            * Returns 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
207            * @param start the lower bound of the range of teams
208            * @param end the upper bound of the range of teams (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            * Returns 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
226            * @param start the lower bound of the range of teams
227            * @param end the upper bound of the range of teams (not inclusive)
228            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns 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
248            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
269            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
291            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns all the teams that the user has permission to view where groupId = &#63;.
307            *
308            * @param groupId the group ID
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            * Returns a range of all the teams that the user has permission to view 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
326            * @param start the lower bound of the range of teams
327            * @param end the upper bound of the range of teams (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            * Returns an ordered range of all the teams that the user has permissions to view 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
345            * @param start the lower bound of the range of teams
346            * @param end the upper bound of the range of teams (not inclusive)
347            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * 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;.
361            *
362            * @param teamId the primary key of the current team
363            * @param groupId the group ID
364            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
365            * @return the previous, current, and next team
366            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
367            * @throws SystemException if a system exception occurred
368            */
369            public static com.liferay.portal.model.Team[] filterFindByGroupId_PrevAndNext(
370                    long teamId, long groupId,
371                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
372                    throws com.liferay.portal.NoSuchTeamException,
373                            com.liferay.portal.kernel.exception.SystemException {
374                    return getPersistence()
375                                       .filterFindByGroupId_PrevAndNext(teamId, groupId,
376                            orderByComparator);
377            }
378    
379            /**
380            * Returns the team where groupId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchTeamException} if it could not be found.
381            *
382            * @param groupId the group ID
383            * @param name the name
384            * @return the matching team
385            * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found
386            * @throws SystemException if a system exception occurred
387            */
388            public static com.liferay.portal.model.Team findByG_N(long groupId,
389                    java.lang.String name)
390                    throws com.liferay.portal.NoSuchTeamException,
391                            com.liferay.portal.kernel.exception.SystemException {
392                    return getPersistence().findByG_N(groupId, name);
393            }
394    
395            /**
396            * Returns the team where groupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
397            *
398            * @param groupId the group ID
399            * @param name the name
400            * @return the matching team, or <code>null</code> if a matching team could not be found
401            * @throws SystemException if a system exception occurred
402            */
403            public static com.liferay.portal.model.Team fetchByG_N(long groupId,
404                    java.lang.String name)
405                    throws com.liferay.portal.kernel.exception.SystemException {
406                    return getPersistence().fetchByG_N(groupId, name);
407            }
408    
409            /**
410            * 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.
411            *
412            * @param groupId the group ID
413            * @param name the name
414            * @param retrieveFromCache whether to use the finder cache
415            * @return the matching team, or <code>null</code> if a matching team could not be found
416            * @throws SystemException if a system exception occurred
417            */
418            public static com.liferay.portal.model.Team fetchByG_N(long groupId,
419                    java.lang.String name, boolean retrieveFromCache)
420                    throws com.liferay.portal.kernel.exception.SystemException {
421                    return getPersistence().fetchByG_N(groupId, name, retrieveFromCache);
422            }
423    
424            /**
425            * Returns all the teams.
426            *
427            * @return the teams
428            * @throws SystemException if a system exception occurred
429            */
430            public static java.util.List<com.liferay.portal.model.Team> findAll()
431                    throws com.liferay.portal.kernel.exception.SystemException {
432                    return getPersistence().findAll();
433            }
434    
435            /**
436            * Returns a range of all the teams.
437            *
438            * <p>
439            * 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.
440            * </p>
441            *
442            * @param start the lower bound of the range of teams
443            * @param end the upper bound of the range of teams (not inclusive)
444            * @return the range of teams
445            * @throws SystemException if a system exception occurred
446            */
447            public static java.util.List<com.liferay.portal.model.Team> findAll(
448                    int start, int end)
449                    throws com.liferay.portal.kernel.exception.SystemException {
450                    return getPersistence().findAll(start, end);
451            }
452    
453            /**
454            * Returns an ordered range of all the teams.
455            *
456            * <p>
457            * 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.
458            * </p>
459            *
460            * @param start the lower bound of the range of teams
461            * @param end the upper bound of the range of teams (not inclusive)
462            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
463            * @return the ordered range of teams
464            * @throws SystemException if a system exception occurred
465            */
466            public static java.util.List<com.liferay.portal.model.Team> findAll(
467                    int start, int end,
468                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
469                    throws com.liferay.portal.kernel.exception.SystemException {
470                    return getPersistence().findAll(start, end, orderByComparator);
471            }
472    
473            /**
474            * Removes all the teams where groupId = &#63; from the database.
475            *
476            * @param groupId the group ID
477            * @throws SystemException if a system exception occurred
478            */
479            public static void removeByGroupId(long groupId)
480                    throws com.liferay.portal.kernel.exception.SystemException {
481                    getPersistence().removeByGroupId(groupId);
482            }
483    
484            /**
485            * Removes the team where groupId = &#63; and name = &#63; from the database.
486            *
487            * @param groupId the group ID
488            * @param name the name
489            * @throws SystemException if a system exception occurred
490            */
491            public static void removeByG_N(long groupId, java.lang.String name)
492                    throws com.liferay.portal.NoSuchTeamException,
493                            com.liferay.portal.kernel.exception.SystemException {
494                    getPersistence().removeByG_N(groupId, name);
495            }
496    
497            /**
498            * Removes all the teams from the database.
499            *
500            * @throws SystemException if a system exception occurred
501            */
502            public static void removeAll()
503                    throws com.liferay.portal.kernel.exception.SystemException {
504                    getPersistence().removeAll();
505            }
506    
507            /**
508            * Returns the number of teams where groupId = &#63;.
509            *
510            * @param groupId the group ID
511            * @return the number of matching teams
512            * @throws SystemException if a system exception occurred
513            */
514            public static int countByGroupId(long groupId)
515                    throws com.liferay.portal.kernel.exception.SystemException {
516                    return getPersistence().countByGroupId(groupId);
517            }
518    
519            /**
520            * Returns the number of teams that the user has permission to view where groupId = &#63;.
521            *
522            * @param groupId the group ID
523            * @return the number of matching teams that the user has permission to view
524            * @throws SystemException if a system exception occurred
525            */
526            public static int filterCountByGroupId(long groupId)
527                    throws com.liferay.portal.kernel.exception.SystemException {
528                    return getPersistence().filterCountByGroupId(groupId);
529            }
530    
531            /**
532            * Returns the number of teams where groupId = &#63; and name = &#63;.
533            *
534            * @param groupId the group ID
535            * @param name the name
536            * @return the number of matching teams
537            * @throws SystemException if a system exception occurred
538            */
539            public static int countByG_N(long groupId, java.lang.String name)
540                    throws com.liferay.portal.kernel.exception.SystemException {
541                    return getPersistence().countByG_N(groupId, name);
542            }
543    
544            /**
545            * Returns the number of teams.
546            *
547            * @return the number of teams
548            * @throws SystemException if a system exception occurred
549            */
550            public static int countAll()
551                    throws com.liferay.portal.kernel.exception.SystemException {
552                    return getPersistence().countAll();
553            }
554    
555            /**
556            * Returns all the users associated with the team.
557            *
558            * @param pk the primary key of the team
559            * @return the users associated with the team
560            * @throws SystemException if a system exception occurred
561            */
562            public static java.util.List<com.liferay.portal.model.User> getUsers(
563                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
564                    return getPersistence().getUsers(pk);
565            }
566    
567            /**
568            * Returns a range of all the users associated with the team.
569            *
570            * <p>
571            * 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.
572            * </p>
573            *
574            * @param pk the primary key of the team
575            * @param start the lower bound of the range of teams
576            * @param end the upper bound of the range of teams (not inclusive)
577            * @return the range of users associated with the team
578            * @throws SystemException if a system exception occurred
579            */
580            public static java.util.List<com.liferay.portal.model.User> getUsers(
581                    long pk, int start, int end)
582                    throws com.liferay.portal.kernel.exception.SystemException {
583                    return getPersistence().getUsers(pk, start, end);
584            }
585    
586            /**
587            * Returns an ordered range of all the users associated with the team.
588            *
589            * <p>
590            * 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.
591            * </p>
592            *
593            * @param pk the primary key of the team
594            * @param start the lower bound of the range of teams
595            * @param end the upper bound of the range of teams (not inclusive)
596            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
597            * @return the ordered range of users associated with the team
598            * @throws SystemException if a system exception occurred
599            */
600            public static java.util.List<com.liferay.portal.model.User> getUsers(
601                    long pk, int start, int end,
602                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
603                    throws com.liferay.portal.kernel.exception.SystemException {
604                    return getPersistence().getUsers(pk, start, end, orderByComparator);
605            }
606    
607            /**
608            * Returns the number of users associated with the team.
609            *
610            * @param pk the primary key of the team
611            * @return the number of users associated with the team
612            * @throws SystemException if a system exception occurred
613            */
614            public static int getUsersSize(long pk)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    return getPersistence().getUsersSize(pk);
617            }
618    
619            /**
620            * Returns <code>true</code> if the user is associated with the team.
621            *
622            * @param pk the primary key of the team
623            * @param userPK the primary key of the user
624            * @return <code>true</code> if the user is associated with the team; <code>false</code> otherwise
625            * @throws SystemException if a system exception occurred
626            */
627            public static boolean containsUser(long pk, long userPK)
628                    throws com.liferay.portal.kernel.exception.SystemException {
629                    return getPersistence().containsUser(pk, userPK);
630            }
631    
632            /**
633            * Returns <code>true</code> if the team has any users associated with it.
634            *
635            * @param pk the primary key of the team to check for associations with users
636            * @return <code>true</code> if the team has any users associated with it; <code>false</code> otherwise
637            * @throws SystemException if a system exception occurred
638            */
639            public static boolean containsUsers(long pk)
640                    throws com.liferay.portal.kernel.exception.SystemException {
641                    return getPersistence().containsUsers(pk);
642            }
643    
644            /**
645            * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
646            *
647            * @param pk the primary key of the team
648            * @param userPK the primary key of the user
649            * @throws SystemException if a system exception occurred
650            */
651            public static void addUser(long pk, long userPK)
652                    throws com.liferay.portal.kernel.exception.SystemException {
653                    getPersistence().addUser(pk, userPK);
654            }
655    
656            /**
657            * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
658            *
659            * @param pk the primary key of the team
660            * @param user the user
661            * @throws SystemException if a system exception occurred
662            */
663            public static void addUser(long pk, com.liferay.portal.model.User user)
664                    throws com.liferay.portal.kernel.exception.SystemException {
665                    getPersistence().addUser(pk, user);
666            }
667    
668            /**
669            * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
670            *
671            * @param pk the primary key of the team
672            * @param userPKs the primary keys of the users
673            * @throws SystemException if a system exception occurred
674            */
675            public static void addUsers(long pk, long[] userPKs)
676                    throws com.liferay.portal.kernel.exception.SystemException {
677                    getPersistence().addUsers(pk, userPKs);
678            }
679    
680            /**
681            * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
682            *
683            * @param pk the primary key of the team
684            * @param users the users
685            * @throws SystemException if a system exception occurred
686            */
687            public static void addUsers(long pk,
688                    java.util.List<com.liferay.portal.model.User> users)
689                    throws com.liferay.portal.kernel.exception.SystemException {
690                    getPersistence().addUsers(pk, users);
691            }
692    
693            /**
694            * Clears all associations between the team and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
695            *
696            * @param pk the primary key of the team to clear the associated users from
697            * @throws SystemException if a system exception occurred
698            */
699            public static void clearUsers(long pk)
700                    throws com.liferay.portal.kernel.exception.SystemException {
701                    getPersistence().clearUsers(pk);
702            }
703    
704            /**
705            * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
706            *
707            * @param pk the primary key of the team
708            * @param userPK the primary key of the user
709            * @throws SystemException if a system exception occurred
710            */
711            public static void removeUser(long pk, long userPK)
712                    throws com.liferay.portal.kernel.exception.SystemException {
713                    getPersistence().removeUser(pk, userPK);
714            }
715    
716            /**
717            * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
718            *
719            * @param pk the primary key of the team
720            * @param user the user
721            * @throws SystemException if a system exception occurred
722            */
723            public static void removeUser(long pk, com.liferay.portal.model.User user)
724                    throws com.liferay.portal.kernel.exception.SystemException {
725                    getPersistence().removeUser(pk, user);
726            }
727    
728            /**
729            * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
730            *
731            * @param pk the primary key of the team
732            * @param userPKs the primary keys of the users
733            * @throws SystemException if a system exception occurred
734            */
735            public static void removeUsers(long pk, long[] userPKs)
736                    throws com.liferay.portal.kernel.exception.SystemException {
737                    getPersistence().removeUsers(pk, userPKs);
738            }
739    
740            /**
741            * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
742            *
743            * @param pk the primary key of the team
744            * @param users the users
745            * @throws SystemException if a system exception occurred
746            */
747            public static void removeUsers(long pk,
748                    java.util.List<com.liferay.portal.model.User> users)
749                    throws com.liferay.portal.kernel.exception.SystemException {
750                    getPersistence().removeUsers(pk, users);
751            }
752    
753            /**
754            * 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.
755            *
756            * @param pk the primary key of the team
757            * @param userPKs the primary keys of the users to be associated with the team
758            * @throws SystemException if a system exception occurred
759            */
760            public static void setUsers(long pk, long[] userPKs)
761                    throws com.liferay.portal.kernel.exception.SystemException {
762                    getPersistence().setUsers(pk, userPKs);
763            }
764    
765            /**
766            * 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.
767            *
768            * @param pk the primary key of the team
769            * @param users the users to be associated with the team
770            * @throws SystemException if a system exception occurred
771            */
772            public static void setUsers(long pk,
773                    java.util.List<com.liferay.portal.model.User> users)
774                    throws com.liferay.portal.kernel.exception.SystemException {
775                    getPersistence().setUsers(pk, users);
776            }
777    
778            /**
779            * Returns all the user groups associated with the team.
780            *
781            * @param pk the primary key of the team
782            * @return the user groups associated with the team
783            * @throws SystemException if a system exception occurred
784            */
785            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
786                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
787                    return getPersistence().getUserGroups(pk);
788            }
789    
790            /**
791            * Returns a range of all the user groups associated with the team.
792            *
793            * <p>
794            * 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.
795            * </p>
796            *
797            * @param pk the primary key of the team
798            * @param start the lower bound of the range of teams
799            * @param end the upper bound of the range of teams (not inclusive)
800            * @return the range of user groups associated with the team
801            * @throws SystemException if a system exception occurred
802            */
803            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
804                    long pk, int start, int end)
805                    throws com.liferay.portal.kernel.exception.SystemException {
806                    return getPersistence().getUserGroups(pk, start, end);
807            }
808    
809            /**
810            * Returns an ordered range of all the user groups associated with the team.
811            *
812            * <p>
813            * 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.
814            * </p>
815            *
816            * @param pk the primary key of the team
817            * @param start the lower bound of the range of teams
818            * @param end the upper bound of the range of teams (not inclusive)
819            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
820            * @return the ordered range of user groups associated with the team
821            * @throws SystemException if a system exception occurred
822            */
823            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
824                    long pk, int start, int end,
825                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
826                    throws com.liferay.portal.kernel.exception.SystemException {
827                    return getPersistence().getUserGroups(pk, start, end, orderByComparator);
828            }
829    
830            /**
831            * Returns the number of user groups associated with the team.
832            *
833            * @param pk the primary key of the team
834            * @return the number of user groups associated with the team
835            * @throws SystemException if a system exception occurred
836            */
837            public static int getUserGroupsSize(long pk)
838                    throws com.liferay.portal.kernel.exception.SystemException {
839                    return getPersistence().getUserGroupsSize(pk);
840            }
841    
842            /**
843            * Returns <code>true</code> if the user group is associated with the team.
844            *
845            * @param pk the primary key of the team
846            * @param userGroupPK the primary key of the user group
847            * @return <code>true</code> if the user group is associated with the team; <code>false</code> otherwise
848            * @throws SystemException if a system exception occurred
849            */
850            public static boolean containsUserGroup(long pk, long userGroupPK)
851                    throws com.liferay.portal.kernel.exception.SystemException {
852                    return getPersistence().containsUserGroup(pk, userGroupPK);
853            }
854    
855            /**
856            * Returns <code>true</code> if the team has any user groups associated with it.
857            *
858            * @param pk the primary key of the team to check for associations with user groups
859            * @return <code>true</code> if the team has any user groups associated with it; <code>false</code> otherwise
860            * @throws SystemException if a system exception occurred
861            */
862            public static boolean containsUserGroups(long pk)
863                    throws com.liferay.portal.kernel.exception.SystemException {
864                    return getPersistence().containsUserGroups(pk);
865            }
866    
867            /**
868            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
869            *
870            * @param pk the primary key of the team
871            * @param userGroupPK the primary key of the user group
872            * @throws SystemException if a system exception occurred
873            */
874            public static void addUserGroup(long pk, long userGroupPK)
875                    throws com.liferay.portal.kernel.exception.SystemException {
876                    getPersistence().addUserGroup(pk, userGroupPK);
877            }
878    
879            /**
880            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
881            *
882            * @param pk the primary key of the team
883            * @param userGroup the user group
884            * @throws SystemException if a system exception occurred
885            */
886            public static void addUserGroup(long pk,
887                    com.liferay.portal.model.UserGroup userGroup)
888                    throws com.liferay.portal.kernel.exception.SystemException {
889                    getPersistence().addUserGroup(pk, userGroup);
890            }
891    
892            /**
893            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
894            *
895            * @param pk the primary key of the team
896            * @param userGroupPKs the primary keys of the user groups
897            * @throws SystemException if a system exception occurred
898            */
899            public static void addUserGroups(long pk, long[] userGroupPKs)
900                    throws com.liferay.portal.kernel.exception.SystemException {
901                    getPersistence().addUserGroups(pk, userGroupPKs);
902            }
903    
904            /**
905            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
906            *
907            * @param pk the primary key of the team
908            * @param userGroups the user groups
909            * @throws SystemException if a system exception occurred
910            */
911            public static void addUserGroups(long pk,
912                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
913                    throws com.liferay.portal.kernel.exception.SystemException {
914                    getPersistence().addUserGroups(pk, userGroups);
915            }
916    
917            /**
918            * Clears all associations between the team and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
919            *
920            * @param pk the primary key of the team to clear the associated user groups from
921            * @throws SystemException if a system exception occurred
922            */
923            public static void clearUserGroups(long pk)
924                    throws com.liferay.portal.kernel.exception.SystemException {
925                    getPersistence().clearUserGroups(pk);
926            }
927    
928            /**
929            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
930            *
931            * @param pk the primary key of the team
932            * @param userGroupPK the primary key of the user group
933            * @throws SystemException if a system exception occurred
934            */
935            public static void removeUserGroup(long pk, long userGroupPK)
936                    throws com.liferay.portal.kernel.exception.SystemException {
937                    getPersistence().removeUserGroup(pk, userGroupPK);
938            }
939    
940            /**
941            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
942            *
943            * @param pk the primary key of the team
944            * @param userGroup the user group
945            * @throws SystemException if a system exception occurred
946            */
947            public static void removeUserGroup(long pk,
948                    com.liferay.portal.model.UserGroup userGroup)
949                    throws com.liferay.portal.kernel.exception.SystemException {
950                    getPersistence().removeUserGroup(pk, userGroup);
951            }
952    
953            /**
954            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
955            *
956            * @param pk the primary key of the team
957            * @param userGroupPKs the primary keys of the user groups
958            * @throws SystemException if a system exception occurred
959            */
960            public static void removeUserGroups(long pk, long[] userGroupPKs)
961                    throws com.liferay.portal.kernel.exception.SystemException {
962                    getPersistence().removeUserGroups(pk, userGroupPKs);
963            }
964    
965            /**
966            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
967            *
968            * @param pk the primary key of the team
969            * @param userGroups the user groups
970            * @throws SystemException if a system exception occurred
971            */
972            public static void removeUserGroups(long pk,
973                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
974                    throws com.liferay.portal.kernel.exception.SystemException {
975                    getPersistence().removeUserGroups(pk, userGroups);
976            }
977    
978            /**
979            * 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.
980            *
981            * @param pk the primary key of the team
982            * @param userGroupPKs the primary keys of the user groups to be associated with the team
983            * @throws SystemException if a system exception occurred
984            */
985            public static void setUserGroups(long pk, long[] userGroupPKs)
986                    throws com.liferay.portal.kernel.exception.SystemException {
987                    getPersistence().setUserGroups(pk, userGroupPKs);
988            }
989    
990            /**
991            * 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.
992            *
993            * @param pk the primary key of the team
994            * @param userGroups the user groups to be associated with the team
995            * @throws SystemException if a system exception occurred
996            */
997            public static void setUserGroups(long pk,
998                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
999                    throws com.liferay.portal.kernel.exception.SystemException {
1000                    getPersistence().setUserGroups(pk, userGroups);
1001            }
1002    
1003            public static TeamPersistence getPersistence() {
1004                    if (_persistence == null) {
1005                            _persistence = (TeamPersistence)PortalBeanLocatorUtil.locate(TeamPersistence.class.getName());
1006    
1007                            ReferenceRegistry.registerReference(TeamUtil.class, "_persistence");
1008                    }
1009    
1010                    return _persistence;
1011            }
1012    
1013            public void setPersistence(TeamPersistence persistence) {
1014                    _persistence = persistence;
1015    
1016                    ReferenceRegistry.registerReference(TeamUtil.class, "_persistence");
1017            }
1018    
1019            private static TeamPersistence _persistence;
1020    }