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)
097             */
098            public static Team update(Team team) throws SystemException {
099                    return getPersistence().update(team);
100            }
101    
102            /**
103             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
104             */
105            public static Team update(Team team, ServiceContext serviceContext)
106                    throws SystemException {
107                    return getPersistence().update(team, serviceContext);
108            }
109    
110            /**
111            * Caches the team in the entity cache if it is enabled.
112            *
113            * @param team the team
114            */
115            public static void cacheResult(com.liferay.portal.model.Team team) {
116                    getPersistence().cacheResult(team);
117            }
118    
119            /**
120            * Caches the teams in the entity cache if it is enabled.
121            *
122            * @param teams the teams
123            */
124            public static void cacheResult(
125                    java.util.List<com.liferay.portal.model.Team> teams) {
126                    getPersistence().cacheResult(teams);
127            }
128    
129            /**
130            * Creates a new team with the primary key. Does not add the team to the database.
131            *
132            * @param teamId the primary key for the new team
133            * @return the new team
134            */
135            public static com.liferay.portal.model.Team create(long teamId) {
136                    return getPersistence().create(teamId);
137            }
138    
139            /**
140            * Removes the team with the primary key from the database. Also notifies the appropriate model listeners.
141            *
142            * @param teamId the primary key of the team
143            * @return the team that was removed
144            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
145            * @throws SystemException if a system exception occurred
146            */
147            public static com.liferay.portal.model.Team remove(long teamId)
148                    throws com.liferay.portal.NoSuchTeamException,
149                            com.liferay.portal.kernel.exception.SystemException {
150                    return getPersistence().remove(teamId);
151            }
152    
153            public static com.liferay.portal.model.Team updateImpl(
154                    com.liferay.portal.model.Team team)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return getPersistence().updateImpl(team);
157            }
158    
159            /**
160            * Returns the team with the primary key or throws a {@link com.liferay.portal.NoSuchTeamException} if it could not be found.
161            *
162            * @param teamId the primary key of the team
163            * @return the team
164            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
165            * @throws SystemException if a system exception occurred
166            */
167            public static com.liferay.portal.model.Team findByPrimaryKey(long teamId)
168                    throws com.liferay.portal.NoSuchTeamException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getPersistence().findByPrimaryKey(teamId);
171            }
172    
173            /**
174            * Returns the team with the primary key or returns <code>null</code> if it could not be found.
175            *
176            * @param teamId the primary key of the team
177            * @return the team, or <code>null</code> if a team with the primary key could not be found
178            * @throws SystemException if a system exception occurred
179            */
180            public static com.liferay.portal.model.Team fetchByPrimaryKey(long teamId)
181                    throws com.liferay.portal.kernel.exception.SystemException {
182                    return getPersistence().fetchByPrimaryKey(teamId);
183            }
184    
185            /**
186            * Returns all the teams where groupId = &#63;.
187            *
188            * @param groupId the group ID
189            * @return the matching teams
190            * @throws SystemException if a system exception occurred
191            */
192            public static java.util.List<com.liferay.portal.model.Team> findByGroupId(
193                    long groupId)
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return getPersistence().findByGroupId(groupId);
196            }
197    
198            /**
199            * Returns a range of all the teams where groupId = &#63;.
200            *
201            * <p>
202            * 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.
203            * </p>
204            *
205            * @param groupId the group ID
206            * @param start the lower bound of the range of teams
207            * @param end the upper bound of the range of teams (not inclusive)
208            * @return the range of matching teams
209            * @throws SystemException if a system exception occurred
210            */
211            public static java.util.List<com.liferay.portal.model.Team> findByGroupId(
212                    long groupId, int start, int end)
213                    throws com.liferay.portal.kernel.exception.SystemException {
214                    return getPersistence().findByGroupId(groupId, start, end);
215            }
216    
217            /**
218            * Returns an ordered range of all the teams where groupId = &#63;.
219            *
220            * <p>
221            * 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.
222            * </p>
223            *
224            * @param groupId the group ID
225            * @param start the lower bound of the range of teams
226            * @param end the upper bound of the range of teams (not inclusive)
227            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
228            * @return the ordered range of matching teams
229            * @throws SystemException if a system exception occurred
230            */
231            public static java.util.List<com.liferay.portal.model.Team> findByGroupId(
232                    long groupId, int start, int end,
233                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
234                    throws com.liferay.portal.kernel.exception.SystemException {
235                    return getPersistence()
236                                       .findByGroupId(groupId, start, end, orderByComparator);
237            }
238    
239            /**
240            * Returns the first team in the ordered set where groupId = &#63;.
241            *
242            * @param groupId the group ID
243            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
244            * @return the first matching team
245            * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found
246            * @throws SystemException if a system exception occurred
247            */
248            public static com.liferay.portal.model.Team findByGroupId_First(
249                    long groupId,
250                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251                    throws com.liferay.portal.NoSuchTeamException,
252                            com.liferay.portal.kernel.exception.SystemException {
253                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
254            }
255    
256            /**
257            * Returns the first team in the ordered set where groupId = &#63;.
258            *
259            * @param groupId the group ID
260            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
261            * @return the first matching team, or <code>null</code> if a matching team could not be found
262            * @throws SystemException if a system exception occurred
263            */
264            public static com.liferay.portal.model.Team fetchByGroupId_First(
265                    long groupId,
266                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267                    throws com.liferay.portal.kernel.exception.SystemException {
268                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
269            }
270    
271            /**
272            * Returns the last team in the ordered set where groupId = &#63;.
273            *
274            * @param groupId the group ID
275            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
276            * @return the last matching team
277            * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found
278            * @throws SystemException if a system exception occurred
279            */
280            public static com.liferay.portal.model.Team findByGroupId_Last(
281                    long groupId,
282                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
283                    throws com.liferay.portal.NoSuchTeamException,
284                            com.liferay.portal.kernel.exception.SystemException {
285                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
286            }
287    
288            /**
289            * Returns the last team in the ordered set where groupId = &#63;.
290            *
291            * @param groupId the group ID
292            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
293            * @return the last matching team, or <code>null</code> if a matching team could not be found
294            * @throws SystemException if a system exception occurred
295            */
296            public static com.liferay.portal.model.Team fetchByGroupId_Last(
297                    long groupId,
298                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
301            }
302    
303            /**
304            * Returns the teams before and after the current team in the ordered set where groupId = &#63;.
305            *
306            * @param teamId the primary key of the current team
307            * @param groupId the group ID
308            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
309            * @return the previous, current, and next team
310            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
311            * @throws SystemException if a system exception occurred
312            */
313            public static com.liferay.portal.model.Team[] findByGroupId_PrevAndNext(
314                    long teamId, long groupId,
315                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
316                    throws com.liferay.portal.NoSuchTeamException,
317                            com.liferay.portal.kernel.exception.SystemException {
318                    return getPersistence()
319                                       .findByGroupId_PrevAndNext(teamId, groupId, orderByComparator);
320            }
321    
322            /**
323            * Returns all the teams that the user has permission to view where groupId = &#63;.
324            *
325            * @param groupId the group ID
326            * @return the matching teams that the user has permission to view
327            * @throws SystemException if a system exception occurred
328            */
329            public static java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
330                    long groupId)
331                    throws com.liferay.portal.kernel.exception.SystemException {
332                    return getPersistence().filterFindByGroupId(groupId);
333            }
334    
335            /**
336            * Returns a range of all the teams that the user has permission to view where groupId = &#63;.
337            *
338            * <p>
339            * 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.
340            * </p>
341            *
342            * @param groupId the group ID
343            * @param start the lower bound of the range of teams
344            * @param end the upper bound of the range of teams (not inclusive)
345            * @return the range of matching teams that the user has permission to view
346            * @throws SystemException if a system exception occurred
347            */
348            public static java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
349                    long groupId, int start, int end)
350                    throws com.liferay.portal.kernel.exception.SystemException {
351                    return getPersistence().filterFindByGroupId(groupId, start, end);
352            }
353    
354            /**
355            * Returns an ordered range of all the teams that the user has permissions to view where groupId = &#63;.
356            *
357            * <p>
358            * 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.
359            * </p>
360            *
361            * @param groupId the group ID
362            * @param start the lower bound of the range of teams
363            * @param end the upper bound of the range of teams (not inclusive)
364            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
365            * @return the ordered range of matching teams that the user has permission to view
366            * @throws SystemException if a system exception occurred
367            */
368            public static java.util.List<com.liferay.portal.model.Team> filterFindByGroupId(
369                    long groupId, int start, int end,
370                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
371                    throws com.liferay.portal.kernel.exception.SystemException {
372                    return getPersistence()
373                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
374            }
375    
376            /**
377            * 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;.
378            *
379            * @param teamId the primary key of the current team
380            * @param groupId the group ID
381            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
382            * @return the previous, current, and next team
383            * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found
384            * @throws SystemException if a system exception occurred
385            */
386            public static com.liferay.portal.model.Team[] filterFindByGroupId_PrevAndNext(
387                    long teamId, long groupId,
388                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
389                    throws com.liferay.portal.NoSuchTeamException,
390                            com.liferay.portal.kernel.exception.SystemException {
391                    return getPersistence()
392                                       .filterFindByGroupId_PrevAndNext(teamId, groupId,
393                            orderByComparator);
394            }
395    
396            /**
397            * Returns the team where groupId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchTeamException} if it could not be found.
398            *
399            * @param groupId the group ID
400            * @param name the name
401            * @return the matching team
402            * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found
403            * @throws SystemException if a system exception occurred
404            */
405            public static com.liferay.portal.model.Team findByG_N(long groupId,
406                    java.lang.String name)
407                    throws com.liferay.portal.NoSuchTeamException,
408                            com.liferay.portal.kernel.exception.SystemException {
409                    return getPersistence().findByG_N(groupId, name);
410            }
411    
412            /**
413            * Returns the team where groupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
414            *
415            * @param groupId the group ID
416            * @param name the name
417            * @return the matching team, or <code>null</code> if a matching team could not be found
418            * @throws SystemException if a system exception occurred
419            */
420            public static com.liferay.portal.model.Team fetchByG_N(long groupId,
421                    java.lang.String name)
422                    throws com.liferay.portal.kernel.exception.SystemException {
423                    return getPersistence().fetchByG_N(groupId, name);
424            }
425    
426            /**
427            * 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.
428            *
429            * @param groupId the group ID
430            * @param name the name
431            * @param retrieveFromCache whether to use the finder cache
432            * @return the matching team, or <code>null</code> if a matching team could not be found
433            * @throws SystemException if a system exception occurred
434            */
435            public static com.liferay.portal.model.Team fetchByG_N(long groupId,
436                    java.lang.String name, boolean retrieveFromCache)
437                    throws com.liferay.portal.kernel.exception.SystemException {
438                    return getPersistence().fetchByG_N(groupId, name, retrieveFromCache);
439            }
440    
441            /**
442            * Returns all the teams.
443            *
444            * @return the teams
445            * @throws SystemException if a system exception occurred
446            */
447            public static java.util.List<com.liferay.portal.model.Team> findAll()
448                    throws com.liferay.portal.kernel.exception.SystemException {
449                    return getPersistence().findAll();
450            }
451    
452            /**
453            * Returns a range of all the teams.
454            *
455            * <p>
456            * 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.
457            * </p>
458            *
459            * @param start the lower bound of the range of teams
460            * @param end the upper bound of the range of teams (not inclusive)
461            * @return the range of teams
462            * @throws SystemException if a system exception occurred
463            */
464            public static java.util.List<com.liferay.portal.model.Team> findAll(
465                    int start, int end)
466                    throws com.liferay.portal.kernel.exception.SystemException {
467                    return getPersistence().findAll(start, end);
468            }
469    
470            /**
471            * Returns an ordered range of all the teams.
472            *
473            * <p>
474            * 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.
475            * </p>
476            *
477            * @param start the lower bound of the range of teams
478            * @param end the upper bound of the range of teams (not inclusive)
479            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
480            * @return the ordered range of teams
481            * @throws SystemException if a system exception occurred
482            */
483            public static java.util.List<com.liferay.portal.model.Team> findAll(
484                    int start, int end,
485                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
486                    throws com.liferay.portal.kernel.exception.SystemException {
487                    return getPersistence().findAll(start, end, orderByComparator);
488            }
489    
490            /**
491            * Removes all the teams where groupId = &#63; from the database.
492            *
493            * @param groupId the group ID
494            * @throws SystemException if a system exception occurred
495            */
496            public static void removeByGroupId(long groupId)
497                    throws com.liferay.portal.kernel.exception.SystemException {
498                    getPersistence().removeByGroupId(groupId);
499            }
500    
501            /**
502            * Removes the team where groupId = &#63; and name = &#63; from the database.
503            *
504            * @param groupId the group ID
505            * @param name the name
506            * @return the team that was removed
507            * @throws SystemException if a system exception occurred
508            */
509            public static com.liferay.portal.model.Team removeByG_N(long groupId,
510                    java.lang.String name)
511                    throws com.liferay.portal.NoSuchTeamException,
512                            com.liferay.portal.kernel.exception.SystemException {
513                    return getPersistence().removeByG_N(groupId, name);
514            }
515    
516            /**
517            * Removes all the teams from the database.
518            *
519            * @throws SystemException if a system exception occurred
520            */
521            public static void removeAll()
522                    throws com.liferay.portal.kernel.exception.SystemException {
523                    getPersistence().removeAll();
524            }
525    
526            /**
527            * Returns the number of teams where groupId = &#63;.
528            *
529            * @param groupId the group ID
530            * @return the number of matching teams
531            * @throws SystemException if a system exception occurred
532            */
533            public static int countByGroupId(long groupId)
534                    throws com.liferay.portal.kernel.exception.SystemException {
535                    return getPersistence().countByGroupId(groupId);
536            }
537    
538            /**
539            * Returns the number of teams that the user has permission to view where groupId = &#63;.
540            *
541            * @param groupId the group ID
542            * @return the number of matching teams that the user has permission to view
543            * @throws SystemException if a system exception occurred
544            */
545            public static int filterCountByGroupId(long groupId)
546                    throws com.liferay.portal.kernel.exception.SystemException {
547                    return getPersistence().filterCountByGroupId(groupId);
548            }
549    
550            /**
551            * Returns the number of teams where groupId = &#63; and name = &#63;.
552            *
553            * @param groupId the group ID
554            * @param name the name
555            * @return the number of matching teams
556            * @throws SystemException if a system exception occurred
557            */
558            public static int countByG_N(long groupId, java.lang.String name)
559                    throws com.liferay.portal.kernel.exception.SystemException {
560                    return getPersistence().countByG_N(groupId, name);
561            }
562    
563            /**
564            * Returns the number of teams.
565            *
566            * @return the number of teams
567            * @throws SystemException if a system exception occurred
568            */
569            public static int countAll()
570                    throws com.liferay.portal.kernel.exception.SystemException {
571                    return getPersistence().countAll();
572            }
573    
574            /**
575            * Returns all the users associated with the team.
576            *
577            * @param pk the primary key of the team
578            * @return the users associated with the team
579            * @throws SystemException if a system exception occurred
580            */
581            public static java.util.List<com.liferay.portal.model.User> getUsers(
582                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
583                    return getPersistence().getUsers(pk);
584            }
585    
586            /**
587            * Returns a 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            * @return the range of users associated with the team
597            * @throws SystemException if a system exception occurred
598            */
599            public static java.util.List<com.liferay.portal.model.User> getUsers(
600                    long pk, int start, int end)
601                    throws com.liferay.portal.kernel.exception.SystemException {
602                    return getPersistence().getUsers(pk, start, end);
603            }
604    
605            /**
606            * Returns an ordered range of all the users associated with the team.
607            *
608            * <p>
609            * 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.
610            * </p>
611            *
612            * @param pk the primary key of the team
613            * @param start the lower bound of the range of teams
614            * @param end the upper bound of the range of teams (not inclusive)
615            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
616            * @return the ordered range of users associated with the team
617            * @throws SystemException if a system exception occurred
618            */
619            public static java.util.List<com.liferay.portal.model.User> getUsers(
620                    long pk, int start, int end,
621                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
622                    throws com.liferay.portal.kernel.exception.SystemException {
623                    return getPersistence().getUsers(pk, start, end, orderByComparator);
624            }
625    
626            /**
627            * Returns the number of users associated with the team.
628            *
629            * @param pk the primary key of the team
630            * @return the number of users associated with the team
631            * @throws SystemException if a system exception occurred
632            */
633            public static int getUsersSize(long pk)
634                    throws com.liferay.portal.kernel.exception.SystemException {
635                    return getPersistence().getUsersSize(pk);
636            }
637    
638            /**
639            * Returns <code>true</code> if the user is associated with the team.
640            *
641            * @param pk the primary key of the team
642            * @param userPK the primary key of the user
643            * @return <code>true</code> if the user is associated with the team; <code>false</code> otherwise
644            * @throws SystemException if a system exception occurred
645            */
646            public static boolean containsUser(long pk, long userPK)
647                    throws com.liferay.portal.kernel.exception.SystemException {
648                    return getPersistence().containsUser(pk, userPK);
649            }
650    
651            /**
652            * Returns <code>true</code> if the team has any users associated with it.
653            *
654            * @param pk the primary key of the team to check for associations with users
655            * @return <code>true</code> if the team has any users associated with it; <code>false</code> otherwise
656            * @throws SystemException if a system exception occurred
657            */
658            public static boolean containsUsers(long pk)
659                    throws com.liferay.portal.kernel.exception.SystemException {
660                    return getPersistence().containsUsers(pk);
661            }
662    
663            /**
664            * Adds an association between the team and the user. 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 userPK the primary key of the user
668            * @throws SystemException if a system exception occurred
669            */
670            public static void addUser(long pk, long userPK)
671                    throws com.liferay.portal.kernel.exception.SystemException {
672                    getPersistence().addUser(pk, userPK);
673            }
674    
675            /**
676            * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
677            *
678            * @param pk the primary key of the team
679            * @param user the user
680            * @throws SystemException if a system exception occurred
681            */
682            public static void addUser(long pk, com.liferay.portal.model.User user)
683                    throws com.liferay.portal.kernel.exception.SystemException {
684                    getPersistence().addUser(pk, user);
685            }
686    
687            /**
688            * Adds an association between the team and the users. 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 userPKs the primary keys of the users
692            * @throws SystemException if a system exception occurred
693            */
694            public static void addUsers(long pk, long[] userPKs)
695                    throws com.liferay.portal.kernel.exception.SystemException {
696                    getPersistence().addUsers(pk, userPKs);
697            }
698    
699            /**
700            * Adds an association between the team and the users. 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 users the users
704            * @throws SystemException if a system exception occurred
705            */
706            public static void addUsers(long pk,
707                    java.util.List<com.liferay.portal.model.User> users)
708                    throws com.liferay.portal.kernel.exception.SystemException {
709                    getPersistence().addUsers(pk, users);
710            }
711    
712            /**
713            * Clears all associations between the team and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
714            *
715            * @param pk the primary key of the team to clear the associated users from
716            * @throws SystemException if a system exception occurred
717            */
718            public static void clearUsers(long pk)
719                    throws com.liferay.portal.kernel.exception.SystemException {
720                    getPersistence().clearUsers(pk);
721            }
722    
723            /**
724            * Removes the association between the team and the user. 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 userPK the primary key of the user
728            * @throws SystemException if a system exception occurred
729            */
730            public static void removeUser(long pk, long userPK)
731                    throws com.liferay.portal.kernel.exception.SystemException {
732                    getPersistence().removeUser(pk, userPK);
733            }
734    
735            /**
736            * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
737            *
738            * @param pk the primary key of the team
739            * @param user the user
740            * @throws SystemException if a system exception occurred
741            */
742            public static void removeUser(long pk, com.liferay.portal.model.User user)
743                    throws com.liferay.portal.kernel.exception.SystemException {
744                    getPersistence().removeUser(pk, user);
745            }
746    
747            /**
748            * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
749            *
750            * @param pk the primary key of the team
751            * @param userPKs the primary keys of the users
752            * @throws SystemException if a system exception occurred
753            */
754            public static void removeUsers(long pk, long[] userPKs)
755                    throws com.liferay.portal.kernel.exception.SystemException {
756                    getPersistence().removeUsers(pk, userPKs);
757            }
758    
759            /**
760            * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
761            *
762            * @param pk the primary key of the team
763            * @param users the users
764            * @throws SystemException if a system exception occurred
765            */
766            public static void removeUsers(long pk,
767                    java.util.List<com.liferay.portal.model.User> users)
768                    throws com.liferay.portal.kernel.exception.SystemException {
769                    getPersistence().removeUsers(pk, users);
770            }
771    
772            /**
773            * 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.
774            *
775            * @param pk the primary key of the team
776            * @param userPKs the primary keys of the users to be associated with the team
777            * @throws SystemException if a system exception occurred
778            */
779            public static void setUsers(long pk, long[] userPKs)
780                    throws com.liferay.portal.kernel.exception.SystemException {
781                    getPersistence().setUsers(pk, userPKs);
782            }
783    
784            /**
785            * 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.
786            *
787            * @param pk the primary key of the team
788            * @param users the users to be associated with the team
789            * @throws SystemException if a system exception occurred
790            */
791            public static void setUsers(long pk,
792                    java.util.List<com.liferay.portal.model.User> users)
793                    throws com.liferay.portal.kernel.exception.SystemException {
794                    getPersistence().setUsers(pk, users);
795            }
796    
797            /**
798            * Returns all the user groups associated with the team.
799            *
800            * @param pk the primary key of the team
801            * @return the user groups associated with the team
802            * @throws SystemException if a system exception occurred
803            */
804            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
805                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
806                    return getPersistence().getUserGroups(pk);
807            }
808    
809            /**
810            * Returns a 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            * @return the range of user groups associated with the team
820            * @throws SystemException if a system exception occurred
821            */
822            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
823                    long pk, int start, int end)
824                    throws com.liferay.portal.kernel.exception.SystemException {
825                    return getPersistence().getUserGroups(pk, start, end);
826            }
827    
828            /**
829            * Returns an ordered range of all the user groups associated with the team.
830            *
831            * <p>
832            * 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.
833            * </p>
834            *
835            * @param pk the primary key of the team
836            * @param start the lower bound of the range of teams
837            * @param end the upper bound of the range of teams (not inclusive)
838            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
839            * @return the ordered range of user groups associated with the team
840            * @throws SystemException if a system exception occurred
841            */
842            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
843                    long pk, int start, int end,
844                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
845                    throws com.liferay.portal.kernel.exception.SystemException {
846                    return getPersistence().getUserGroups(pk, start, end, orderByComparator);
847            }
848    
849            /**
850            * Returns the number of user groups associated with the team.
851            *
852            * @param pk the primary key of the team
853            * @return the number of user groups associated with the team
854            * @throws SystemException if a system exception occurred
855            */
856            public static int getUserGroupsSize(long pk)
857                    throws com.liferay.portal.kernel.exception.SystemException {
858                    return getPersistence().getUserGroupsSize(pk);
859            }
860    
861            /**
862            * Returns <code>true</code> if the user group is associated with the team.
863            *
864            * @param pk the primary key of the team
865            * @param userGroupPK the primary key of the user group
866            * @return <code>true</code> if the user group is associated with the team; <code>false</code> otherwise
867            * @throws SystemException if a system exception occurred
868            */
869            public static boolean containsUserGroup(long pk, long userGroupPK)
870                    throws com.liferay.portal.kernel.exception.SystemException {
871                    return getPersistence().containsUserGroup(pk, userGroupPK);
872            }
873    
874            /**
875            * Returns <code>true</code> if the team has any user groups associated with it.
876            *
877            * @param pk the primary key of the team to check for associations with user groups
878            * @return <code>true</code> if the team has any user groups associated with it; <code>false</code> otherwise
879            * @throws SystemException if a system exception occurred
880            */
881            public static boolean containsUserGroups(long pk)
882                    throws com.liferay.portal.kernel.exception.SystemException {
883                    return getPersistence().containsUserGroups(pk);
884            }
885    
886            /**
887            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
888            *
889            * @param pk the primary key of the team
890            * @param userGroupPK the primary key of the user group
891            * @throws SystemException if a system exception occurred
892            */
893            public static void addUserGroup(long pk, long userGroupPK)
894                    throws com.liferay.portal.kernel.exception.SystemException {
895                    getPersistence().addUserGroup(pk, userGroupPK);
896            }
897    
898            /**
899            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
900            *
901            * @param pk the primary key of the team
902            * @param userGroup the user group
903            * @throws SystemException if a system exception occurred
904            */
905            public static void addUserGroup(long pk,
906                    com.liferay.portal.model.UserGroup userGroup)
907                    throws com.liferay.portal.kernel.exception.SystemException {
908                    getPersistence().addUserGroup(pk, userGroup);
909            }
910    
911            /**
912            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
913            *
914            * @param pk the primary key of the team
915            * @param userGroupPKs the primary keys of the user groups
916            * @throws SystemException if a system exception occurred
917            */
918            public static void addUserGroups(long pk, long[] userGroupPKs)
919                    throws com.liferay.portal.kernel.exception.SystemException {
920                    getPersistence().addUserGroups(pk, userGroupPKs);
921            }
922    
923            /**
924            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
925            *
926            * @param pk the primary key of the team
927            * @param userGroups the user groups
928            * @throws SystemException if a system exception occurred
929            */
930            public static void addUserGroups(long pk,
931                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
932                    throws com.liferay.portal.kernel.exception.SystemException {
933                    getPersistence().addUserGroups(pk, userGroups);
934            }
935    
936            /**
937            * Clears all associations between the team and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
938            *
939            * @param pk the primary key of the team to clear the associated user groups from
940            * @throws SystemException if a system exception occurred
941            */
942            public static void clearUserGroups(long pk)
943                    throws com.liferay.portal.kernel.exception.SystemException {
944                    getPersistence().clearUserGroups(pk);
945            }
946    
947            /**
948            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
949            *
950            * @param pk the primary key of the team
951            * @param userGroupPK the primary key of the user group
952            * @throws SystemException if a system exception occurred
953            */
954            public static void removeUserGroup(long pk, long userGroupPK)
955                    throws com.liferay.portal.kernel.exception.SystemException {
956                    getPersistence().removeUserGroup(pk, userGroupPK);
957            }
958    
959            /**
960            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
961            *
962            * @param pk the primary key of the team
963            * @param userGroup the user group
964            * @throws SystemException if a system exception occurred
965            */
966            public static void removeUserGroup(long pk,
967                    com.liferay.portal.model.UserGroup userGroup)
968                    throws com.liferay.portal.kernel.exception.SystemException {
969                    getPersistence().removeUserGroup(pk, userGroup);
970            }
971    
972            /**
973            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
974            *
975            * @param pk the primary key of the team
976            * @param userGroupPKs the primary keys of the user groups
977            * @throws SystemException if a system exception occurred
978            */
979            public static void removeUserGroups(long pk, long[] userGroupPKs)
980                    throws com.liferay.portal.kernel.exception.SystemException {
981                    getPersistence().removeUserGroups(pk, userGroupPKs);
982            }
983    
984            /**
985            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
986            *
987            * @param pk the primary key of the team
988            * @param userGroups the user groups
989            * @throws SystemException if a system exception occurred
990            */
991            public static void removeUserGroups(long pk,
992                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
993                    throws com.liferay.portal.kernel.exception.SystemException {
994                    getPersistence().removeUserGroups(pk, userGroups);
995            }
996    
997            /**
998            * 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.
999            *
1000            * @param pk the primary key of the team
1001            * @param userGroupPKs the primary keys of the user groups to be associated with the team
1002            * @throws SystemException if a system exception occurred
1003            */
1004            public static void setUserGroups(long pk, long[] userGroupPKs)
1005                    throws com.liferay.portal.kernel.exception.SystemException {
1006                    getPersistence().setUserGroups(pk, userGroupPKs);
1007            }
1008    
1009            /**
1010            * 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.
1011            *
1012            * @param pk the primary key of the team
1013            * @param userGroups the user groups to be associated with the team
1014            * @throws SystemException if a system exception occurred
1015            */
1016            public static void setUserGroups(long pk,
1017                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
1018                    throws com.liferay.portal.kernel.exception.SystemException {
1019                    getPersistence().setUserGroups(pk, userGroups);
1020            }
1021    
1022            public static TeamPersistence getPersistence() {
1023                    if (_persistence == null) {
1024                            _persistence = (TeamPersistence)PortalBeanLocatorUtil.locate(TeamPersistence.class.getName());
1025    
1026                            ReferenceRegistry.registerReference(TeamUtil.class, "_persistence");
1027                    }
1028    
1029                    return _persistence;
1030            }
1031    
1032            /**
1033             * @deprecated
1034             */
1035            public void setPersistence(TeamPersistence persistence) {
1036            }
1037    
1038            private static TeamPersistence _persistence;
1039    }