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 uuid = &#63;.
110            *
111            * @param uuid the uuid
112            * @return the matching teams
113            */
114            public static List<Team> findByUuid(java.lang.String uuid) {
115                    return getPersistence().findByUuid(uuid);
116            }
117    
118            /**
119            * Returns a range of all the teams where uuid = &#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 uuid the uuid
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> findByUuid(java.lang.String uuid, int start,
131                    int end) {
132                    return getPersistence().findByUuid(uuid, start, end);
133            }
134    
135            /**
136            * Returns an ordered range of all the teams where uuid = &#63;.
137            *
138            * <p>
139            * 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.
140            * </p>
141            *
142            * @param uuid the uuid
143            * @param start the lower bound of the range of teams
144            * @param end the upper bound of the range of teams (not inclusive)
145            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
146            * @return the ordered range of matching teams
147            */
148            public static List<Team> findByUuid(java.lang.String uuid, int start,
149                    int end, OrderByComparator<Team> orderByComparator) {
150                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
151            }
152    
153            /**
154            * Returns an ordered range of all the teams where uuid = &#63;.
155            *
156            * <p>
157            * 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.
158            * </p>
159            *
160            * @param uuid the uuid
161            * @param start the lower bound of the range of teams
162            * @param end the upper bound of the range of teams (not inclusive)
163            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
164            * @param retrieveFromCache whether to retrieve from the finder cache
165            * @return the ordered range of matching teams
166            */
167            public static List<Team> findByUuid(java.lang.String uuid, int start,
168                    int end, OrderByComparator<Team> orderByComparator,
169                    boolean retrieveFromCache) {
170                    return getPersistence()
171                                       .findByUuid(uuid, start, end, orderByComparator,
172                            retrieveFromCache);
173            }
174    
175            /**
176            * Returns the first team in the ordered set where uuid = &#63;.
177            *
178            * @param uuid the uuid
179            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
180            * @return the first matching team
181            * @throws NoSuchTeamException if a matching team could not be found
182            */
183            public static Team findByUuid_First(java.lang.String uuid,
184                    OrderByComparator<Team> orderByComparator)
185                    throws com.liferay.portal.exception.NoSuchTeamException {
186                    return getPersistence().findByUuid_First(uuid, orderByComparator);
187            }
188    
189            /**
190            * Returns the first team in the ordered set where uuid = &#63;.
191            *
192            * @param uuid the uuid
193            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
194            * @return the first matching team, or <code>null</code> if a matching team could not be found
195            */
196            public static Team fetchByUuid_First(java.lang.String uuid,
197                    OrderByComparator<Team> orderByComparator) {
198                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
199            }
200    
201            /**
202            * Returns the last team in the ordered set where uuid = &#63;.
203            *
204            * @param uuid the uuid
205            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
206            * @return the last matching team
207            * @throws NoSuchTeamException if a matching team could not be found
208            */
209            public static Team findByUuid_Last(java.lang.String uuid,
210                    OrderByComparator<Team> orderByComparator)
211                    throws com.liferay.portal.exception.NoSuchTeamException {
212                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
213            }
214    
215            /**
216            * Returns the last team in the ordered set where uuid = &#63;.
217            *
218            * @param uuid the uuid
219            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
220            * @return the last matching team, or <code>null</code> if a matching team could not be found
221            */
222            public static Team fetchByUuid_Last(java.lang.String uuid,
223                    OrderByComparator<Team> orderByComparator) {
224                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
225            }
226    
227            /**
228            * Returns the teams before and after the current team in the ordered set where uuid = &#63;.
229            *
230            * @param teamId the primary key of the current team
231            * @param uuid the uuid
232            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
233            * @return the previous, current, and next team
234            * @throws NoSuchTeamException if a team with the primary key could not be found
235            */
236            public static Team[] findByUuid_PrevAndNext(long teamId,
237                    java.lang.String uuid, OrderByComparator<Team> orderByComparator)
238                    throws com.liferay.portal.exception.NoSuchTeamException {
239                    return getPersistence()
240                                       .findByUuid_PrevAndNext(teamId, uuid, orderByComparator);
241            }
242    
243            /**
244            * Removes all the teams where uuid = &#63; from the database.
245            *
246            * @param uuid the uuid
247            */
248            public static void removeByUuid(java.lang.String uuid) {
249                    getPersistence().removeByUuid(uuid);
250            }
251    
252            /**
253            * Returns the number of teams where uuid = &#63;.
254            *
255            * @param uuid the uuid
256            * @return the number of matching teams
257            */
258            public static int countByUuid(java.lang.String uuid) {
259                    return getPersistence().countByUuid(uuid);
260            }
261    
262            /**
263            * Returns the team where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchTeamException} if it could not be found.
264            *
265            * @param uuid the uuid
266            * @param groupId the group ID
267            * @return the matching team
268            * @throws NoSuchTeamException if a matching team could not be found
269            */
270            public static Team findByUUID_G(java.lang.String uuid, long groupId)
271                    throws com.liferay.portal.exception.NoSuchTeamException {
272                    return getPersistence().findByUUID_G(uuid, groupId);
273            }
274    
275            /**
276            * Returns the team where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
277            *
278            * @param uuid the uuid
279            * @param groupId the group ID
280            * @return the matching team, or <code>null</code> if a matching team could not be found
281            */
282            public static Team fetchByUUID_G(java.lang.String uuid, long groupId) {
283                    return getPersistence().fetchByUUID_G(uuid, groupId);
284            }
285    
286            /**
287            * Returns the team where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
288            *
289            * @param uuid the uuid
290            * @param groupId the group ID
291            * @param retrieveFromCache whether to retrieve from the finder cache
292            * @return the matching team, or <code>null</code> if a matching team could not be found
293            */
294            public static Team fetchByUUID_G(java.lang.String uuid, long groupId,
295                    boolean retrieveFromCache) {
296                    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
297            }
298    
299            /**
300            * Removes the team where uuid = &#63; and groupId = &#63; from the database.
301            *
302            * @param uuid the uuid
303            * @param groupId the group ID
304            * @return the team that was removed
305            */
306            public static Team removeByUUID_G(java.lang.String uuid, long groupId)
307                    throws com.liferay.portal.exception.NoSuchTeamException {
308                    return getPersistence().removeByUUID_G(uuid, groupId);
309            }
310    
311            /**
312            * Returns the number of teams where uuid = &#63; and groupId = &#63;.
313            *
314            * @param uuid the uuid
315            * @param groupId the group ID
316            * @return the number of matching teams
317            */
318            public static int countByUUID_G(java.lang.String uuid, long groupId) {
319                    return getPersistence().countByUUID_G(uuid, groupId);
320            }
321    
322            /**
323            * Returns all the teams where uuid = &#63; and companyId = &#63;.
324            *
325            * @param uuid the uuid
326            * @param companyId the company ID
327            * @return the matching teams
328            */
329            public static List<Team> findByUuid_C(java.lang.String uuid, long companyId) {
330                    return getPersistence().findByUuid_C(uuid, companyId);
331            }
332    
333            /**
334            * Returns a range of all the teams where uuid = &#63; and companyId = &#63;.
335            *
336            * <p>
337            * 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.
338            * </p>
339            *
340            * @param uuid the uuid
341            * @param companyId the company ID
342            * @param start the lower bound of the range of teams
343            * @param end the upper bound of the range of teams (not inclusive)
344            * @return the range of matching teams
345            */
346            public static List<Team> findByUuid_C(java.lang.String uuid,
347                    long companyId, int start, int end) {
348                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
349            }
350    
351            /**
352            * Returns an ordered range of all the teams where uuid = &#63; and companyId = &#63;.
353            *
354            * <p>
355            * 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.
356            * </p>
357            *
358            * @param uuid the uuid
359            * @param companyId the company ID
360            * @param start the lower bound of the range of teams
361            * @param end the upper bound of the range of teams (not inclusive)
362            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
363            * @return the ordered range of matching teams
364            */
365            public static List<Team> findByUuid_C(java.lang.String uuid,
366                    long companyId, int start, int end,
367                    OrderByComparator<Team> orderByComparator) {
368                    return getPersistence()
369                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
370            }
371    
372            /**
373            * Returns an ordered range of all the teams where uuid = &#63; and companyId = &#63;.
374            *
375            * <p>
376            * 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.
377            * </p>
378            *
379            * @param uuid the uuid
380            * @param companyId the company ID
381            * @param start the lower bound of the range of teams
382            * @param end the upper bound of the range of teams (not inclusive)
383            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
384            * @param retrieveFromCache whether to retrieve from the finder cache
385            * @return the ordered range of matching teams
386            */
387            public static List<Team> findByUuid_C(java.lang.String uuid,
388                    long companyId, int start, int end,
389                    OrderByComparator<Team> orderByComparator, boolean retrieveFromCache) {
390                    return getPersistence()
391                                       .findByUuid_C(uuid, companyId, start, end,
392                            orderByComparator, retrieveFromCache);
393            }
394    
395            /**
396            * Returns the first team in the ordered set where uuid = &#63; and companyId = &#63;.
397            *
398            * @param uuid the uuid
399            * @param companyId the company ID
400            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
401            * @return the first matching team
402            * @throws NoSuchTeamException if a matching team could not be found
403            */
404            public static Team findByUuid_C_First(java.lang.String uuid,
405                    long companyId, OrderByComparator<Team> orderByComparator)
406                    throws com.liferay.portal.exception.NoSuchTeamException {
407                    return getPersistence()
408                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
409            }
410    
411            /**
412            * Returns the first team in the ordered set where uuid = &#63; and companyId = &#63;.
413            *
414            * @param uuid the uuid
415            * @param companyId the company ID
416            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
417            * @return the first matching team, or <code>null</code> if a matching team could not be found
418            */
419            public static Team fetchByUuid_C_First(java.lang.String uuid,
420                    long companyId, OrderByComparator<Team> orderByComparator) {
421                    return getPersistence()
422                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
423            }
424    
425            /**
426            * Returns the last team in the ordered set where uuid = &#63; and companyId = &#63;.
427            *
428            * @param uuid the uuid
429            * @param companyId the company ID
430            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
431            * @return the last matching team
432            * @throws NoSuchTeamException if a matching team could not be found
433            */
434            public static Team findByUuid_C_Last(java.lang.String uuid, long companyId,
435                    OrderByComparator<Team> orderByComparator)
436                    throws com.liferay.portal.exception.NoSuchTeamException {
437                    return getPersistence()
438                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
439            }
440    
441            /**
442            * Returns the last team in the ordered set where uuid = &#63; and companyId = &#63;.
443            *
444            * @param uuid the uuid
445            * @param companyId the company ID
446            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
447            * @return the last matching team, or <code>null</code> if a matching team could not be found
448            */
449            public static Team fetchByUuid_C_Last(java.lang.String uuid,
450                    long companyId, OrderByComparator<Team> orderByComparator) {
451                    return getPersistence()
452                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
453            }
454    
455            /**
456            * Returns the teams before and after the current team in the ordered set where uuid = &#63; and companyId = &#63;.
457            *
458            * @param teamId the primary key of the current team
459            * @param uuid the uuid
460            * @param companyId the company ID
461            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
462            * @return the previous, current, and next team
463            * @throws NoSuchTeamException if a team with the primary key could not be found
464            */
465            public static Team[] findByUuid_C_PrevAndNext(long teamId,
466                    java.lang.String uuid, long companyId,
467                    OrderByComparator<Team> orderByComparator)
468                    throws com.liferay.portal.exception.NoSuchTeamException {
469                    return getPersistence()
470                                       .findByUuid_C_PrevAndNext(teamId, uuid, companyId,
471                            orderByComparator);
472            }
473    
474            /**
475            * Removes all the teams where uuid = &#63; and companyId = &#63; from the database.
476            *
477            * @param uuid the uuid
478            * @param companyId the company ID
479            */
480            public static void removeByUuid_C(java.lang.String uuid, long companyId) {
481                    getPersistence().removeByUuid_C(uuid, companyId);
482            }
483    
484            /**
485            * Returns the number of teams where uuid = &#63; and companyId = &#63;.
486            *
487            * @param uuid the uuid
488            * @param companyId the company ID
489            * @return the number of matching teams
490            */
491            public static int countByUuid_C(java.lang.String uuid, long companyId) {
492                    return getPersistence().countByUuid_C(uuid, companyId);
493            }
494    
495            /**
496            * Returns all the teams where groupId = &#63;.
497            *
498            * @param groupId the group ID
499            * @return the matching teams
500            */
501            public static List<Team> findByGroupId(long groupId) {
502                    return getPersistence().findByGroupId(groupId);
503            }
504    
505            /**
506            * Returns a range of all the teams where groupId = &#63;.
507            *
508            * <p>
509            * 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.
510            * </p>
511            *
512            * @param groupId the group ID
513            * @param start the lower bound of the range of teams
514            * @param end the upper bound of the range of teams (not inclusive)
515            * @return the range of matching teams
516            */
517            public static List<Team> findByGroupId(long groupId, int start, int end) {
518                    return getPersistence().findByGroupId(groupId, start, end);
519            }
520    
521            /**
522            * Returns an ordered range of all the teams where groupId = &#63;.
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 groupId the group ID
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            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
532            * @return the ordered range of matching teams
533            */
534            public static List<Team> findByGroupId(long groupId, int start, int end,
535                    OrderByComparator<Team> orderByComparator) {
536                    return getPersistence()
537                                       .findByGroupId(groupId, start, end, orderByComparator);
538            }
539    
540            /**
541            * Returns an ordered range of all the teams where groupId = &#63;.
542            *
543            * <p>
544            * 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.
545            * </p>
546            *
547            * @param groupId the group ID
548            * @param start the lower bound of the range of teams
549            * @param end the upper bound of the range of teams (not inclusive)
550            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
551            * @param retrieveFromCache whether to retrieve from the finder cache
552            * @return the ordered range of matching teams
553            */
554            public static List<Team> findByGroupId(long groupId, int start, int end,
555                    OrderByComparator<Team> orderByComparator, boolean retrieveFromCache) {
556                    return getPersistence()
557                                       .findByGroupId(groupId, start, end, orderByComparator,
558                            retrieveFromCache);
559            }
560    
561            /**
562            * Returns the first team in the ordered set where groupId = &#63;.
563            *
564            * @param groupId the group ID
565            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
566            * @return the first matching team
567            * @throws NoSuchTeamException if a matching team could not be found
568            */
569            public static Team findByGroupId_First(long groupId,
570                    OrderByComparator<Team> orderByComparator)
571                    throws com.liferay.portal.exception.NoSuchTeamException {
572                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
573            }
574    
575            /**
576            * Returns the first team in the ordered set where groupId = &#63;.
577            *
578            * @param groupId the group ID
579            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
580            * @return the first matching team, or <code>null</code> if a matching team could not be found
581            */
582            public static Team fetchByGroupId_First(long groupId,
583                    OrderByComparator<Team> orderByComparator) {
584                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
585            }
586    
587            /**
588            * Returns the last team in the ordered set where groupId = &#63;.
589            *
590            * @param groupId the group ID
591            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
592            * @return the last matching team
593            * @throws NoSuchTeamException if a matching team could not be found
594            */
595            public static Team findByGroupId_Last(long groupId,
596                    OrderByComparator<Team> orderByComparator)
597                    throws com.liferay.portal.exception.NoSuchTeamException {
598                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
599            }
600    
601            /**
602            * Returns the last team in the ordered set where groupId = &#63;.
603            *
604            * @param groupId the group ID
605            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
606            * @return the last matching team, or <code>null</code> if a matching team could not be found
607            */
608            public static Team fetchByGroupId_Last(long groupId,
609                    OrderByComparator<Team> orderByComparator) {
610                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
611            }
612    
613            /**
614            * Returns the teams before and after the current team in the ordered set where groupId = &#63;.
615            *
616            * @param teamId the primary key of the current team
617            * @param groupId the group ID
618            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
619            * @return the previous, current, and next team
620            * @throws NoSuchTeamException if a team with the primary key could not be found
621            */
622            public static Team[] findByGroupId_PrevAndNext(long teamId, long groupId,
623                    OrderByComparator<Team> orderByComparator)
624                    throws com.liferay.portal.exception.NoSuchTeamException {
625                    return getPersistence()
626                                       .findByGroupId_PrevAndNext(teamId, groupId, orderByComparator);
627            }
628    
629            /**
630            * Returns all the teams that the user has permission to view where groupId = &#63;.
631            *
632            * @param groupId the group ID
633            * @return the matching teams that the user has permission to view
634            */
635            public static List<Team> filterFindByGroupId(long groupId) {
636                    return getPersistence().filterFindByGroupId(groupId);
637            }
638    
639            /**
640            * Returns a range of all the teams that the user has permission to view where groupId = &#63;.
641            *
642            * <p>
643            * 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.
644            * </p>
645            *
646            * @param groupId the group ID
647            * @param start the lower bound of the range of teams
648            * @param end the upper bound of the range of teams (not inclusive)
649            * @return the range of matching teams that the user has permission to view
650            */
651            public static List<Team> filterFindByGroupId(long groupId, int start,
652                    int end) {
653                    return getPersistence().filterFindByGroupId(groupId, start, end);
654            }
655    
656            /**
657            * Returns an ordered range of all the teams that the user has permissions to view where groupId = &#63;.
658            *
659            * <p>
660            * 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.
661            * </p>
662            *
663            * @param groupId the group ID
664            * @param start the lower bound of the range of teams
665            * @param end the upper bound of the range of teams (not inclusive)
666            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
667            * @return the ordered range of matching teams that the user has permission to view
668            */
669            public static List<Team> filterFindByGroupId(long groupId, int start,
670                    int end, OrderByComparator<Team> orderByComparator) {
671                    return getPersistence()
672                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
673            }
674    
675            /**
676            * 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;.
677            *
678            * @param teamId the primary key of the current team
679            * @param groupId the group ID
680            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
681            * @return the previous, current, and next team
682            * @throws NoSuchTeamException if a team with the primary key could not be found
683            */
684            public static Team[] filterFindByGroupId_PrevAndNext(long teamId,
685                    long groupId, OrderByComparator<Team> orderByComparator)
686                    throws com.liferay.portal.exception.NoSuchTeamException {
687                    return getPersistence()
688                                       .filterFindByGroupId_PrevAndNext(teamId, groupId,
689                            orderByComparator);
690            }
691    
692            /**
693            * Removes all the teams where groupId = &#63; from the database.
694            *
695            * @param groupId the group ID
696            */
697            public static void removeByGroupId(long groupId) {
698                    getPersistence().removeByGroupId(groupId);
699            }
700    
701            /**
702            * Returns the number of teams where groupId = &#63;.
703            *
704            * @param groupId the group ID
705            * @return the number of matching teams
706            */
707            public static int countByGroupId(long groupId) {
708                    return getPersistence().countByGroupId(groupId);
709            }
710    
711            /**
712            * Returns the number of teams that the user has permission to view where groupId = &#63;.
713            *
714            * @param groupId the group ID
715            * @return the number of matching teams that the user has permission to view
716            */
717            public static int filterCountByGroupId(long groupId) {
718                    return getPersistence().filterCountByGroupId(groupId);
719            }
720    
721            /**
722            * Returns the team where groupId = &#63; and name = &#63; or throws a {@link NoSuchTeamException} if it could not be found.
723            *
724            * @param groupId the group ID
725            * @param name the name
726            * @return the matching team
727            * @throws NoSuchTeamException if a matching team could not be found
728            */
729            public static Team findByG_N(long groupId, java.lang.String name)
730                    throws com.liferay.portal.exception.NoSuchTeamException {
731                    return getPersistence().findByG_N(groupId, name);
732            }
733    
734            /**
735            * Returns the team where groupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
736            *
737            * @param groupId the group ID
738            * @param name the name
739            * @return the matching team, or <code>null</code> if a matching team could not be found
740            */
741            public static Team fetchByG_N(long groupId, java.lang.String name) {
742                    return getPersistence().fetchByG_N(groupId, name);
743            }
744    
745            /**
746            * 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.
747            *
748            * @param groupId the group ID
749            * @param name the name
750            * @param retrieveFromCache whether to retrieve from the finder cache
751            * @return the matching team, or <code>null</code> if a matching team could not be found
752            */
753            public static Team fetchByG_N(long groupId, java.lang.String name,
754                    boolean retrieveFromCache) {
755                    return getPersistence().fetchByG_N(groupId, name, retrieveFromCache);
756            }
757    
758            /**
759            * Removes the team where groupId = &#63; and name = &#63; from the database.
760            *
761            * @param groupId the group ID
762            * @param name the name
763            * @return the team that was removed
764            */
765            public static Team removeByG_N(long groupId, java.lang.String name)
766                    throws com.liferay.portal.exception.NoSuchTeamException {
767                    return getPersistence().removeByG_N(groupId, name);
768            }
769    
770            /**
771            * Returns the number of teams where groupId = &#63; and name = &#63;.
772            *
773            * @param groupId the group ID
774            * @param name the name
775            * @return the number of matching teams
776            */
777            public static int countByG_N(long groupId, java.lang.String name) {
778                    return getPersistence().countByG_N(groupId, name);
779            }
780    
781            /**
782            * Caches the team in the entity cache if it is enabled.
783            *
784            * @param team the team
785            */
786            public static void cacheResult(Team team) {
787                    getPersistence().cacheResult(team);
788            }
789    
790            /**
791            * Caches the teams in the entity cache if it is enabled.
792            *
793            * @param teams the teams
794            */
795            public static void cacheResult(List<Team> teams) {
796                    getPersistence().cacheResult(teams);
797            }
798    
799            /**
800            * Creates a new team with the primary key. Does not add the team to the database.
801            *
802            * @param teamId the primary key for the new team
803            * @return the new team
804            */
805            public static Team create(long teamId) {
806                    return getPersistence().create(teamId);
807            }
808    
809            /**
810            * Removes the team with the primary key from the database. Also notifies the appropriate model listeners.
811            *
812            * @param teamId the primary key of the team
813            * @return the team that was removed
814            * @throws NoSuchTeamException if a team with the primary key could not be found
815            */
816            public static Team remove(long teamId)
817                    throws com.liferay.portal.exception.NoSuchTeamException {
818                    return getPersistence().remove(teamId);
819            }
820    
821            public static Team updateImpl(Team team) {
822                    return getPersistence().updateImpl(team);
823            }
824    
825            /**
826            * Returns the team with the primary key or throws a {@link NoSuchTeamException} if it could not be found.
827            *
828            * @param teamId the primary key of the team
829            * @return the team
830            * @throws NoSuchTeamException if a team with the primary key could not be found
831            */
832            public static Team findByPrimaryKey(long teamId)
833                    throws com.liferay.portal.exception.NoSuchTeamException {
834                    return getPersistence().findByPrimaryKey(teamId);
835            }
836    
837            /**
838            * Returns the team with the primary key or returns <code>null</code> if it could not be found.
839            *
840            * @param teamId the primary key of the team
841            * @return the team, or <code>null</code> if a team with the primary key could not be found
842            */
843            public static Team fetchByPrimaryKey(long teamId) {
844                    return getPersistence().fetchByPrimaryKey(teamId);
845            }
846    
847            public static java.util.Map<java.io.Serializable, Team> fetchByPrimaryKeys(
848                    java.util.Set<java.io.Serializable> primaryKeys) {
849                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
850            }
851    
852            /**
853            * Returns all the teams.
854            *
855            * @return the teams
856            */
857            public static List<Team> findAll() {
858                    return getPersistence().findAll();
859            }
860    
861            /**
862            * Returns a range of all the teams.
863            *
864            * <p>
865            * 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.
866            * </p>
867            *
868            * @param start the lower bound of the range of teams
869            * @param end the upper bound of the range of teams (not inclusive)
870            * @return the range of teams
871            */
872            public static List<Team> findAll(int start, int end) {
873                    return getPersistence().findAll(start, end);
874            }
875    
876            /**
877            * Returns an ordered range of all the teams.
878            *
879            * <p>
880            * 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.
881            * </p>
882            *
883            * @param start the lower bound of the range of teams
884            * @param end the upper bound of the range of teams (not inclusive)
885            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
886            * @return the ordered range of teams
887            */
888            public static List<Team> findAll(int start, int end,
889                    OrderByComparator<Team> orderByComparator) {
890                    return getPersistence().findAll(start, end, orderByComparator);
891            }
892    
893            /**
894            * Returns an ordered range of all the teams.
895            *
896            * <p>
897            * 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.
898            * </p>
899            *
900            * @param start the lower bound of the range of teams
901            * @param end the upper bound of the range of teams (not inclusive)
902            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
903            * @param retrieveFromCache whether to retrieve from the finder cache
904            * @return the ordered range of teams
905            */
906            public static List<Team> findAll(int start, int end,
907                    OrderByComparator<Team> orderByComparator, boolean retrieveFromCache) {
908                    return getPersistence()
909                                       .findAll(start, end, orderByComparator, retrieveFromCache);
910            }
911    
912            /**
913            * Removes all the teams from the database.
914            */
915            public static void removeAll() {
916                    getPersistence().removeAll();
917            }
918    
919            /**
920            * Returns the number of teams.
921            *
922            * @return the number of teams
923            */
924            public static int countAll() {
925                    return getPersistence().countAll();
926            }
927    
928            /**
929            * Returns the primaryKeys of users associated with the team.
930            *
931            * @param pk the primary key of the team
932            * @return long[] of the primaryKeys of users associated with the team
933            */
934            public static long[] getUserPrimaryKeys(long pk) {
935                    return getPersistence().getUserPrimaryKeys(pk);
936            }
937    
938            /**
939            * Returns all the users associated with the team.
940            *
941            * @param pk the primary key of the team
942            * @return the users associated with the team
943            */
944            public static List<com.liferay.portal.model.User> getUsers(long pk) {
945                    return getPersistence().getUsers(pk);
946            }
947    
948            /**
949            * Returns a range of all the users associated with the team.
950            *
951            * <p>
952            * 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.
953            * </p>
954            *
955            * @param pk the primary key of the team
956            * @param start the lower bound of the range of teams
957            * @param end the upper bound of the range of teams (not inclusive)
958            * @return the range of users associated with the team
959            */
960            public static List<com.liferay.portal.model.User> getUsers(long pk,
961                    int start, int end) {
962                    return getPersistence().getUsers(pk, start, end);
963            }
964    
965            /**
966            * Returns an ordered range of all the users associated with the team.
967            *
968            * <p>
969            * 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.
970            * </p>
971            *
972            * @param pk the primary key of the team
973            * @param start the lower bound of the range of teams
974            * @param end the upper bound of the range of teams (not inclusive)
975            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
976            * @return the ordered range of users associated with the team
977            */
978            public static List<com.liferay.portal.model.User> getUsers(long pk,
979                    int start, int end,
980                    OrderByComparator<com.liferay.portal.model.User> orderByComparator) {
981                    return getPersistence().getUsers(pk, start, end, orderByComparator);
982            }
983    
984            /**
985            * Returns the number of users associated with the team.
986            *
987            * @param pk the primary key of the team
988            * @return the number of users associated with the team
989            */
990            public static int getUsersSize(long pk) {
991                    return getPersistence().getUsersSize(pk);
992            }
993    
994            /**
995            * Returns <code>true</code> if the user is associated with the team.
996            *
997            * @param pk the primary key of the team
998            * @param userPK the primary key of the user
999            * @return <code>true</code> if the user is associated with the team; <code>false</code> otherwise
1000            */
1001            public static boolean containsUser(long pk, long userPK) {
1002                    return getPersistence().containsUser(pk, userPK);
1003            }
1004    
1005            /**
1006            * Returns <code>true</code> if the team has any users associated with it.
1007            *
1008            * @param pk the primary key of the team to check for associations with users
1009            * @return <code>true</code> if the team has any users associated with it; <code>false</code> otherwise
1010            */
1011            public static boolean containsUsers(long pk) {
1012                    return getPersistence().containsUsers(pk);
1013            }
1014    
1015            /**
1016            * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1017            *
1018            * @param pk the primary key of the team
1019            * @param userPK the primary key of the user
1020            */
1021            public static void addUser(long pk, long userPK) {
1022                    getPersistence().addUser(pk, userPK);
1023            }
1024    
1025            /**
1026            * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1027            *
1028            * @param pk the primary key of the team
1029            * @param user the user
1030            */
1031            public static void addUser(long pk, com.liferay.portal.model.User user) {
1032                    getPersistence().addUser(pk, user);
1033            }
1034    
1035            /**
1036            * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1037            *
1038            * @param pk the primary key of the team
1039            * @param userPKs the primary keys of the users
1040            */
1041            public static void addUsers(long pk, long[] userPKs) {
1042                    getPersistence().addUsers(pk, userPKs);
1043            }
1044    
1045            /**
1046            * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1047            *
1048            * @param pk the primary key of the team
1049            * @param users the users
1050            */
1051            public static void addUsers(long pk,
1052                    List<com.liferay.portal.model.User> users) {
1053                    getPersistence().addUsers(pk, users);
1054            }
1055    
1056            /**
1057            * Clears all associations between the team and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1058            *
1059            * @param pk the primary key of the team to clear the associated users from
1060            */
1061            public static void clearUsers(long pk) {
1062                    getPersistence().clearUsers(pk);
1063            }
1064    
1065            /**
1066            * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1067            *
1068            * @param pk the primary key of the team
1069            * @param userPK the primary key of the user
1070            */
1071            public static void removeUser(long pk, long userPK) {
1072                    getPersistence().removeUser(pk, userPK);
1073            }
1074    
1075            /**
1076            * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1077            *
1078            * @param pk the primary key of the team
1079            * @param user the user
1080            */
1081            public static void removeUser(long pk, com.liferay.portal.model.User user) {
1082                    getPersistence().removeUser(pk, user);
1083            }
1084    
1085            /**
1086            * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1087            *
1088            * @param pk the primary key of the team
1089            * @param userPKs the primary keys of the users
1090            */
1091            public static void removeUsers(long pk, long[] userPKs) {
1092                    getPersistence().removeUsers(pk, userPKs);
1093            }
1094    
1095            /**
1096            * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1097            *
1098            * @param pk the primary key of the team
1099            * @param users the users
1100            */
1101            public static void removeUsers(long pk,
1102                    List<com.liferay.portal.model.User> users) {
1103                    getPersistence().removeUsers(pk, users);
1104            }
1105    
1106            /**
1107            * 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.
1108            *
1109            * @param pk the primary key of the team
1110            * @param userPKs the primary keys of the users to be associated with the team
1111            */
1112            public static void setUsers(long pk, long[] userPKs) {
1113                    getPersistence().setUsers(pk, userPKs);
1114            }
1115    
1116            /**
1117            * 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.
1118            *
1119            * @param pk the primary key of the team
1120            * @param users the users to be associated with the team
1121            */
1122            public static void setUsers(long pk,
1123                    List<com.liferay.portal.model.User> users) {
1124                    getPersistence().setUsers(pk, users);
1125            }
1126    
1127            /**
1128            * Returns the primaryKeys of user groups associated with the team.
1129            *
1130            * @param pk the primary key of the team
1131            * @return long[] of the primaryKeys of user groups associated with the team
1132            */
1133            public static long[] getUserGroupPrimaryKeys(long pk) {
1134                    return getPersistence().getUserGroupPrimaryKeys(pk);
1135            }
1136    
1137            /**
1138            * Returns all the user groups associated with the team.
1139            *
1140            * @param pk the primary key of the team
1141            * @return the user groups associated with the team
1142            */
1143            public static List<com.liferay.portal.model.UserGroup> getUserGroups(
1144                    long pk) {
1145                    return getPersistence().getUserGroups(pk);
1146            }
1147    
1148            /**
1149            * Returns a range of all the user groups associated with the team.
1150            *
1151            * <p>
1152            * 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.
1153            * </p>
1154            *
1155            * @param pk the primary key of the team
1156            * @param start the lower bound of the range of teams
1157            * @param end the upper bound of the range of teams (not inclusive)
1158            * @return the range of user groups associated with the team
1159            */
1160            public static List<com.liferay.portal.model.UserGroup> getUserGroups(
1161                    long pk, int start, int end) {
1162                    return getPersistence().getUserGroups(pk, start, end);
1163            }
1164    
1165            /**
1166            * Returns an ordered range of all the user groups associated with the team.
1167            *
1168            * <p>
1169            * 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.
1170            * </p>
1171            *
1172            * @param pk the primary key of the team
1173            * @param start the lower bound of the range of teams
1174            * @param end the upper bound of the range of teams (not inclusive)
1175            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1176            * @return the ordered range of user groups associated with the team
1177            */
1178            public static List<com.liferay.portal.model.UserGroup> getUserGroups(
1179                    long pk, int start, int end,
1180                    OrderByComparator<com.liferay.portal.model.UserGroup> orderByComparator) {
1181                    return getPersistence().getUserGroups(pk, start, end, orderByComparator);
1182            }
1183    
1184            /**
1185            * Returns the number of user groups associated with the team.
1186            *
1187            * @param pk the primary key of the team
1188            * @return the number of user groups associated with the team
1189            */
1190            public static int getUserGroupsSize(long pk) {
1191                    return getPersistence().getUserGroupsSize(pk);
1192            }
1193    
1194            /**
1195            * Returns <code>true</code> if the user group is associated with the team.
1196            *
1197            * @param pk the primary key of the team
1198            * @param userGroupPK the primary key of the user group
1199            * @return <code>true</code> if the user group is associated with the team; <code>false</code> otherwise
1200            */
1201            public static boolean containsUserGroup(long pk, long userGroupPK) {
1202                    return getPersistence().containsUserGroup(pk, userGroupPK);
1203            }
1204    
1205            /**
1206            * Returns <code>true</code> if the team has any user groups associated with it.
1207            *
1208            * @param pk the primary key of the team to check for associations with user groups
1209            * @return <code>true</code> if the team has any user groups associated with it; <code>false</code> otherwise
1210            */
1211            public static boolean containsUserGroups(long pk) {
1212                    return getPersistence().containsUserGroups(pk);
1213            }
1214    
1215            /**
1216            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1217            *
1218            * @param pk the primary key of the team
1219            * @param userGroupPK the primary key of the user group
1220            */
1221            public static void addUserGroup(long pk, long userGroupPK) {
1222                    getPersistence().addUserGroup(pk, userGroupPK);
1223            }
1224    
1225            /**
1226            * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1227            *
1228            * @param pk the primary key of the team
1229            * @param userGroup the user group
1230            */
1231            public static void addUserGroup(long pk,
1232                    com.liferay.portal.model.UserGroup userGroup) {
1233                    getPersistence().addUserGroup(pk, userGroup);
1234            }
1235    
1236            /**
1237            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1238            *
1239            * @param pk the primary key of the team
1240            * @param userGroupPKs the primary keys of the user groups
1241            */
1242            public static void addUserGroups(long pk, long[] userGroupPKs) {
1243                    getPersistence().addUserGroups(pk, userGroupPKs);
1244            }
1245    
1246            /**
1247            * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1248            *
1249            * @param pk the primary key of the team
1250            * @param userGroups the user groups
1251            */
1252            public static void addUserGroups(long pk,
1253                    List<com.liferay.portal.model.UserGroup> userGroups) {
1254                    getPersistence().addUserGroups(pk, userGroups);
1255            }
1256    
1257            /**
1258            * Clears all associations between the team and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1259            *
1260            * @param pk the primary key of the team to clear the associated user groups from
1261            */
1262            public static void clearUserGroups(long pk) {
1263                    getPersistence().clearUserGroups(pk);
1264            }
1265    
1266            /**
1267            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1268            *
1269            * @param pk the primary key of the team
1270            * @param userGroupPK the primary key of the user group
1271            */
1272            public static void removeUserGroup(long pk, long userGroupPK) {
1273                    getPersistence().removeUserGroup(pk, userGroupPK);
1274            }
1275    
1276            /**
1277            * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1278            *
1279            * @param pk the primary key of the team
1280            * @param userGroup the user group
1281            */
1282            public static void removeUserGroup(long pk,
1283                    com.liferay.portal.model.UserGroup userGroup) {
1284                    getPersistence().removeUserGroup(pk, userGroup);
1285            }
1286    
1287            /**
1288            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1289            *
1290            * @param pk the primary key of the team
1291            * @param userGroupPKs the primary keys of the user groups
1292            */
1293            public static void removeUserGroups(long pk, long[] userGroupPKs) {
1294                    getPersistence().removeUserGroups(pk, userGroupPKs);
1295            }
1296    
1297            /**
1298            * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1299            *
1300            * @param pk the primary key of the team
1301            * @param userGroups the user groups
1302            */
1303            public static void removeUserGroups(long pk,
1304                    List<com.liferay.portal.model.UserGroup> userGroups) {
1305                    getPersistence().removeUserGroups(pk, userGroups);
1306            }
1307    
1308            /**
1309            * 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.
1310            *
1311            * @param pk the primary key of the team
1312            * @param userGroupPKs the primary keys of the user groups to be associated with the team
1313            */
1314            public static void setUserGroups(long pk, long[] userGroupPKs) {
1315                    getPersistence().setUserGroups(pk, userGroupPKs);
1316            }
1317    
1318            /**
1319            * 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.
1320            *
1321            * @param pk the primary key of the team
1322            * @param userGroups the user groups to be associated with the team
1323            */
1324            public static void setUserGroups(long pk,
1325                    List<com.liferay.portal.model.UserGroup> userGroups) {
1326                    getPersistence().setUserGroups(pk, userGroups);
1327            }
1328    
1329            public static java.util.Set<java.lang.String> getBadColumnNames() {
1330                    return getPersistence().getBadColumnNames();
1331            }
1332    
1333            public static TeamPersistence getPersistence() {
1334                    if (_persistence == null) {
1335                            _persistence = (TeamPersistence)PortalBeanLocatorUtil.locate(TeamPersistence.class.getName());
1336    
1337                            ReferenceRegistry.registerReference(TeamUtil.class, "_persistence");
1338                    }
1339    
1340                    return _persistence;
1341            }
1342    
1343            private static TeamPersistence _persistence;
1344    }