001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.model.Team;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the team service. This utility wraps {@link com.liferay.portal.service.persistence.impl.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.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see TeamPersistence
037     * @see com.liferay.portal.service.persistence.impl.TeamPersistenceImpl
038     * @generated
039     */
040    @ProviderType
041    public class TeamUtil {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
046             */
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
050             */
051            public static void clearCache() {
052                    getPersistence().clearCache();
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
057             */
058            public static void clearCache(Team team) {
059                    getPersistence().clearCache(team);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<Team> findWithDynamicQuery(DynamicQuery dynamicQuery) {
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) {
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<Team> orderByComparator) {
089                    return getPersistence()
090                                       .findWithDynamicQuery(dynamicQuery, start, end,
091                            orderByComparator);
092            }
093    
094            /**
095             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
096             */
097            public static Team update(Team team) {
098                    return getPersistence().update(team);
099            }
100    
101            /**
102             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
103             */
104            public static Team update(Team team, ServiceContext serviceContext) {
105                    return getPersistence().update(team, serviceContext);
106            }
107    
108            /**
109            * Returns all the teams where groupId = &#63;.
110            *
111            * @param groupId the group ID
112            * @return the matching teams
113            */
114            public static List<Team> findByGroupId(long groupId) {
115                    return getPersistence().findByGroupId(groupId);
116            }
117    
118            /**
119            * Returns a range of all the teams where groupId = &#63;.
120            *
121            * <p>
122            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
123            * </p>
124            *
125            * @param groupId the group ID
126            * @param start the lower bound of the range of teams
127            * @param end the upper bound of the range of teams (not inclusive)
128            * @return the range of matching teams
129            */
130            public static List<Team> findByGroupId(long groupId, int start, int end) {
131                    return getPersistence().findByGroupId(groupId, start, end);
132            }
133    
134            /**
135            * Returns an ordered range of all the teams where groupId = &#63;.
136            *
137            * <p>
138            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
139            * </p>
140            *
141            * @param groupId the group ID
142            * @param start the lower bound of the range of teams
143            * @param end the upper bound of the range of teams (not inclusive)
144            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
145            * @return the ordered range of matching teams
146            */
147            public static List<Team> findByGroupId(long groupId, int start, int end,
148                    OrderByComparator<Team> orderByComparator) {
149                    return getPersistence()
150                                       .findByGroupId(groupId, start, end, orderByComparator);
151            }
152    
153            /**
154            * Returns the first team in the ordered set where groupId = &#63;.
155            *
156            * @param groupId the group ID
157            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
158            * @return the first matching team
159            * @throws NoSuchTeamException if a matching team could not be found
160            */
161            public static Team findByGroupId_First(long groupId,
162                    OrderByComparator<Team> orderByComparator)
163                    throws com.liferay.portal.NoSuchTeamException {
164                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
165            }
166    
167            /**
168            * Returns the first team in the ordered set where groupId = &#63;.
169            *
170            * @param groupId the group ID
171            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
172            * @return the first matching team, or <code>null</code> if a matching team could not be found
173            */
174            public static Team fetchByGroupId_First(long groupId,
175                    OrderByComparator<Team> orderByComparator) {
176                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
177            }
178    
179            /**
180            * Returns the last team in the ordered set where groupId = &#63;.
181            *
182            * @param groupId the group ID
183            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
184            * @return the last matching team
185            * @throws NoSuchTeamException if a matching team could not be found
186            */
187            public static Team findByGroupId_Last(long groupId,
188                    OrderByComparator<Team> orderByComparator)
189                    throws com.liferay.portal.NoSuchTeamException {
190                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
191            }
192    
193            /**
194            * Returns the last team in the ordered set where groupId = &#63;.
195            *
196            * @param groupId the group ID
197            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
198            * @return the last matching team, or <code>null</code> if a matching team could not be found
199            */
200            public static Team fetchByGroupId_Last(long groupId,
201                    OrderByComparator<Team> orderByComparator) {
202                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
203            }
204    
205            /**
206            * Returns the teams before and after the current team in the ordered set where groupId = &#63;.
207            *
208            * @param teamId the primary key of the current team
209            * @param groupId the group ID
210            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
211            * @return the previous, current, and next team
212            * @throws NoSuchTeamException if a team with the primary key could not be found
213            */
214            public static Team[] findByGroupId_PrevAndNext(long teamId, long groupId,
215                    OrderByComparator<Team> orderByComparator)
216                    throws com.liferay.portal.NoSuchTeamException {
217                    return getPersistence()
218                                       .findByGroupId_PrevAndNext(teamId, groupId, orderByComparator);
219            }
220    
221            /**
222            * Returns all the teams that the user has permission to view where groupId = &#63;.
223            *
224            * @param groupId the group ID
225            * @return the matching teams that the user has permission to view
226            */
227            public static List<Team> filterFindByGroupId(long groupId) {
228                    return getPersistence().filterFindByGroupId(groupId);
229            }
230    
231            /**
232            * Returns a range of all the teams that the user has permission to view where groupId = &#63;.
233            *
234            * <p>
235            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
236            * </p>
237            *
238            * @param groupId the group ID
239            * @param start the lower bound of the range of teams
240            * @param end the upper bound of the range of teams (not inclusive)
241            * @return the range of matching teams that the user has permission to view
242            */
243            public static List<Team> filterFindByGroupId(long groupId, int start,
244                    int end) {
245                    return getPersistence().filterFindByGroupId(groupId, start, end);
246            }
247    
248            /**
249            * Returns an ordered range of all the teams that the user has permissions to view where groupId = &#63;.
250            *
251            * <p>
252            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
253            * </p>
254            *
255            * @param groupId the group ID
256            * @param start the lower bound of the range of teams
257            * @param end the upper bound of the range of teams (not inclusive)
258            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
259            * @return the ordered range of matching teams that the user has permission to view
260            */
261            public static List<Team> filterFindByGroupId(long groupId, int start,
262                    int end, OrderByComparator<Team> orderByComparator) {
263                    return getPersistence()
264                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
265            }
266    
267            /**
268            * 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;.
269            *
270            * @param teamId the primary key of the current team
271            * @param groupId the group ID
272            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
273            * @return the previous, current, and next team
274            * @throws NoSuchTeamException if a team with the primary key could not be found
275            */
276            public static Team[] filterFindByGroupId_PrevAndNext(long teamId,
277                    long groupId, OrderByComparator<Team> orderByComparator)
278                    throws com.liferay.portal.NoSuchTeamException {
279                    return getPersistence()
280                                       .filterFindByGroupId_PrevAndNext(teamId, groupId,
281                            orderByComparator);
282            }
283    
284            /**
285            * Removes all the teams where groupId = &#63; from the database.
286            *
287            * @param groupId the group ID
288            */
289            public static void removeByGroupId(long groupId) {
290                    getPersistence().removeByGroupId(groupId);
291            }
292    
293            /**
294            * Returns the number of teams where groupId = &#63;.
295            *
296            * @param groupId the group ID
297            * @return the number of matching teams
298            */
299            public static int countByGroupId(long groupId) {
300                    return getPersistence().countByGroupId(groupId);
301            }
302    
303            /**
304            * Returns the number of teams that the user has permission to view where groupId = &#63;.
305            *
306            * @param groupId the group ID
307            * @return the number of matching teams that the user has permission to view
308            */
309            public static int filterCountByGroupId(long groupId) {
310                    return getPersistence().filterCountByGroupId(groupId);
311            }
312    
313            /**
314            * Returns the team where groupId = &#63; and name = &#63; or throws a {@link NoSuchTeamException} if it could not be found.
315            *
316            * @param groupId the group ID
317            * @param name the name
318            * @return the matching team
319            * @throws NoSuchTeamException if a matching team could not be found
320            */
321            public static Team findByG_N(long groupId, java.lang.String name)
322                    throws com.liferay.portal.NoSuchTeamException {
323                    return getPersistence().findByG_N(groupId, name);
324            }
325    
326            /**
327            * Returns the team where groupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
328            *
329            * @param groupId the group ID
330            * @param name the name
331            * @return the matching team, or <code>null</code> if a matching team could not be found
332            */
333            public static Team fetchByG_N(long groupId, java.lang.String name) {
334                    return getPersistence().fetchByG_N(groupId, name);
335            }
336    
337            /**
338            * 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.
339            *
340            * @param groupId the group ID
341            * @param name the name
342            * @param retrieveFromCache whether to use the finder cache
343            * @return the matching team, or <code>null</code> if a matching team could not be found
344            */
345            public static Team fetchByG_N(long groupId, java.lang.String name,
346                    boolean retrieveFromCache) {
347                    return getPersistence().fetchByG_N(groupId, name, retrieveFromCache);
348            }
349    
350            /**
351            * Removes the team where groupId = &#63; and name = &#63; from the database.
352            *
353            * @param groupId the group ID
354            * @param name the name
355            * @return the team that was removed
356            */
357            public static Team removeByG_N(long groupId, java.lang.String name)
358                    throws com.liferay.portal.NoSuchTeamException {
359                    return getPersistence().removeByG_N(groupId, name);
360            }
361    
362            /**
363            * Returns the number of teams where groupId = &#63; and name = &#63;.
364            *
365            * @param groupId the group ID
366            * @param name the name
367            * @return the number of matching teams
368            */
369            public static int countByG_N(long groupId, java.lang.String name) {
370                    return getPersistence().countByG_N(groupId, name);
371            }
372    
373            /**
374            * Caches the team in the entity cache if it is enabled.
375            *
376            * @param team the team
377            */
378            public static void cacheResult(Team team) {
379                    getPersistence().cacheResult(team);
380            }
381    
382            /**
383            * Caches the teams in the entity cache if it is enabled.
384            *
385            * @param teams the teams
386            */
387            public static void cacheResult(List<Team> teams) {
388                    getPersistence().cacheResult(teams);
389            }
390    
391            /**
392            * Creates a new team with the primary key. Does not add the team to the database.
393            *
394            * @param teamId the primary key for the new team
395            * @return the new team
396            */
397            public static Team create(long teamId) {
398                    return getPersistence().create(teamId);
399            }
400    
401            /**
402            * Removes the team with the primary key from the database. Also notifies the appropriate model listeners.
403            *
404            * @param teamId the primary key of the team
405            * @return the team that was removed
406            * @throws NoSuchTeamException if a team with the primary key could not be found
407            */
408            public static Team remove(long teamId)
409                    throws com.liferay.portal.NoSuchTeamException {
410                    return getPersistence().remove(teamId);
411            }
412    
413            public static Team updateImpl(Team team) {
414                    return getPersistence().updateImpl(team);
415            }
416    
417            /**
418            * Returns the team with the primary key or throws a {@link NoSuchTeamException} if it could not be found.
419            *
420            * @param teamId the primary key of the team
421            * @return the team
422            * @throws NoSuchTeamException if a team with the primary key could not be found
423            */
424            public static Team findByPrimaryKey(long teamId)
425                    throws com.liferay.portal.NoSuchTeamException {
426                    return getPersistence().findByPrimaryKey(teamId);
427            }
428    
429            /**
430            * Returns the team with the primary key or returns <code>null</code> if it could not be found.
431            *
432            * @param teamId the primary key of the team
433            * @return the team, or <code>null</code> if a team with the primary key could not be found
434            */
435            public static Team fetchByPrimaryKey(long teamId) {
436                    return getPersistence().fetchByPrimaryKey(teamId);
437            }
438    
439            public static java.util.Map<java.io.Serializable, Team> fetchByPrimaryKeys(
440                    java.util.Set<java.io.Serializable> primaryKeys) {
441                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
442            }
443    
444            /**
445            * Returns all the teams.
446            *
447            * @return the teams
448            */
449            public static List<Team> findAll() {
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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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            */
464            public static List<Team> findAll(int start, int end) {
465                    return getPersistence().findAll(start, end);
466            }
467    
468            /**
469            * Returns an ordered range of all the teams.
470            *
471            * <p>
472            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
473            * </p>
474            *
475            * @param start the lower bound of the range of teams
476            * @param end the upper bound of the range of teams (not inclusive)
477            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
478            * @return the ordered range of teams
479            */
480            public static List<Team> findAll(int start, int end,
481                    OrderByComparator<Team> orderByComparator) {
482                    return getPersistence().findAll(start, end, orderByComparator);
483            }
484    
485            /**
486            * Removes all the teams from the database.
487            */
488            public static void removeAll() {
489                    getPersistence().removeAll();
490            }
491    
492            /**
493            * Returns the number of teams.
494            *
495            * @return the number of teams
496            */
497            public static int countAll() {
498                    return getPersistence().countAll();
499            }
500    
501            /**
502            * Returns the primaryKeys of users associated with the team.
503            *
504            * @param pk the primary key of the team
505            * @return long[] of the primaryKeys of users associated with the team
506            */
507            public static long[] getUserPrimaryKeys(long pk) {
508                    return getPersistence().getUserPrimaryKeys(pk);
509            }
510    
511            /**
512            * Returns all the users associated with the team.
513            *
514            * @param pk the primary key of the team
515            * @return the users associated with the team
516            */
517            public static List<com.liferay.portal.model.User> getUsers(long pk) {
518                    return getPersistence().getUsers(pk);
519            }
520    
521            /**
522            * Returns a range of all the users associated with the team.
523            *
524            * <p>
525            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
526            * </p>
527            *
528            * @param pk the primary key of the team
529            * @param start the lower bound of the range of teams
530            * @param end the upper bound of the range of teams (not inclusive)
531            * @return the range of users associated with the team
532            */
533            public static List<com.liferay.portal.model.User> getUsers(long pk,
534                    int start, int end) {
535                    return getPersistence().getUsers(pk, start, end);
536            }
537    
538            /**
539            * Returns an ordered range of all the users associated with the team.
540            *
541            * <p>
542            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
543            * </p>
544            *
545            * @param pk the primary key of the team
546            * @param start the lower bound of the range of teams
547            * @param end the upper bound of the range of teams (not inclusive)
548            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
549            * @return the ordered range of users associated with the team
550            */
551            public static List<com.liferay.portal.model.User> getUsers(long pk,
552                    int start, int end,
553                    OrderByComparator<com.liferay.portal.model.User> orderByComparator) {
554                    return getPersistence().getUsers(pk, start, end, orderByComparator);
555            }
556    
557            /**
558            * Returns the number of users associated with the team.
559            *
560            * @param pk the primary key of the team
561            * @return the number of users associated with the team
562            */
563            public static int getUsersSize(long pk) {
564                    return getPersistence().getUsersSize(pk);
565            }
566    
567            /**
568            * Returns <code>true</code> if the user is associated with the team.
569            *
570            * @param pk the primary key of the team
571            * @param userPK the primary key of the user
572            * @return <code>true</code> if the user is associated with the team; <code>false</code> otherwise
573            */
574            public static boolean containsUser(long pk, long userPK) {
575                    return getPersistence().containsUser(pk, userPK);
576            }
577    
578            /**
579            * Returns <code>true</code> if the team has any users associated with it.
580            *
581            * @param pk the primary key of the team to check for associations with users
582            * @return <code>true</code> if the team has any users associated with it; <code>false</code> otherwise
583            */
584            public static boolean containsUsers(long pk) {
585                    return getPersistence().containsUsers(pk);
586            }
587    
588            /**
589            * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
590            *
591            * @param pk the primary key of the team
592            * @param userPK the primary key of the user
593            */
594            public static void addUser(long pk, long userPK) {
595                    getPersistence().addUser(pk, userPK);
596            }
597    
598            /**
599            * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
600            *
601            * @param pk the primary key of the team
602            * @param user the user
603            */
604            public static void addUser(long pk, com.liferay.portal.model.User user) {
605                    getPersistence().addUser(pk, user);
606            }
607    
608            /**
609            * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
610            *
611            * @param pk the primary key of the team
612            * @param userPKs the primary keys of the users
613            */
614            public static void addUsers(long pk, long[] userPKs) {
615                    getPersistence().addUsers(pk, userPKs);
616            }
617    
618            /**
619            * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
620            *
621            * @param pk the primary key of the team
622            * @param users the users
623            */
624            public static void addUsers(long pk,
625                    List<com.liferay.portal.model.User> users) {
626                    getPersistence().addUsers(pk, users);
627            }
628    
629            /**
630            * Clears all associations between the team and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
631            *
632            * @param pk the primary key of the team to clear the associated users from
633            */
634            public static void clearUsers(long pk) {
635                    getPersistence().clearUsers(pk);
636            }
637    
638            /**
639            * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
640            *
641            * @param pk the primary key of the team
642            * @param userPK the primary key of the user
643            */
644            public static void removeUser(long pk, long userPK) {
645                    getPersistence().removeUser(pk, userPK);
646            }
647    
648            /**
649            * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
650            *
651            * @param pk the primary key of the team
652            * @param user the user
653            */
654            public static void removeUser(long pk, com.liferay.portal.model.User user) {
655                    getPersistence().removeUser(pk, user);
656            }
657    
658            /**
659            * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
660            *
661            * @param pk the primary key of the team
662            * @param userPKs the primary keys of the users
663            */
664            public static void removeUsers(long pk, long[] userPKs) {
665                    getPersistence().removeUsers(pk, userPKs);
666            }
667    
668            /**
669            * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
670            *
671            * @param pk the primary key of the team
672            * @param users the users
673            */
674            public static void removeUsers(long pk,
675                    List<com.liferay.portal.model.User> users) {
676                    getPersistence().removeUsers(pk, users);
677            }
678    
679            /**
680            * 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.
681            *
682            * @param pk the primary key of the team
683            * @param userPKs the primary keys of the users to be associated with the team
684            */
685            public static void setUsers(long pk, long[] userPKs) {
686                    getPersistence().setUsers(pk, userPKs);
687            }
688    
689            /**
690            * 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.
691            *
692            * @param pk the primary key of the team
693            * @param users the users to be associated with the team
694            */
695            public static void setUsers(long pk,
696                    List<com.liferay.portal.model.User> users) {
697                    getPersistence().setUsers(pk, users);
698            }
699    
700            /**
701            * Returns the primaryKeys of user groups associated with the team.
702            *
703            * @param pk the primary key of the team
704            * @return long[] of the primaryKeys of user groups associated with the team
705            */
706            public static long[] getUserGroupPrimaryKeys(long pk) {
707                    return getPersistence().getUserGroupPrimaryKeys(pk);
708            }
709    
710            /**
711            * Returns all the user groups associated with the team.
712            *
713            * @param pk the primary key of the team
714            * @return the user groups associated with the team
715            */
716            public static List<com.liferay.portal.model.UserGroup> getUserGroups(
717                    long pk) {
718                    return getPersistence().getUserGroups(pk);
719            }
720    
721            /**
722            * Returns a range of all the user groups associated with the team.
723            *
724            * <p>
725            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
726            * </p>
727            *
728            * @param pk the primary key of the team
729            * @param start the lower bound of the range of teams
730            * @param end the upper bound of the range of teams (not inclusive)
731            * @return the range of user groups associated with the team
732            */
733            public static List<com.liferay.portal.model.UserGroup> getUserGroups(
734                    long pk, int start, int end) {
735                    return getPersistence().getUserGroups(pk, start, end);
736            }
737    
738            /**
739            * Returns an ordered range of all the user groups associated with the team.
740            *
741            * <p>
742            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
743            * </p>
744            *
745            * @param pk the primary key of the team
746            * @param start the lower bound of the range of teams
747            * @param end the upper bound of the range of teams (not inclusive)
748            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
749            * @return the ordered range of user groups associated with the team
750            */
751            public static List<com.liferay.portal.model.UserGroup> getUserGroups(
752                    long pk, int start, int end,
753                    OrderByComparator<com.liferay.portal.model.UserGroup> orderByComparator) {
754                    return getPersistence().getUserGroups(pk, start, end, orderByComparator);
755            }
756    
757            /**
758            * Returns the number of user groups associated with the team.
759            *
760            * @param pk the primary key of the team
761            * @return the number of user groups associated with the team
762            */
763            public static int getUserGroupsSize(long pk) {
764                    return getPersistence().getUserGroupsSize(pk);
765            }
766    
767            /**
768            * Returns <code>true</code> if the user group is associated with the team.
769            *
770            * @param pk the primary key of the team
771            * @param userGroupPK the primary key of the user group
772            * @return <code>true</code> if the user group is associated with the team; <code>false</code> otherwise
773            */
774            public static boolean containsUserGroup(long pk, long userGroupPK) {
775                    return getPersistence().containsUserGroup(pk, userGroupPK);
776            }
777    
778            /**
779            * Returns <code>true</code> if the team has any user groups associated with it.
780            *
781            * @param pk the primary key of the team to check for associations with user groups
782            * @return <code>true</code> if the team has any user groups associated with it; <code>false</code> otherwise
783            */
784            public static boolean containsUserGroups(long pk) {
785                    return getPersistence().containsUserGroups(pk);
786            }
787    
788            /**
789            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
790            *
791            * @param pk the primary key of the team
792            * @param userGroupPK the primary key of the user group
793            */
794            public static void addUserGroup(long pk, long userGroupPK) {
795                    getPersistence().addUserGroup(pk, userGroupPK);
796            }
797    
798            /**
799            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
800            *
801            * @param pk the primary key of the team
802            * @param userGroup the user group
803            */
804            public static void addUserGroup(long pk,
805                    com.liferay.portal.model.UserGroup userGroup) {
806                    getPersistence().addUserGroup(pk, userGroup);
807            }
808    
809            /**
810            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
811            *
812            * @param pk the primary key of the team
813            * @param userGroupPKs the primary keys of the user groups
814            */
815            public static void addUserGroups(long pk, long[] userGroupPKs) {
816                    getPersistence().addUserGroups(pk, userGroupPKs);
817            }
818    
819            /**
820            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
821            *
822            * @param pk the primary key of the team
823            * @param userGroups the user groups
824            */
825            public static void addUserGroups(long pk,
826                    List<com.liferay.portal.model.UserGroup> userGroups) {
827                    getPersistence().addUserGroups(pk, userGroups);
828            }
829    
830            /**
831            * Clears all associations between the team and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
832            *
833            * @param pk the primary key of the team to clear the associated user groups from
834            */
835            public static void clearUserGroups(long pk) {
836                    getPersistence().clearUserGroups(pk);
837            }
838    
839            /**
840            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
841            *
842            * @param pk the primary key of the team
843            * @param userGroupPK the primary key of the user group
844            */
845            public static void removeUserGroup(long pk, long userGroupPK) {
846                    getPersistence().removeUserGroup(pk, userGroupPK);
847            }
848    
849            /**
850            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
851            *
852            * @param pk the primary key of the team
853            * @param userGroup the user group
854            */
855            public static void removeUserGroup(long pk,
856                    com.liferay.portal.model.UserGroup userGroup) {
857                    getPersistence().removeUserGroup(pk, userGroup);
858            }
859    
860            /**
861            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
862            *
863            * @param pk the primary key of the team
864            * @param userGroupPKs the primary keys of the user groups
865            */
866            public static void removeUserGroups(long pk, long[] userGroupPKs) {
867                    getPersistence().removeUserGroups(pk, userGroupPKs);
868            }
869    
870            /**
871            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
872            *
873            * @param pk the primary key of the team
874            * @param userGroups the user groups
875            */
876            public static void removeUserGroups(long pk,
877                    List<com.liferay.portal.model.UserGroup> userGroups) {
878                    getPersistence().removeUserGroups(pk, userGroups);
879            }
880    
881            /**
882            * 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.
883            *
884            * @param pk the primary key of the team
885            * @param userGroupPKs the primary keys of the user groups to be associated with the team
886            */
887            public static void setUserGroups(long pk, long[] userGroupPKs) {
888                    getPersistence().setUserGroups(pk, userGroupPKs);
889            }
890    
891            /**
892            * 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.
893            *
894            * @param pk the primary key of the team
895            * @param userGroups the user groups to be associated with the team
896            */
897            public static void setUserGroups(long pk,
898                    List<com.liferay.portal.model.UserGroup> userGroups) {
899                    getPersistence().setUserGroups(pk, userGroups);
900            }
901    
902            public static TeamPersistence getPersistence() {
903                    if (_persistence == null) {
904                            _persistence = (TeamPersistence)PortalBeanLocatorUtil.locate(TeamPersistence.class.getName());
905    
906                            ReferenceRegistry.registerReference(TeamUtil.class, "_persistence");
907                    }
908    
909                    return _persistence;
910            }
911    
912            /**
913             * @deprecated As of 6.2.0
914             */
915            @Deprecated
916            public void setPersistence(TeamPersistence persistence) {
917            }
918    
919            private static TeamPersistence _persistence;
920    }