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