001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.UserGroup;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the user group service. This utility wraps {@link UserGroupPersistenceImpl} 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 UserGroupPersistence
036     * @see UserGroupPersistenceImpl
037     * @generated
038     */
039    public class UserGroupUtil {
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(UserGroup userGroup) {
057                    getPersistence().clearCache(userGroup);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<UserGroup> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) 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<UserGroup> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<UserGroup> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
098             */
099            public static UserGroup update(UserGroup userGroup, boolean merge)
100                    throws SystemException {
101                    return getPersistence().update(userGroup, merge);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
106             */
107            public static UserGroup update(UserGroup userGroup, boolean merge,
108                    ServiceContext serviceContext) throws SystemException {
109                    return getPersistence().update(userGroup, merge, serviceContext);
110            }
111    
112            /**
113            * Caches the user group in the entity cache if it is enabled.
114            *
115            * @param userGroup the user group
116            */
117            public static void cacheResult(com.liferay.portal.model.UserGroup userGroup) {
118                    getPersistence().cacheResult(userGroup);
119            }
120    
121            /**
122            * Caches the user groups in the entity cache if it is enabled.
123            *
124            * @param userGroups the user groups
125            */
126            public static void cacheResult(
127                    java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
128                    getPersistence().cacheResult(userGroups);
129            }
130    
131            /**
132            * Creates a new user group with the primary key. Does not add the user group to the database.
133            *
134            * @param userGroupId the primary key for the new user group
135            * @return the new user group
136            */
137            public static com.liferay.portal.model.UserGroup create(long userGroupId) {
138                    return getPersistence().create(userGroupId);
139            }
140    
141            /**
142            * Removes the user group with the primary key from the database. Also notifies the appropriate model listeners.
143            *
144            * @param userGroupId the primary key of the user group
145            * @return the user group that was removed
146            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
147            * @throws SystemException if a system exception occurred
148            */
149            public static com.liferay.portal.model.UserGroup remove(long userGroupId)
150                    throws com.liferay.portal.NoSuchUserGroupException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    return getPersistence().remove(userGroupId);
153            }
154    
155            public static com.liferay.portal.model.UserGroup updateImpl(
156                    com.liferay.portal.model.UserGroup userGroup, boolean merge)
157                    throws com.liferay.portal.kernel.exception.SystemException {
158                    return getPersistence().updateImpl(userGroup, merge);
159            }
160    
161            /**
162            * Returns the user group with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found.
163            *
164            * @param userGroupId the primary key of the user group
165            * @return the user group
166            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
167            * @throws SystemException if a system exception occurred
168            */
169            public static com.liferay.portal.model.UserGroup findByPrimaryKey(
170                    long userGroupId)
171                    throws com.liferay.portal.NoSuchUserGroupException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return getPersistence().findByPrimaryKey(userGroupId);
174            }
175    
176            /**
177            * Returns the user group with the primary key or returns <code>null</code> if it could not be found.
178            *
179            * @param userGroupId the primary key of the user group
180            * @return the user group, or <code>null</code> if a user group with the primary key could not be found
181            * @throws SystemException if a system exception occurred
182            */
183            public static com.liferay.portal.model.UserGroup fetchByPrimaryKey(
184                    long userGroupId)
185                    throws com.liferay.portal.kernel.exception.SystemException {
186                    return getPersistence().fetchByPrimaryKey(userGroupId);
187            }
188    
189            /**
190            * Returns all the user groups where companyId = &#63;.
191            *
192            * @param companyId the company ID
193            * @return the matching user groups
194            * @throws SystemException if a system exception occurred
195            */
196            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
197                    long companyId)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getPersistence().findByCompanyId(companyId);
200            }
201    
202            /**
203            * Returns a range of all the user groups where companyId = &#63;.
204            *
205            * <p>
206            * 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.
207            * </p>
208            *
209            * @param companyId the company ID
210            * @param start the lower bound of the range of user groups
211            * @param end the upper bound of the range of user groups (not inclusive)
212            * @return the range of matching user groups
213            * @throws SystemException if a system exception occurred
214            */
215            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
216                    long companyId, int start, int end)
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return getPersistence().findByCompanyId(companyId, start, end);
219            }
220    
221            /**
222            * Returns an ordered range of all the user groups where companyId = &#63;.
223            *
224            * <p>
225            * 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.
226            * </p>
227            *
228            * @param companyId the company ID
229            * @param start the lower bound of the range of user groups
230            * @param end the upper bound of the range of user groups (not inclusive)
231            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
232            * @return the ordered range of matching user groups
233            * @throws SystemException if a system exception occurred
234            */
235            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
236                    long companyId, int start, int end,
237                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
238                    throws com.liferay.portal.kernel.exception.SystemException {
239                    return getPersistence()
240                                       .findByCompanyId(companyId, start, end, orderByComparator);
241            }
242    
243            /**
244            * Returns the first user group in the ordered set where companyId = &#63;.
245            *
246            * <p>
247            * 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.
248            * </p>
249            *
250            * @param companyId the company ID
251            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
252            * @return the first matching user group
253            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
254            * @throws SystemException if a system exception occurred
255            */
256            public static com.liferay.portal.model.UserGroup findByCompanyId_First(
257                    long companyId,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.NoSuchUserGroupException,
260                            com.liferay.portal.kernel.exception.SystemException {
261                    return getPersistence()
262                                       .findByCompanyId_First(companyId, orderByComparator);
263            }
264    
265            /**
266            * Returns the last user group in the ordered set where companyId = &#63;.
267            *
268            * <p>
269            * 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.
270            * </p>
271            *
272            * @param companyId the company ID
273            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
274            * @return the last matching user group
275            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
276            * @throws SystemException if a system exception occurred
277            */
278            public static com.liferay.portal.model.UserGroup findByCompanyId_Last(
279                    long companyId,
280                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
281                    throws com.liferay.portal.NoSuchUserGroupException,
282                            com.liferay.portal.kernel.exception.SystemException {
283                    return getPersistence()
284                                       .findByCompanyId_Last(companyId, orderByComparator);
285            }
286    
287            /**
288            * Returns the user groups before and after the current user group in the ordered set where companyId = &#63;.
289            *
290            * <p>
291            * 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.
292            * </p>
293            *
294            * @param userGroupId the primary key of the current user group
295            * @param companyId the company ID
296            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
297            * @return the previous, current, and next user group
298            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
299            * @throws SystemException if a system exception occurred
300            */
301            public static com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
302                    long userGroupId, long companyId,
303                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
304                    throws com.liferay.portal.NoSuchUserGroupException,
305                            com.liferay.portal.kernel.exception.SystemException {
306                    return getPersistence()
307                                       .findByCompanyId_PrevAndNext(userGroupId, companyId,
308                            orderByComparator);
309            }
310    
311            /**
312            * Returns all the user groups that the user has permission to view where companyId = &#63;.
313            *
314            * @param companyId the company ID
315            * @return the matching user groups that the user has permission to view
316            * @throws SystemException if a system exception occurred
317            */
318            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
319                    long companyId)
320                    throws com.liferay.portal.kernel.exception.SystemException {
321                    return getPersistence().filterFindByCompanyId(companyId);
322            }
323    
324            /**
325            * Returns a range of all the user groups that the user has permission to view where companyId = &#63;.
326            *
327            * <p>
328            * 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.
329            * </p>
330            *
331            * @param companyId the company ID
332            * @param start the lower bound of the range of user groups
333            * @param end the upper bound of the range of user groups (not inclusive)
334            * @return the range of matching user groups that the user has permission to view
335            * @throws SystemException if a system exception occurred
336            */
337            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
338                    long companyId, int start, int end)
339                    throws com.liferay.portal.kernel.exception.SystemException {
340                    return getPersistence().filterFindByCompanyId(companyId, start, end);
341            }
342    
343            /**
344            * Returns an ordered range of all the user groups that the user has permissions to view where companyId = &#63;.
345            *
346            * <p>
347            * 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.
348            * </p>
349            *
350            * @param companyId the company ID
351            * @param start the lower bound of the range of user groups
352            * @param end the upper bound of the range of user groups (not inclusive)
353            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
354            * @return the ordered range of matching user groups that the user has permission to view
355            * @throws SystemException if a system exception occurred
356            */
357            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
358                    long companyId, int start, int end,
359                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence()
362                                       .filterFindByCompanyId(companyId, start, end,
363                            orderByComparator);
364            }
365    
366            /**
367            * Returns the user groups before and after the current user group in the ordered set of user groups that the user has permission to view where companyId = &#63;.
368            *
369            * @param userGroupId the primary key of the current user group
370            * @param companyId the company ID
371            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
372            * @return the previous, current, and next user group
373            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
374            * @throws SystemException if a system exception occurred
375            */
376            public static com.liferay.portal.model.UserGroup[] filterFindByCompanyId_PrevAndNext(
377                    long userGroupId, long companyId,
378                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
379                    throws com.liferay.portal.NoSuchUserGroupException,
380                            com.liferay.portal.kernel.exception.SystemException {
381                    return getPersistence()
382                                       .filterFindByCompanyId_PrevAndNext(userGroupId, companyId,
383                            orderByComparator);
384            }
385    
386            /**
387            * Returns all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
388            *
389            * @param companyId the company ID
390            * @param parentUserGroupId the parent user group ID
391            * @return the matching user groups
392            * @throws SystemException if a system exception occurred
393            */
394            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
395                    long companyId, long parentUserGroupId)
396                    throws com.liferay.portal.kernel.exception.SystemException {
397                    return getPersistence().findByC_P(companyId, parentUserGroupId);
398            }
399    
400            /**
401            * Returns a range of all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
402            *
403            * <p>
404            * 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.
405            * </p>
406            *
407            * @param companyId the company ID
408            * @param parentUserGroupId the parent user group ID
409            * @param start the lower bound of the range of user groups
410            * @param end the upper bound of the range of user groups (not inclusive)
411            * @return the range of matching user groups
412            * @throws SystemException if a system exception occurred
413            */
414            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
415                    long companyId, long parentUserGroupId, int start, int end)
416                    throws com.liferay.portal.kernel.exception.SystemException {
417                    return getPersistence()
418                                       .findByC_P(companyId, parentUserGroupId, start, end);
419            }
420    
421            /**
422            * Returns an ordered range of all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
423            *
424            * <p>
425            * 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.
426            * </p>
427            *
428            * @param companyId the company ID
429            * @param parentUserGroupId the parent user group ID
430            * @param start the lower bound of the range of user groups
431            * @param end the upper bound of the range of user groups (not inclusive)
432            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
433            * @return the ordered range of matching user groups
434            * @throws SystemException if a system exception occurred
435            */
436            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
437                    long companyId, long parentUserGroupId, int start, int end,
438                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
439                    throws com.liferay.portal.kernel.exception.SystemException {
440                    return getPersistence()
441                                       .findByC_P(companyId, parentUserGroupId, start, end,
442                            orderByComparator);
443            }
444    
445            /**
446            * Returns the first user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
447            *
448            * <p>
449            * 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.
450            * </p>
451            *
452            * @param companyId the company ID
453            * @param parentUserGroupId the parent user group ID
454            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
455            * @return the first matching user group
456            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
457            * @throws SystemException if a system exception occurred
458            */
459            public static com.liferay.portal.model.UserGroup findByC_P_First(
460                    long companyId, long parentUserGroupId,
461                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
462                    throws com.liferay.portal.NoSuchUserGroupException,
463                            com.liferay.portal.kernel.exception.SystemException {
464                    return getPersistence()
465                                       .findByC_P_First(companyId, parentUserGroupId,
466                            orderByComparator);
467            }
468    
469            /**
470            * Returns the last user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
471            *
472            * <p>
473            * 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.
474            * </p>
475            *
476            * @param companyId the company ID
477            * @param parentUserGroupId the parent user group ID
478            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
479            * @return the last matching user group
480            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
481            * @throws SystemException if a system exception occurred
482            */
483            public static com.liferay.portal.model.UserGroup findByC_P_Last(
484                    long companyId, long parentUserGroupId,
485                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
486                    throws com.liferay.portal.NoSuchUserGroupException,
487                            com.liferay.portal.kernel.exception.SystemException {
488                    return getPersistence()
489                                       .findByC_P_Last(companyId, parentUserGroupId,
490                            orderByComparator);
491            }
492    
493            /**
494            * Returns the user groups before and after the current user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
495            *
496            * <p>
497            * 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.
498            * </p>
499            *
500            * @param userGroupId the primary key of the current user group
501            * @param companyId the company ID
502            * @param parentUserGroupId the parent user group ID
503            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
504            * @return the previous, current, and next user group
505            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
506            * @throws SystemException if a system exception occurred
507            */
508            public static com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
509                    long userGroupId, long companyId, long parentUserGroupId,
510                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
511                    throws com.liferay.portal.NoSuchUserGroupException,
512                            com.liferay.portal.kernel.exception.SystemException {
513                    return getPersistence()
514                                       .findByC_P_PrevAndNext(userGroupId, companyId,
515                            parentUserGroupId, orderByComparator);
516            }
517    
518            /**
519            * Returns all the user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
520            *
521            * @param companyId the company ID
522            * @param parentUserGroupId the parent user group ID
523            * @return the matching user groups that the user has permission to view
524            * @throws SystemException if a system exception occurred
525            */
526            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
527                    long companyId, long parentUserGroupId)
528                    throws com.liferay.portal.kernel.exception.SystemException {
529                    return getPersistence().filterFindByC_P(companyId, parentUserGroupId);
530            }
531    
532            /**
533            * Returns a range of all the user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
534            *
535            * <p>
536            * 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.
537            * </p>
538            *
539            * @param companyId the company ID
540            * @param parentUserGroupId the parent user group ID
541            * @param start the lower bound of the range of user groups
542            * @param end the upper bound of the range of user groups (not inclusive)
543            * @return the range of matching user groups that the user has permission to view
544            * @throws SystemException if a system exception occurred
545            */
546            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
547                    long companyId, long parentUserGroupId, int start, int end)
548                    throws com.liferay.portal.kernel.exception.SystemException {
549                    return getPersistence()
550                                       .filterFindByC_P(companyId, parentUserGroupId, start, end);
551            }
552    
553            /**
554            * Returns an ordered range of all the user groups that the user has permissions to view where companyId = &#63; and parentUserGroupId = &#63;.
555            *
556            * <p>
557            * 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.
558            * </p>
559            *
560            * @param companyId the company ID
561            * @param parentUserGroupId the parent user group ID
562            * @param start the lower bound of the range of user groups
563            * @param end the upper bound of the range of user groups (not inclusive)
564            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
565            * @return the ordered range of matching user groups that the user has permission to view
566            * @throws SystemException if a system exception occurred
567            */
568            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
569                    long companyId, long parentUserGroupId, int start, int end,
570                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
571                    throws com.liferay.portal.kernel.exception.SystemException {
572                    return getPersistence()
573                                       .filterFindByC_P(companyId, parentUserGroupId, start, end,
574                            orderByComparator);
575            }
576    
577            /**
578            * Returns the user groups before and after the current user group in the ordered set of user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
579            *
580            * @param userGroupId the primary key of the current user group
581            * @param companyId the company ID
582            * @param parentUserGroupId the parent user group ID
583            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
584            * @return the previous, current, and next user group
585            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
586            * @throws SystemException if a system exception occurred
587            */
588            public static com.liferay.portal.model.UserGroup[] filterFindByC_P_PrevAndNext(
589                    long userGroupId, long companyId, long parentUserGroupId,
590                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
591                    throws com.liferay.portal.NoSuchUserGroupException,
592                            com.liferay.portal.kernel.exception.SystemException {
593                    return getPersistence()
594                                       .filterFindByC_P_PrevAndNext(userGroupId, companyId,
595                            parentUserGroupId, orderByComparator);
596            }
597    
598            /**
599            * Returns the user group where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found.
600            *
601            * @param companyId the company ID
602            * @param name the name
603            * @return the matching user group
604            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
605            * @throws SystemException if a system exception occurred
606            */
607            public static com.liferay.portal.model.UserGroup findByC_N(long companyId,
608                    java.lang.String name)
609                    throws com.liferay.portal.NoSuchUserGroupException,
610                            com.liferay.portal.kernel.exception.SystemException {
611                    return getPersistence().findByC_N(companyId, name);
612            }
613    
614            /**
615            * Returns the user group where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
616            *
617            * @param companyId the company ID
618            * @param name the name
619            * @return the matching user group, or <code>null</code> if a matching user group could not be found
620            * @throws SystemException if a system exception occurred
621            */
622            public static com.liferay.portal.model.UserGroup fetchByC_N(
623                    long companyId, java.lang.String name)
624                    throws com.liferay.portal.kernel.exception.SystemException {
625                    return getPersistence().fetchByC_N(companyId, name);
626            }
627    
628            /**
629            * Returns the user group where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
630            *
631            * @param companyId the company ID
632            * @param name the name
633            * @param retrieveFromCache whether to use the finder cache
634            * @return the matching user group, or <code>null</code> if a matching user group could not be found
635            * @throws SystemException if a system exception occurred
636            */
637            public static com.liferay.portal.model.UserGroup fetchByC_N(
638                    long companyId, java.lang.String name, boolean retrieveFromCache)
639                    throws com.liferay.portal.kernel.exception.SystemException {
640                    return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
641            }
642    
643            /**
644            * Returns all the user groups.
645            *
646            * @return the user groups
647            * @throws SystemException if a system exception occurred
648            */
649            public static java.util.List<com.liferay.portal.model.UserGroup> findAll()
650                    throws com.liferay.portal.kernel.exception.SystemException {
651                    return getPersistence().findAll();
652            }
653    
654            /**
655            * Returns a range of all the user groups.
656            *
657            * <p>
658            * 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.
659            * </p>
660            *
661            * @param start the lower bound of the range of user groups
662            * @param end the upper bound of the range of user groups (not inclusive)
663            * @return the range of user groups
664            * @throws SystemException if a system exception occurred
665            */
666            public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
667                    int start, int end)
668                    throws com.liferay.portal.kernel.exception.SystemException {
669                    return getPersistence().findAll(start, end);
670            }
671    
672            /**
673            * Returns an ordered range of all the user groups.
674            *
675            * <p>
676            * 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.
677            * </p>
678            *
679            * @param start the lower bound of the range of user groups
680            * @param end the upper bound of the range of user groups (not inclusive)
681            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
682            * @return the ordered range of user groups
683            * @throws SystemException if a system exception occurred
684            */
685            public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
686                    int start, int end,
687                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
688                    throws com.liferay.portal.kernel.exception.SystemException {
689                    return getPersistence().findAll(start, end, orderByComparator);
690            }
691    
692            /**
693            * Removes all the user groups where companyId = &#63; from the database.
694            *
695            * @param companyId the company ID
696            * @throws SystemException if a system exception occurred
697            */
698            public static void removeByCompanyId(long companyId)
699                    throws com.liferay.portal.kernel.exception.SystemException {
700                    getPersistence().removeByCompanyId(companyId);
701            }
702    
703            /**
704            * Removes all the user groups where companyId = &#63; and parentUserGroupId = &#63; from the database.
705            *
706            * @param companyId the company ID
707            * @param parentUserGroupId the parent user group ID
708            * @throws SystemException if a system exception occurred
709            */
710            public static void removeByC_P(long companyId, long parentUserGroupId)
711                    throws com.liferay.portal.kernel.exception.SystemException {
712                    getPersistence().removeByC_P(companyId, parentUserGroupId);
713            }
714    
715            /**
716            * Removes the user group where companyId = &#63; and name = &#63; from the database.
717            *
718            * @param companyId the company ID
719            * @param name the name
720            * @throws SystemException if a system exception occurred
721            */
722            public static void removeByC_N(long companyId, java.lang.String name)
723                    throws com.liferay.portal.NoSuchUserGroupException,
724                            com.liferay.portal.kernel.exception.SystemException {
725                    getPersistence().removeByC_N(companyId, name);
726            }
727    
728            /**
729            * Removes all the user groups from the database.
730            *
731            * @throws SystemException if a system exception occurred
732            */
733            public static void removeAll()
734                    throws com.liferay.portal.kernel.exception.SystemException {
735                    getPersistence().removeAll();
736            }
737    
738            /**
739            * Returns the number of user groups where companyId = &#63;.
740            *
741            * @param companyId the company ID
742            * @return the number of matching user groups
743            * @throws SystemException if a system exception occurred
744            */
745            public static int countByCompanyId(long companyId)
746                    throws com.liferay.portal.kernel.exception.SystemException {
747                    return getPersistence().countByCompanyId(companyId);
748            }
749    
750            /**
751            * Returns the number of user groups that the user has permission to view where companyId = &#63;.
752            *
753            * @param companyId the company ID
754            * @return the number of matching user groups that the user has permission to view
755            * @throws SystemException if a system exception occurred
756            */
757            public static int filterCountByCompanyId(long companyId)
758                    throws com.liferay.portal.kernel.exception.SystemException {
759                    return getPersistence().filterCountByCompanyId(companyId);
760            }
761    
762            /**
763            * Returns the number of user groups where companyId = &#63; and parentUserGroupId = &#63;.
764            *
765            * @param companyId the company ID
766            * @param parentUserGroupId the parent user group ID
767            * @return the number of matching user groups
768            * @throws SystemException if a system exception occurred
769            */
770            public static int countByC_P(long companyId, long parentUserGroupId)
771                    throws com.liferay.portal.kernel.exception.SystemException {
772                    return getPersistence().countByC_P(companyId, parentUserGroupId);
773            }
774    
775            /**
776            * Returns the number of user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
777            *
778            * @param companyId the company ID
779            * @param parentUserGroupId the parent user group ID
780            * @return the number of matching user groups that the user has permission to view
781            * @throws SystemException if a system exception occurred
782            */
783            public static int filterCountByC_P(long companyId, long parentUserGroupId)
784                    throws com.liferay.portal.kernel.exception.SystemException {
785                    return getPersistence().filterCountByC_P(companyId, parentUserGroupId);
786            }
787    
788            /**
789            * Returns the number of user groups where companyId = &#63; and name = &#63;.
790            *
791            * @param companyId the company ID
792            * @param name the name
793            * @return the number of matching user groups
794            * @throws SystemException if a system exception occurred
795            */
796            public static int countByC_N(long companyId, java.lang.String name)
797                    throws com.liferay.portal.kernel.exception.SystemException {
798                    return getPersistence().countByC_N(companyId, name);
799            }
800    
801            /**
802            * Returns the number of user groups.
803            *
804            * @return the number of user groups
805            * @throws SystemException if a system exception occurred
806            */
807            public static int countAll()
808                    throws com.liferay.portal.kernel.exception.SystemException {
809                    return getPersistence().countAll();
810            }
811    
812            /**
813            * Returns all the groups associated with the user group.
814            *
815            * @param pk the primary key of the user group
816            * @return the groups associated with the user group
817            * @throws SystemException if a system exception occurred
818            */
819            public static java.util.List<com.liferay.portal.model.Group> getGroups(
820                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
821                    return getPersistence().getGroups(pk);
822            }
823    
824            /**
825            * Returns a range of all the groups associated with the user group.
826            *
827            * <p>
828            * 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.
829            * </p>
830            *
831            * @param pk the primary key of the user group
832            * @param start the lower bound of the range of user groups
833            * @param end the upper bound of the range of user groups (not inclusive)
834            * @return the range of groups associated with the user group
835            * @throws SystemException if a system exception occurred
836            */
837            public static java.util.List<com.liferay.portal.model.Group> getGroups(
838                    long pk, int start, int end)
839                    throws com.liferay.portal.kernel.exception.SystemException {
840                    return getPersistence().getGroups(pk, start, end);
841            }
842    
843            /**
844            * Returns an ordered range of all the groups associated with the user group.
845            *
846            * <p>
847            * 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.
848            * </p>
849            *
850            * @param pk the primary key of the user group
851            * @param start the lower bound of the range of user groups
852            * @param end the upper bound of the range of user groups (not inclusive)
853            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
854            * @return the ordered range of groups associated with the user group
855            * @throws SystemException if a system exception occurred
856            */
857            public static java.util.List<com.liferay.portal.model.Group> getGroups(
858                    long pk, int start, int end,
859                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
860                    throws com.liferay.portal.kernel.exception.SystemException {
861                    return getPersistence().getGroups(pk, start, end, orderByComparator);
862            }
863    
864            /**
865            * Returns the number of groups associated with the user group.
866            *
867            * @param pk the primary key of the user group
868            * @return the number of groups associated with the user group
869            * @throws SystemException if a system exception occurred
870            */
871            public static int getGroupsSize(long pk)
872                    throws com.liferay.portal.kernel.exception.SystemException {
873                    return getPersistence().getGroupsSize(pk);
874            }
875    
876            /**
877            * Returns <code>true</code> if the group is associated with the user group.
878            *
879            * @param pk the primary key of the user group
880            * @param groupPK the primary key of the group
881            * @return <code>true</code> if the group is associated with the user group; <code>false</code> otherwise
882            * @throws SystemException if a system exception occurred
883            */
884            public static boolean containsGroup(long pk, long groupPK)
885                    throws com.liferay.portal.kernel.exception.SystemException {
886                    return getPersistence().containsGroup(pk, groupPK);
887            }
888    
889            /**
890            * Returns <code>true</code> if the user group has any groups associated with it.
891            *
892            * @param pk the primary key of the user group to check for associations with groups
893            * @return <code>true</code> if the user group has any groups associated with it; <code>false</code> otherwise
894            * @throws SystemException if a system exception occurred
895            */
896            public static boolean containsGroups(long pk)
897                    throws com.liferay.portal.kernel.exception.SystemException {
898                    return getPersistence().containsGroups(pk);
899            }
900    
901            /**
902            * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
903            *
904            * @param pk the primary key of the user group
905            * @param groupPK the primary key of the group
906            * @throws SystemException if a system exception occurred
907            */
908            public static void addGroup(long pk, long groupPK)
909                    throws com.liferay.portal.kernel.exception.SystemException {
910                    getPersistence().addGroup(pk, groupPK);
911            }
912    
913            /**
914            * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
915            *
916            * @param pk the primary key of the user group
917            * @param group the group
918            * @throws SystemException if a system exception occurred
919            */
920            public static void addGroup(long pk, com.liferay.portal.model.Group group)
921                    throws com.liferay.portal.kernel.exception.SystemException {
922                    getPersistence().addGroup(pk, group);
923            }
924    
925            /**
926            * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
927            *
928            * @param pk the primary key of the user group
929            * @param groupPKs the primary keys of the groups
930            * @throws SystemException if a system exception occurred
931            */
932            public static void addGroups(long pk, long[] groupPKs)
933                    throws com.liferay.portal.kernel.exception.SystemException {
934                    getPersistence().addGroups(pk, groupPKs);
935            }
936    
937            /**
938            * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
939            *
940            * @param pk the primary key of the user group
941            * @param groups the groups
942            * @throws SystemException if a system exception occurred
943            */
944            public static void addGroups(long pk,
945                    java.util.List<com.liferay.portal.model.Group> groups)
946                    throws com.liferay.portal.kernel.exception.SystemException {
947                    getPersistence().addGroups(pk, groups);
948            }
949    
950            /**
951            * Clears all associations between the user group and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
952            *
953            * @param pk the primary key of the user group to clear the associated groups from
954            * @throws SystemException if a system exception occurred
955            */
956            public static void clearGroups(long pk)
957                    throws com.liferay.portal.kernel.exception.SystemException {
958                    getPersistence().clearGroups(pk);
959            }
960    
961            /**
962            * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
963            *
964            * @param pk the primary key of the user group
965            * @param groupPK the primary key of the group
966            * @throws SystemException if a system exception occurred
967            */
968            public static void removeGroup(long pk, long groupPK)
969                    throws com.liferay.portal.kernel.exception.SystemException {
970                    getPersistence().removeGroup(pk, groupPK);
971            }
972    
973            /**
974            * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
975            *
976            * @param pk the primary key of the user group
977            * @param group the group
978            * @throws SystemException if a system exception occurred
979            */
980            public static void removeGroup(long pk, com.liferay.portal.model.Group group)
981                    throws com.liferay.portal.kernel.exception.SystemException {
982                    getPersistence().removeGroup(pk, group);
983            }
984    
985            /**
986            * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
987            *
988            * @param pk the primary key of the user group
989            * @param groupPKs the primary keys of the groups
990            * @throws SystemException if a system exception occurred
991            */
992            public static void removeGroups(long pk, long[] groupPKs)
993                    throws com.liferay.portal.kernel.exception.SystemException {
994                    getPersistence().removeGroups(pk, groupPKs);
995            }
996    
997            /**
998            * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
999            *
1000            * @param pk the primary key of the user group
1001            * @param groups the groups
1002            * @throws SystemException if a system exception occurred
1003            */
1004            public static void removeGroups(long pk,
1005                    java.util.List<com.liferay.portal.model.Group> groups)
1006                    throws com.liferay.portal.kernel.exception.SystemException {
1007                    getPersistence().removeGroups(pk, groups);
1008            }
1009    
1010            /**
1011            * Sets the groups associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1012            *
1013            * @param pk the primary key of the user group
1014            * @param groupPKs the primary keys of the groups to be associated with the user group
1015            * @throws SystemException if a system exception occurred
1016            */
1017            public static void setGroups(long pk, long[] groupPKs)
1018                    throws com.liferay.portal.kernel.exception.SystemException {
1019                    getPersistence().setGroups(pk, groupPKs);
1020            }
1021    
1022            /**
1023            * Sets the groups associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1024            *
1025            * @param pk the primary key of the user group
1026            * @param groups the groups to be associated with the user group
1027            * @throws SystemException if a system exception occurred
1028            */
1029            public static void setGroups(long pk,
1030                    java.util.List<com.liferay.portal.model.Group> groups)
1031                    throws com.liferay.portal.kernel.exception.SystemException {
1032                    getPersistence().setGroups(pk, groups);
1033            }
1034    
1035            /**
1036            * Returns all the teams associated with the user group.
1037            *
1038            * @param pk the primary key of the user group
1039            * @return the teams associated with the user group
1040            * @throws SystemException if a system exception occurred
1041            */
1042            public static java.util.List<com.liferay.portal.model.Team> getTeams(
1043                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1044                    return getPersistence().getTeams(pk);
1045            }
1046    
1047            /**
1048            * Returns a range of all the teams associated with the user group.
1049            *
1050            * <p>
1051            * 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.
1052            * </p>
1053            *
1054            * @param pk the primary key of the user group
1055            * @param start the lower bound of the range of user groups
1056            * @param end the upper bound of the range of user groups (not inclusive)
1057            * @return the range of teams associated with the user group
1058            * @throws SystemException if a system exception occurred
1059            */
1060            public static java.util.List<com.liferay.portal.model.Team> getTeams(
1061                    long pk, int start, int end)
1062                    throws com.liferay.portal.kernel.exception.SystemException {
1063                    return getPersistence().getTeams(pk, start, end);
1064            }
1065    
1066            /**
1067            * Returns an ordered range of all the teams associated with the user group.
1068            *
1069            * <p>
1070            * 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.
1071            * </p>
1072            *
1073            * @param pk the primary key of the user group
1074            * @param start the lower bound of the range of user groups
1075            * @param end the upper bound of the range of user groups (not inclusive)
1076            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1077            * @return the ordered range of teams associated with the user group
1078            * @throws SystemException if a system exception occurred
1079            */
1080            public static java.util.List<com.liferay.portal.model.Team> getTeams(
1081                    long pk, int start, int end,
1082                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1083                    throws com.liferay.portal.kernel.exception.SystemException {
1084                    return getPersistence().getTeams(pk, start, end, orderByComparator);
1085            }
1086    
1087            /**
1088            * Returns the number of teams associated with the user group.
1089            *
1090            * @param pk the primary key of the user group
1091            * @return the number of teams associated with the user group
1092            * @throws SystemException if a system exception occurred
1093            */
1094            public static int getTeamsSize(long pk)
1095                    throws com.liferay.portal.kernel.exception.SystemException {
1096                    return getPersistence().getTeamsSize(pk);
1097            }
1098    
1099            /**
1100            * Returns <code>true</code> if the team is associated with the user group.
1101            *
1102            * @param pk the primary key of the user group
1103            * @param teamPK the primary key of the team
1104            * @return <code>true</code> if the team is associated with the user group; <code>false</code> otherwise
1105            * @throws SystemException if a system exception occurred
1106            */
1107            public static boolean containsTeam(long pk, long teamPK)
1108                    throws com.liferay.portal.kernel.exception.SystemException {
1109                    return getPersistence().containsTeam(pk, teamPK);
1110            }
1111    
1112            /**
1113            * Returns <code>true</code> if the user group has any teams associated with it.
1114            *
1115            * @param pk the primary key of the user group to check for associations with teams
1116            * @return <code>true</code> if the user group has any teams associated with it; <code>false</code> otherwise
1117            * @throws SystemException if a system exception occurred
1118            */
1119            public static boolean containsTeams(long pk)
1120                    throws com.liferay.portal.kernel.exception.SystemException {
1121                    return getPersistence().containsTeams(pk);
1122            }
1123    
1124            /**
1125            * Adds an association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1126            *
1127            * @param pk the primary key of the user group
1128            * @param teamPK the primary key of the team
1129            * @throws SystemException if a system exception occurred
1130            */
1131            public static void addTeam(long pk, long teamPK)
1132                    throws com.liferay.portal.kernel.exception.SystemException {
1133                    getPersistence().addTeam(pk, teamPK);
1134            }
1135    
1136            /**
1137            * Adds an association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1138            *
1139            * @param pk the primary key of the user group
1140            * @param team the team
1141            * @throws SystemException if a system exception occurred
1142            */
1143            public static void addTeam(long pk, com.liferay.portal.model.Team team)
1144                    throws com.liferay.portal.kernel.exception.SystemException {
1145                    getPersistence().addTeam(pk, team);
1146            }
1147    
1148            /**
1149            * Adds an association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1150            *
1151            * @param pk the primary key of the user group
1152            * @param teamPKs the primary keys of the teams
1153            * @throws SystemException if a system exception occurred
1154            */
1155            public static void addTeams(long pk, long[] teamPKs)
1156                    throws com.liferay.portal.kernel.exception.SystemException {
1157                    getPersistence().addTeams(pk, teamPKs);
1158            }
1159    
1160            /**
1161            * Adds an association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1162            *
1163            * @param pk the primary key of the user group
1164            * @param teams the teams
1165            * @throws SystemException if a system exception occurred
1166            */
1167            public static void addTeams(long pk,
1168                    java.util.List<com.liferay.portal.model.Team> teams)
1169                    throws com.liferay.portal.kernel.exception.SystemException {
1170                    getPersistence().addTeams(pk, teams);
1171            }
1172    
1173            /**
1174            * Clears all associations between the user group and its teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1175            *
1176            * @param pk the primary key of the user group to clear the associated teams from
1177            * @throws SystemException if a system exception occurred
1178            */
1179            public static void clearTeams(long pk)
1180                    throws com.liferay.portal.kernel.exception.SystemException {
1181                    getPersistence().clearTeams(pk);
1182            }
1183    
1184            /**
1185            * Removes the association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1186            *
1187            * @param pk the primary key of the user group
1188            * @param teamPK the primary key of the team
1189            * @throws SystemException if a system exception occurred
1190            */
1191            public static void removeTeam(long pk, long teamPK)
1192                    throws com.liferay.portal.kernel.exception.SystemException {
1193                    getPersistence().removeTeam(pk, teamPK);
1194            }
1195    
1196            /**
1197            * Removes the association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1198            *
1199            * @param pk the primary key of the user group
1200            * @param team the team
1201            * @throws SystemException if a system exception occurred
1202            */
1203            public static void removeTeam(long pk, com.liferay.portal.model.Team team)
1204                    throws com.liferay.portal.kernel.exception.SystemException {
1205                    getPersistence().removeTeam(pk, team);
1206            }
1207    
1208            /**
1209            * Removes the association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1210            *
1211            * @param pk the primary key of the user group
1212            * @param teamPKs the primary keys of the teams
1213            * @throws SystemException if a system exception occurred
1214            */
1215            public static void removeTeams(long pk, long[] teamPKs)
1216                    throws com.liferay.portal.kernel.exception.SystemException {
1217                    getPersistence().removeTeams(pk, teamPKs);
1218            }
1219    
1220            /**
1221            * Removes the association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1222            *
1223            * @param pk the primary key of the user group
1224            * @param teams the teams
1225            * @throws SystemException if a system exception occurred
1226            */
1227            public static void removeTeams(long pk,
1228                    java.util.List<com.liferay.portal.model.Team> teams)
1229                    throws com.liferay.portal.kernel.exception.SystemException {
1230                    getPersistence().removeTeams(pk, teams);
1231            }
1232    
1233            /**
1234            * Sets the teams associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1235            *
1236            * @param pk the primary key of the user group
1237            * @param teamPKs the primary keys of the teams to be associated with the user group
1238            * @throws SystemException if a system exception occurred
1239            */
1240            public static void setTeams(long pk, long[] teamPKs)
1241                    throws com.liferay.portal.kernel.exception.SystemException {
1242                    getPersistence().setTeams(pk, teamPKs);
1243            }
1244    
1245            /**
1246            * Sets the teams associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1247            *
1248            * @param pk the primary key of the user group
1249            * @param teams the teams to be associated with the user group
1250            * @throws SystemException if a system exception occurred
1251            */
1252            public static void setTeams(long pk,
1253                    java.util.List<com.liferay.portal.model.Team> teams)
1254                    throws com.liferay.portal.kernel.exception.SystemException {
1255                    getPersistence().setTeams(pk, teams);
1256            }
1257    
1258            /**
1259            * Returns all the users associated with the user group.
1260            *
1261            * @param pk the primary key of the user group
1262            * @return the users associated with the user group
1263            * @throws SystemException if a system exception occurred
1264            */
1265            public static java.util.List<com.liferay.portal.model.User> getUsers(
1266                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1267                    return getPersistence().getUsers(pk);
1268            }
1269    
1270            /**
1271            * Returns a range of all the users associated with the user group.
1272            *
1273            * <p>
1274            * 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.
1275            * </p>
1276            *
1277            * @param pk the primary key of the user group
1278            * @param start the lower bound of the range of user groups
1279            * @param end the upper bound of the range of user groups (not inclusive)
1280            * @return the range of users associated with the user group
1281            * @throws SystemException if a system exception occurred
1282            */
1283            public static java.util.List<com.liferay.portal.model.User> getUsers(
1284                    long pk, int start, int end)
1285                    throws com.liferay.portal.kernel.exception.SystemException {
1286                    return getPersistence().getUsers(pk, start, end);
1287            }
1288    
1289            /**
1290            * Returns an ordered range of all the users associated with the user group.
1291            *
1292            * <p>
1293            * 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.
1294            * </p>
1295            *
1296            * @param pk the primary key of the user group
1297            * @param start the lower bound of the range of user groups
1298            * @param end the upper bound of the range of user groups (not inclusive)
1299            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1300            * @return the ordered range of users associated with the user group
1301            * @throws SystemException if a system exception occurred
1302            */
1303            public static java.util.List<com.liferay.portal.model.User> getUsers(
1304                    long pk, int start, int end,
1305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1306                    throws com.liferay.portal.kernel.exception.SystemException {
1307                    return getPersistence().getUsers(pk, start, end, orderByComparator);
1308            }
1309    
1310            /**
1311            * Returns the number of users associated with the user group.
1312            *
1313            * @param pk the primary key of the user group
1314            * @return the number of users associated with the user group
1315            * @throws SystemException if a system exception occurred
1316            */
1317            public static int getUsersSize(long pk)
1318                    throws com.liferay.portal.kernel.exception.SystemException {
1319                    return getPersistence().getUsersSize(pk);
1320            }
1321    
1322            /**
1323            * Returns <code>true</code> if the user is associated with the user group.
1324            *
1325            * @param pk the primary key of the user group
1326            * @param userPK the primary key of the user
1327            * @return <code>true</code> if the user is associated with the user group; <code>false</code> otherwise
1328            * @throws SystemException if a system exception occurred
1329            */
1330            public static boolean containsUser(long pk, long userPK)
1331                    throws com.liferay.portal.kernel.exception.SystemException {
1332                    return getPersistence().containsUser(pk, userPK);
1333            }
1334    
1335            /**
1336            * Returns <code>true</code> if the user group has any users associated with it.
1337            *
1338            * @param pk the primary key of the user group to check for associations with users
1339            * @return <code>true</code> if the user group has any users associated with it; <code>false</code> otherwise
1340            * @throws SystemException if a system exception occurred
1341            */
1342            public static boolean containsUsers(long pk)
1343                    throws com.liferay.portal.kernel.exception.SystemException {
1344                    return getPersistence().containsUsers(pk);
1345            }
1346    
1347            /**
1348            * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1349            *
1350            * @param pk the primary key of the user group
1351            * @param userPK the primary key of the user
1352            * @throws SystemException if a system exception occurred
1353            */
1354            public static void addUser(long pk, long userPK)
1355                    throws com.liferay.portal.kernel.exception.SystemException {
1356                    getPersistence().addUser(pk, userPK);
1357            }
1358    
1359            /**
1360            * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1361            *
1362            * @param pk the primary key of the user group
1363            * @param user the user
1364            * @throws SystemException if a system exception occurred
1365            */
1366            public static void addUser(long pk, com.liferay.portal.model.User user)
1367                    throws com.liferay.portal.kernel.exception.SystemException {
1368                    getPersistence().addUser(pk, user);
1369            }
1370    
1371            /**
1372            * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1373            *
1374            * @param pk the primary key of the user group
1375            * @param userPKs the primary keys of the users
1376            * @throws SystemException if a system exception occurred
1377            */
1378            public static void addUsers(long pk, long[] userPKs)
1379                    throws com.liferay.portal.kernel.exception.SystemException {
1380                    getPersistence().addUsers(pk, userPKs);
1381            }
1382    
1383            /**
1384            * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1385            *
1386            * @param pk the primary key of the user group
1387            * @param users the users
1388            * @throws SystemException if a system exception occurred
1389            */
1390            public static void addUsers(long pk,
1391                    java.util.List<com.liferay.portal.model.User> users)
1392                    throws com.liferay.portal.kernel.exception.SystemException {
1393                    getPersistence().addUsers(pk, users);
1394            }
1395    
1396            /**
1397            * Clears all associations between the user group and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1398            *
1399            * @param pk the primary key of the user group to clear the associated users from
1400            * @throws SystemException if a system exception occurred
1401            */
1402            public static void clearUsers(long pk)
1403                    throws com.liferay.portal.kernel.exception.SystemException {
1404                    getPersistence().clearUsers(pk);
1405            }
1406    
1407            /**
1408            * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1409            *
1410            * @param pk the primary key of the user group
1411            * @param userPK the primary key of the user
1412            * @throws SystemException if a system exception occurred
1413            */
1414            public static void removeUser(long pk, long userPK)
1415                    throws com.liferay.portal.kernel.exception.SystemException {
1416                    getPersistence().removeUser(pk, userPK);
1417            }
1418    
1419            /**
1420            * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1421            *
1422            * @param pk the primary key of the user group
1423            * @param user the user
1424            * @throws SystemException if a system exception occurred
1425            */
1426            public static void removeUser(long pk, com.liferay.portal.model.User user)
1427                    throws com.liferay.portal.kernel.exception.SystemException {
1428                    getPersistence().removeUser(pk, user);
1429            }
1430    
1431            /**
1432            * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1433            *
1434            * @param pk the primary key of the user group
1435            * @param userPKs the primary keys of the users
1436            * @throws SystemException if a system exception occurred
1437            */
1438            public static void removeUsers(long pk, long[] userPKs)
1439                    throws com.liferay.portal.kernel.exception.SystemException {
1440                    getPersistence().removeUsers(pk, userPKs);
1441            }
1442    
1443            /**
1444            * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1445            *
1446            * @param pk the primary key of the user group
1447            * @param users the users
1448            * @throws SystemException if a system exception occurred
1449            */
1450            public static void removeUsers(long pk,
1451                    java.util.List<com.liferay.portal.model.User> users)
1452                    throws com.liferay.portal.kernel.exception.SystemException {
1453                    getPersistence().removeUsers(pk, users);
1454            }
1455    
1456            /**
1457            * Sets the users associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1458            *
1459            * @param pk the primary key of the user group
1460            * @param userPKs the primary keys of the users to be associated with the user group
1461            * @throws SystemException if a system exception occurred
1462            */
1463            public static void setUsers(long pk, long[] userPKs)
1464                    throws com.liferay.portal.kernel.exception.SystemException {
1465                    getPersistence().setUsers(pk, userPKs);
1466            }
1467    
1468            /**
1469            * Sets the users associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1470            *
1471            * @param pk the primary key of the user group
1472            * @param users the users to be associated with the user group
1473            * @throws SystemException if a system exception occurred
1474            */
1475            public static void setUsers(long pk,
1476                    java.util.List<com.liferay.portal.model.User> users)
1477                    throws com.liferay.portal.kernel.exception.SystemException {
1478                    getPersistence().setUsers(pk, users);
1479            }
1480    
1481            public static UserGroupPersistence getPersistence() {
1482                    if (_persistence == null) {
1483                            _persistence = (UserGroupPersistence)PortalBeanLocatorUtil.locate(UserGroupPersistence.class.getName());
1484    
1485                            ReferenceRegistry.registerReference(UserGroupUtil.class,
1486                                    "_persistence");
1487                    }
1488    
1489                    return _persistence;
1490            }
1491    
1492            public void setPersistence(UserGroupPersistence persistence) {
1493                    _persistence = persistence;
1494    
1495                    ReferenceRegistry.registerReference(UserGroupUtil.class, "_persistence");
1496            }
1497    
1498            private static UserGroupPersistence _persistence;
1499    }