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