001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import 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.exception.SystemException;
022    import com.liferay.portal.kernel.util.OrderByComparator;
023    import com.liferay.portal.kernel.util.ReferenceRegistry;
024    import com.liferay.portal.model.UserGroup;
025    import com.liferay.portal.service.ServiceContext;
026    
027    import java.util.List;
028    
029    /**
030     * 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.
031     *
032     * <p>
033     * Caching information and settings can be found in <code>portal.properties</code>
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see UserGroupPersistence
038     * @see UserGroupPersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class UserGroupUtil {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
047             */
048    
049            /**
050             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
051             */
052            public static void clearCache() {
053                    getPersistence().clearCache();
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
058             */
059            public static void clearCache(UserGroup userGroup) {
060                    getPersistence().clearCache(userGroup);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
065             */
066            public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
067                    throws SystemException {
068                    return getPersistence().countWithDynamicQuery(dynamicQuery);
069            }
070    
071            /**
072             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
073             */
074            public static List<UserGroup> findWithDynamicQuery(
075                    DynamicQuery dynamicQuery) throws SystemException {
076                    return getPersistence().findWithDynamicQuery(dynamicQuery);
077            }
078    
079            /**
080             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
081             */
082            public static List<UserGroup> findWithDynamicQuery(
083                    DynamicQuery dynamicQuery, int start, int end)
084                    throws SystemException {
085                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
086            }
087    
088            /**
089             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
090             */
091            public static List<UserGroup> findWithDynamicQuery(
092                    DynamicQuery dynamicQuery, int start, int end,
093                    OrderByComparator orderByComparator) throws SystemException {
094                    return getPersistence()
095                                       .findWithDynamicQuery(dynamicQuery, start, end,
096                            orderByComparator);
097            }
098    
099            /**
100             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
101             */
102            public static UserGroup update(UserGroup userGroup)
103                    throws SystemException {
104                    return getPersistence().update(userGroup);
105            }
106    
107            /**
108             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
109             */
110            public static UserGroup update(UserGroup userGroup,
111                    ServiceContext serviceContext) throws SystemException {
112                    return getPersistence().update(userGroup, serviceContext);
113            }
114    
115            /**
116            * Returns all the user groups where uuid = &#63;.
117            *
118            * @param uuid the uuid
119            * @return the matching user groups
120            * @throws SystemException if a system exception occurred
121            */
122            public static java.util.List<com.liferay.portal.model.UserGroup> findByUuid(
123                    java.lang.String uuid)
124                    throws com.liferay.portal.kernel.exception.SystemException {
125                    return getPersistence().findByUuid(uuid);
126            }
127    
128            /**
129            * Returns a range of all the user groups where uuid = &#63;.
130            *
131            * <p>
132            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
133            * </p>
134            *
135            * @param uuid the uuid
136            * @param start the lower bound of the range of user groups
137            * @param end the upper bound of the range of user groups (not inclusive)
138            * @return the range of matching user groups
139            * @throws SystemException if a system exception occurred
140            */
141            public static java.util.List<com.liferay.portal.model.UserGroup> findByUuid(
142                    java.lang.String uuid, int start, int end)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    return getPersistence().findByUuid(uuid, start, end);
145            }
146    
147            /**
148            * Returns an ordered range of all the user groups where uuid = &#63;.
149            *
150            * <p>
151            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
152            * </p>
153            *
154            * @param uuid the uuid
155            * @param start the lower bound of the range of user groups
156            * @param end the upper bound of the range of user groups (not inclusive)
157            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
158            * @return the ordered range of matching user groups
159            * @throws SystemException if a system exception occurred
160            */
161            public static java.util.List<com.liferay.portal.model.UserGroup> findByUuid(
162                    java.lang.String uuid, int start, int end,
163                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164                    throws com.liferay.portal.kernel.exception.SystemException {
165                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
166            }
167    
168            /**
169            * Returns the first user group in the ordered set where uuid = &#63;.
170            *
171            * @param uuid the uuid
172            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
173            * @return the first matching user group
174            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
175            * @throws SystemException if a system exception occurred
176            */
177            public static com.liferay.portal.model.UserGroup findByUuid_First(
178                    java.lang.String uuid,
179                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180                    throws com.liferay.portal.NoSuchUserGroupException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return getPersistence().findByUuid_First(uuid, orderByComparator);
183            }
184    
185            /**
186            * Returns the first user group in the ordered set where uuid = &#63;.
187            *
188            * @param uuid the uuid
189            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
190            * @return the first matching user group, or <code>null</code> if a matching user group could not be found
191            * @throws SystemException if a system exception occurred
192            */
193            public static com.liferay.portal.model.UserGroup fetchByUuid_First(
194                    java.lang.String uuid,
195                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
196                    throws com.liferay.portal.kernel.exception.SystemException {
197                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
198            }
199    
200            /**
201            * Returns the last user group in the ordered set where uuid = &#63;.
202            *
203            * @param uuid the uuid
204            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
205            * @return the last matching user group
206            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
207            * @throws SystemException if a system exception occurred
208            */
209            public static com.liferay.portal.model.UserGroup findByUuid_Last(
210                    java.lang.String uuid,
211                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212                    throws com.liferay.portal.NoSuchUserGroupException,
213                            com.liferay.portal.kernel.exception.SystemException {
214                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
215            }
216    
217            /**
218            * Returns the last user group in the ordered set where uuid = &#63;.
219            *
220            * @param uuid the uuid
221            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
222            * @return the last matching user group, or <code>null</code> if a matching user group could not be found
223            * @throws SystemException if a system exception occurred
224            */
225            public static com.liferay.portal.model.UserGroup fetchByUuid_Last(
226                    java.lang.String uuid,
227                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228                    throws com.liferay.portal.kernel.exception.SystemException {
229                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
230            }
231    
232            /**
233            * Returns the user groups before and after the current user group in the ordered set where uuid = &#63;.
234            *
235            * @param userGroupId the primary key of the current user group
236            * @param uuid the uuid
237            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
238            * @return the previous, current, and next user group
239            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
240            * @throws SystemException if a system exception occurred
241            */
242            public static com.liferay.portal.model.UserGroup[] findByUuid_PrevAndNext(
243                    long userGroupId, java.lang.String uuid,
244                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
245                    throws com.liferay.portal.NoSuchUserGroupException,
246                            com.liferay.portal.kernel.exception.SystemException {
247                    return getPersistence()
248                                       .findByUuid_PrevAndNext(userGroupId, uuid, orderByComparator);
249            }
250    
251            /**
252            * Returns all the user groups that the user has permission to view where uuid = &#63;.
253            *
254            * @param uuid the uuid
255            * @return the matching user groups that the user has permission to view
256            * @throws SystemException if a system exception occurred
257            */
258            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByUuid(
259                    java.lang.String uuid)
260                    throws com.liferay.portal.kernel.exception.SystemException {
261                    return getPersistence().filterFindByUuid(uuid);
262            }
263    
264            /**
265            * Returns a range of all the user groups that the user has permission to view where uuid = &#63;.
266            *
267            * <p>
268            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
269            * </p>
270            *
271            * @param uuid the uuid
272            * @param start the lower bound of the range of user groups
273            * @param end the upper bound of the range of user groups (not inclusive)
274            * @return the range of matching user groups that the user has permission to view
275            * @throws SystemException if a system exception occurred
276            */
277            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByUuid(
278                    java.lang.String uuid, int start, int end)
279                    throws com.liferay.portal.kernel.exception.SystemException {
280                    return getPersistence().filterFindByUuid(uuid, start, end);
281            }
282    
283            /**
284            * Returns an ordered range of all the user groups that the user has permissions to view where uuid = &#63;.
285            *
286            * <p>
287            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
288            * </p>
289            *
290            * @param uuid the uuid
291            * @param start the lower bound of the range of user groups
292            * @param end the upper bound of the range of user groups (not inclusive)
293            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
294            * @return the ordered range of matching user groups that the user has permission to view
295            * @throws SystemException if a system exception occurred
296            */
297            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByUuid(
298                    java.lang.String uuid, int start, int end,
299                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
300                    throws com.liferay.portal.kernel.exception.SystemException {
301                    return getPersistence()
302                                       .filterFindByUuid(uuid, start, end, orderByComparator);
303            }
304    
305            /**
306            * 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 uuid = &#63;.
307            *
308            * @param userGroupId the primary key of the current user group
309            * @param uuid the uuid
310            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
311            * @return the previous, current, and next user group
312            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
313            * @throws SystemException if a system exception occurred
314            */
315            public static com.liferay.portal.model.UserGroup[] filterFindByUuid_PrevAndNext(
316                    long userGroupId, java.lang.String uuid,
317                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
318                    throws com.liferay.portal.NoSuchUserGroupException,
319                            com.liferay.portal.kernel.exception.SystemException {
320                    return getPersistence()
321                                       .filterFindByUuid_PrevAndNext(userGroupId, uuid,
322                            orderByComparator);
323            }
324    
325            /**
326            * Removes all the user groups where uuid = &#63; from the database.
327            *
328            * @param uuid the uuid
329            * @throws SystemException if a system exception occurred
330            */
331            public static void removeByUuid(java.lang.String uuid)
332                    throws com.liferay.portal.kernel.exception.SystemException {
333                    getPersistence().removeByUuid(uuid);
334            }
335    
336            /**
337            * Returns the number of user groups where uuid = &#63;.
338            *
339            * @param uuid the uuid
340            * @return the number of matching user groups
341            * @throws SystemException if a system exception occurred
342            */
343            public static int countByUuid(java.lang.String uuid)
344                    throws com.liferay.portal.kernel.exception.SystemException {
345                    return getPersistence().countByUuid(uuid);
346            }
347    
348            /**
349            * Returns the number of user groups that the user has permission to view where uuid = &#63;.
350            *
351            * @param uuid the uuid
352            * @return the number of matching user groups that the user has permission to view
353            * @throws SystemException if a system exception occurred
354            */
355            public static int filterCountByUuid(java.lang.String uuid)
356                    throws com.liferay.portal.kernel.exception.SystemException {
357                    return getPersistence().filterCountByUuid(uuid);
358            }
359    
360            /**
361            * Returns all the user groups where uuid = &#63; and companyId = &#63;.
362            *
363            * @param uuid the uuid
364            * @param companyId the company ID
365            * @return the matching user groups
366            * @throws SystemException if a system exception occurred
367            */
368            public static java.util.List<com.liferay.portal.model.UserGroup> findByUuid_C(
369                    java.lang.String uuid, long companyId)
370                    throws com.liferay.portal.kernel.exception.SystemException {
371                    return getPersistence().findByUuid_C(uuid, companyId);
372            }
373    
374            /**
375            * Returns a range of all the user groups where uuid = &#63; and companyId = &#63;.
376            *
377            * <p>
378            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
379            * </p>
380            *
381            * @param uuid the uuid
382            * @param companyId the company ID
383            * @param start the lower bound of the range of user groups
384            * @param end the upper bound of the range of user groups (not inclusive)
385            * @return the range of matching user groups
386            * @throws SystemException if a system exception occurred
387            */
388            public static java.util.List<com.liferay.portal.model.UserGroup> findByUuid_C(
389                    java.lang.String uuid, long companyId, int start, int end)
390                    throws com.liferay.portal.kernel.exception.SystemException {
391                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
392            }
393    
394            /**
395            * Returns an ordered range of all the user groups where uuid = &#63; and companyId = &#63;.
396            *
397            * <p>
398            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
399            * </p>
400            *
401            * @param uuid the uuid
402            * @param companyId the company ID
403            * @param start the lower bound of the range of user groups
404            * @param end the upper bound of the range of user groups (not inclusive)
405            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
406            * @return the ordered range of matching user groups
407            * @throws SystemException if a system exception occurred
408            */
409            public static java.util.List<com.liferay.portal.model.UserGroup> findByUuid_C(
410                    java.lang.String uuid, long companyId, int start, int end,
411                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
412                    throws com.liferay.portal.kernel.exception.SystemException {
413                    return getPersistence()
414                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
415            }
416    
417            /**
418            * Returns the first user group in the ordered set where uuid = &#63; and companyId = &#63;.
419            *
420            * @param uuid the uuid
421            * @param companyId the company ID
422            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
423            * @return the first matching user group
424            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
425            * @throws SystemException if a system exception occurred
426            */
427            public static com.liferay.portal.model.UserGroup findByUuid_C_First(
428                    java.lang.String uuid, long companyId,
429                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
430                    throws com.liferay.portal.NoSuchUserGroupException,
431                            com.liferay.portal.kernel.exception.SystemException {
432                    return getPersistence()
433                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
434            }
435    
436            /**
437            * Returns the first user group in the ordered set where uuid = &#63; and companyId = &#63;.
438            *
439            * @param uuid the uuid
440            * @param companyId the company ID
441            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
442            * @return the first matching user group, or <code>null</code> if a matching user group could not be found
443            * @throws SystemException if a system exception occurred
444            */
445            public static com.liferay.portal.model.UserGroup fetchByUuid_C_First(
446                    java.lang.String uuid, long companyId,
447                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
448                    throws com.liferay.portal.kernel.exception.SystemException {
449                    return getPersistence()
450                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
451            }
452    
453            /**
454            * Returns the last user group in the ordered set where uuid = &#63; and companyId = &#63;.
455            *
456            * @param uuid the uuid
457            * @param companyId the company ID
458            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
459            * @return the last matching user group
460            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
461            * @throws SystemException if a system exception occurred
462            */
463            public static com.liferay.portal.model.UserGroup findByUuid_C_Last(
464                    java.lang.String uuid, long companyId,
465                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
466                    throws com.liferay.portal.NoSuchUserGroupException,
467                            com.liferay.portal.kernel.exception.SystemException {
468                    return getPersistence()
469                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
470            }
471    
472            /**
473            * Returns the last user group in the ordered set where uuid = &#63; and companyId = &#63;.
474            *
475            * @param uuid the uuid
476            * @param companyId the company ID
477            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
478            * @return the last matching user group, or <code>null</code> if a matching user group could not be found
479            * @throws SystemException if a system exception occurred
480            */
481            public static com.liferay.portal.model.UserGroup fetchByUuid_C_Last(
482                    java.lang.String uuid, long companyId,
483                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
484                    throws com.liferay.portal.kernel.exception.SystemException {
485                    return getPersistence()
486                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
487            }
488    
489            /**
490            * Returns the user groups before and after the current user group in the ordered set where uuid = &#63; and companyId = &#63;.
491            *
492            * @param userGroupId the primary key of the current user group
493            * @param uuid the uuid
494            * @param companyId the company ID
495            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
496            * @return the previous, current, and next user group
497            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
498            * @throws SystemException if a system exception occurred
499            */
500            public static com.liferay.portal.model.UserGroup[] findByUuid_C_PrevAndNext(
501                    long userGroupId, java.lang.String uuid, long companyId,
502                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
503                    throws com.liferay.portal.NoSuchUserGroupException,
504                            com.liferay.portal.kernel.exception.SystemException {
505                    return getPersistence()
506                                       .findByUuid_C_PrevAndNext(userGroupId, uuid, companyId,
507                            orderByComparator);
508            }
509    
510            /**
511            * Returns all the user groups that the user has permission to view where uuid = &#63; and companyId = &#63;.
512            *
513            * @param uuid the uuid
514            * @param companyId the company ID
515            * @return the matching user groups that the user has permission to view
516            * @throws SystemException if a system exception occurred
517            */
518            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByUuid_C(
519                    java.lang.String uuid, long companyId)
520                    throws com.liferay.portal.kernel.exception.SystemException {
521                    return getPersistence().filterFindByUuid_C(uuid, companyId);
522            }
523    
524            /**
525            * Returns a range of all the user groups that the user has permission to view where uuid = &#63; and companyId = &#63;.
526            *
527            * <p>
528            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
529            * </p>
530            *
531            * @param uuid the uuid
532            * @param companyId the company ID
533            * @param start the lower bound of the range of user groups
534            * @param end the upper bound of the range of user groups (not inclusive)
535            * @return the range of matching user groups that the user has permission to view
536            * @throws SystemException if a system exception occurred
537            */
538            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByUuid_C(
539                    java.lang.String uuid, long companyId, int start, int end)
540                    throws com.liferay.portal.kernel.exception.SystemException {
541                    return getPersistence().filterFindByUuid_C(uuid, companyId, start, end);
542            }
543    
544            /**
545            * Returns an ordered range of all the user groups that the user has permissions to view where uuid = &#63; and companyId = &#63;.
546            *
547            * <p>
548            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
549            * </p>
550            *
551            * @param uuid the uuid
552            * @param companyId the company ID
553            * @param start the lower bound of the range of user groups
554            * @param end the upper bound of the range of user groups (not inclusive)
555            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
556            * @return the ordered range of matching user groups that the user has permission to view
557            * @throws SystemException if a system exception occurred
558            */
559            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByUuid_C(
560                    java.lang.String uuid, long companyId, int start, int end,
561                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
562                    throws com.liferay.portal.kernel.exception.SystemException {
563                    return getPersistence()
564                                       .filterFindByUuid_C(uuid, companyId, start, end,
565                            orderByComparator);
566            }
567    
568            /**
569            * 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 uuid = &#63; and companyId = &#63;.
570            *
571            * @param userGroupId the primary key of the current user group
572            * @param uuid the uuid
573            * @param companyId the company ID
574            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
575            * @return the previous, current, and next user group
576            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
577            * @throws SystemException if a system exception occurred
578            */
579            public static com.liferay.portal.model.UserGroup[] filterFindByUuid_C_PrevAndNext(
580                    long userGroupId, java.lang.String uuid, long companyId,
581                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
582                    throws com.liferay.portal.NoSuchUserGroupException,
583                            com.liferay.portal.kernel.exception.SystemException {
584                    return getPersistence()
585                                       .filterFindByUuid_C_PrevAndNext(userGroupId, uuid,
586                            companyId, orderByComparator);
587            }
588    
589            /**
590            * Removes all the user groups where uuid = &#63; and companyId = &#63; from the database.
591            *
592            * @param uuid the uuid
593            * @param companyId the company ID
594            * @throws SystemException if a system exception occurred
595            */
596            public static void removeByUuid_C(java.lang.String uuid, long companyId)
597                    throws com.liferay.portal.kernel.exception.SystemException {
598                    getPersistence().removeByUuid_C(uuid, companyId);
599            }
600    
601            /**
602            * Returns the number of user groups where uuid = &#63; and companyId = &#63;.
603            *
604            * @param uuid the uuid
605            * @param companyId the company ID
606            * @return the number of matching user groups
607            * @throws SystemException if a system exception occurred
608            */
609            public static int countByUuid_C(java.lang.String uuid, long companyId)
610                    throws com.liferay.portal.kernel.exception.SystemException {
611                    return getPersistence().countByUuid_C(uuid, companyId);
612            }
613    
614            /**
615            * Returns the number of user groups that the user has permission to view where uuid = &#63; and companyId = &#63;.
616            *
617            * @param uuid the uuid
618            * @param companyId the company ID
619            * @return the number of matching user groups that the user has permission to view
620            * @throws SystemException if a system exception occurred
621            */
622            public static int filterCountByUuid_C(java.lang.String uuid, long companyId)
623                    throws com.liferay.portal.kernel.exception.SystemException {
624                    return getPersistence().filterCountByUuid_C(uuid, companyId);
625            }
626    
627            /**
628            * Returns all the user groups where companyId = &#63;.
629            *
630            * @param companyId the company ID
631            * @return the matching user groups
632            * @throws SystemException if a system exception occurred
633            */
634            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
635                    long companyId)
636                    throws com.liferay.portal.kernel.exception.SystemException {
637                    return getPersistence().findByCompanyId(companyId);
638            }
639    
640            /**
641            * Returns a range of all the user groups where companyId = &#63;.
642            *
643            * <p>
644            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
645            * </p>
646            *
647            * @param companyId the company ID
648            * @param start the lower bound of the range of user groups
649            * @param end the upper bound of the range of user groups (not inclusive)
650            * @return the range of matching user groups
651            * @throws SystemException if a system exception occurred
652            */
653            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
654                    long companyId, int start, int end)
655                    throws com.liferay.portal.kernel.exception.SystemException {
656                    return getPersistence().findByCompanyId(companyId, start, end);
657            }
658    
659            /**
660            * Returns an ordered range of all the user groups where companyId = &#63;.
661            *
662            * <p>
663            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
664            * </p>
665            *
666            * @param companyId the company ID
667            * @param start the lower bound of the range of user groups
668            * @param end the upper bound of the range of user groups (not inclusive)
669            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
670            * @return the ordered range of matching user groups
671            * @throws SystemException if a system exception occurred
672            */
673            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
674                    long companyId, int start, int end,
675                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
676                    throws com.liferay.portal.kernel.exception.SystemException {
677                    return getPersistence()
678                                       .findByCompanyId(companyId, start, end, orderByComparator);
679            }
680    
681            /**
682            * Returns the first user group in the ordered set where companyId = &#63;.
683            *
684            * @param companyId the company ID
685            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
686            * @return the first matching user group
687            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
688            * @throws SystemException if a system exception occurred
689            */
690            public static com.liferay.portal.model.UserGroup findByCompanyId_First(
691                    long companyId,
692                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
693                    throws com.liferay.portal.NoSuchUserGroupException,
694                            com.liferay.portal.kernel.exception.SystemException {
695                    return getPersistence()
696                                       .findByCompanyId_First(companyId, orderByComparator);
697            }
698    
699            /**
700            * Returns the first user group in the ordered set where companyId = &#63;.
701            *
702            * @param companyId the company ID
703            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
704            * @return the first matching user group, or <code>null</code> if a matching user group could not be found
705            * @throws SystemException if a system exception occurred
706            */
707            public static com.liferay.portal.model.UserGroup fetchByCompanyId_First(
708                    long companyId,
709                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
710                    throws com.liferay.portal.kernel.exception.SystemException {
711                    return getPersistence()
712                                       .fetchByCompanyId_First(companyId, orderByComparator);
713            }
714    
715            /**
716            * Returns the last user group in the ordered set where companyId = &#63;.
717            *
718            * @param companyId the company ID
719            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
720            * @return the last matching user group
721            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
722            * @throws SystemException if a system exception occurred
723            */
724            public static com.liferay.portal.model.UserGroup findByCompanyId_Last(
725                    long companyId,
726                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
727                    throws com.liferay.portal.NoSuchUserGroupException,
728                            com.liferay.portal.kernel.exception.SystemException {
729                    return getPersistence()
730                                       .findByCompanyId_Last(companyId, orderByComparator);
731            }
732    
733            /**
734            * Returns the last user group in the ordered set where companyId = &#63;.
735            *
736            * @param companyId the company ID
737            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
738            * @return the last matching user group, or <code>null</code> if a matching user group could not be found
739            * @throws SystemException if a system exception occurred
740            */
741            public static com.liferay.portal.model.UserGroup fetchByCompanyId_Last(
742                    long companyId,
743                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
744                    throws com.liferay.portal.kernel.exception.SystemException {
745                    return getPersistence()
746                                       .fetchByCompanyId_Last(companyId, orderByComparator);
747            }
748    
749            /**
750            * Returns the user groups before and after the current user group in the ordered set where companyId = &#63;.
751            *
752            * @param userGroupId the primary key of the current user group
753            * @param companyId the company ID
754            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
755            * @return the previous, current, and next user group
756            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
757            * @throws SystemException if a system exception occurred
758            */
759            public static com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
760                    long userGroupId, long companyId,
761                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
762                    throws com.liferay.portal.NoSuchUserGroupException,
763                            com.liferay.portal.kernel.exception.SystemException {
764                    return getPersistence()
765                                       .findByCompanyId_PrevAndNext(userGroupId, companyId,
766                            orderByComparator);
767            }
768    
769            /**
770            * Returns all the user groups that the user has permission to view where companyId = &#63;.
771            *
772            * @param companyId the company ID
773            * @return the matching user groups that the user has permission to view
774            * @throws SystemException if a system exception occurred
775            */
776            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
777                    long companyId)
778                    throws com.liferay.portal.kernel.exception.SystemException {
779                    return getPersistence().filterFindByCompanyId(companyId);
780            }
781    
782            /**
783            * Returns a range of all the user groups that the user has permission to view where companyId = &#63;.
784            *
785            * <p>
786            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
787            * </p>
788            *
789            * @param companyId the company ID
790            * @param start the lower bound of the range of user groups
791            * @param end the upper bound of the range of user groups (not inclusive)
792            * @return the range of matching user groups that the user has permission to view
793            * @throws SystemException if a system exception occurred
794            */
795            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
796                    long companyId, int start, int end)
797                    throws com.liferay.portal.kernel.exception.SystemException {
798                    return getPersistence().filterFindByCompanyId(companyId, start, end);
799            }
800    
801            /**
802            * Returns an ordered range of all the user groups that the user has permissions to view where companyId = &#63;.
803            *
804            * <p>
805            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
806            * </p>
807            *
808            * @param companyId the company ID
809            * @param start the lower bound of the range of user groups
810            * @param end the upper bound of the range of user groups (not inclusive)
811            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
812            * @return the ordered range of matching user groups that the user has permission to view
813            * @throws SystemException if a system exception occurred
814            */
815            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
816                    long companyId, int start, int end,
817                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
818                    throws com.liferay.portal.kernel.exception.SystemException {
819                    return getPersistence()
820                                       .filterFindByCompanyId(companyId, start, end,
821                            orderByComparator);
822            }
823    
824            /**
825            * 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;.
826            *
827            * @param userGroupId the primary key of the current user group
828            * @param companyId the company ID
829            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
830            * @return the previous, current, and next user group
831            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
832            * @throws SystemException if a system exception occurred
833            */
834            public static com.liferay.portal.model.UserGroup[] filterFindByCompanyId_PrevAndNext(
835                    long userGroupId, long companyId,
836                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
837                    throws com.liferay.portal.NoSuchUserGroupException,
838                            com.liferay.portal.kernel.exception.SystemException {
839                    return getPersistence()
840                                       .filterFindByCompanyId_PrevAndNext(userGroupId, companyId,
841                            orderByComparator);
842            }
843    
844            /**
845            * Removes all the user groups where companyId = &#63; from the database.
846            *
847            * @param companyId the company ID
848            * @throws SystemException if a system exception occurred
849            */
850            public static void removeByCompanyId(long companyId)
851                    throws com.liferay.portal.kernel.exception.SystemException {
852                    getPersistence().removeByCompanyId(companyId);
853            }
854    
855            /**
856            * Returns the number of user groups where companyId = &#63;.
857            *
858            * @param companyId the company ID
859            * @return the number of matching user groups
860            * @throws SystemException if a system exception occurred
861            */
862            public static int countByCompanyId(long companyId)
863                    throws com.liferay.portal.kernel.exception.SystemException {
864                    return getPersistence().countByCompanyId(companyId);
865            }
866    
867            /**
868            * Returns the number of user groups that the user has permission to view where companyId = &#63;.
869            *
870            * @param companyId the company ID
871            * @return the number of matching user groups that the user has permission to view
872            * @throws SystemException if a system exception occurred
873            */
874            public static int filterCountByCompanyId(long companyId)
875                    throws com.liferay.portal.kernel.exception.SystemException {
876                    return getPersistence().filterCountByCompanyId(companyId);
877            }
878    
879            /**
880            * Returns all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
881            *
882            * @param companyId the company ID
883            * @param parentUserGroupId the parent user group ID
884            * @return the matching user groups
885            * @throws SystemException if a system exception occurred
886            */
887            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
888                    long companyId, long parentUserGroupId)
889                    throws com.liferay.portal.kernel.exception.SystemException {
890                    return getPersistence().findByC_P(companyId, parentUserGroupId);
891            }
892    
893            /**
894            * Returns a range of all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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 companyId the company ID
901            * @param parentUserGroupId the parent user group ID
902            * @param start the lower bound of the range of user groups
903            * @param end the upper bound of the range of user groups (not inclusive)
904            * @return the range of matching user groups
905            * @throws SystemException if a system exception occurred
906            */
907            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
908                    long companyId, long parentUserGroupId, int start, int end)
909                    throws com.liferay.portal.kernel.exception.SystemException {
910                    return getPersistence()
911                                       .findByC_P(companyId, parentUserGroupId, start, end);
912            }
913    
914            /**
915            * Returns an ordered range of all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
916            *
917            * <p>
918            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
919            * </p>
920            *
921            * @param companyId the company ID
922            * @param parentUserGroupId the parent user group ID
923            * @param start the lower bound of the range of user groups
924            * @param end the upper bound of the range of user groups (not inclusive)
925            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
926            * @return the ordered range of matching user groups
927            * @throws SystemException if a system exception occurred
928            */
929            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
930                    long companyId, long parentUserGroupId, int start, int end,
931                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
932                    throws com.liferay.portal.kernel.exception.SystemException {
933                    return getPersistence()
934                                       .findByC_P(companyId, parentUserGroupId, start, end,
935                            orderByComparator);
936            }
937    
938            /**
939            * Returns the first user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
940            *
941            * @param companyId the company ID
942            * @param parentUserGroupId the parent user group ID
943            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
944            * @return the first matching user group
945            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
946            * @throws SystemException if a system exception occurred
947            */
948            public static com.liferay.portal.model.UserGroup findByC_P_First(
949                    long companyId, long parentUserGroupId,
950                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
951                    throws com.liferay.portal.NoSuchUserGroupException,
952                            com.liferay.portal.kernel.exception.SystemException {
953                    return getPersistence()
954                                       .findByC_P_First(companyId, parentUserGroupId,
955                            orderByComparator);
956            }
957    
958            /**
959            * Returns the first user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
960            *
961            * @param companyId the company ID
962            * @param parentUserGroupId the parent user group ID
963            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
964            * @return the first matching user group, or <code>null</code> if a matching user group could not be found
965            * @throws SystemException if a system exception occurred
966            */
967            public static com.liferay.portal.model.UserGroup fetchByC_P_First(
968                    long companyId, long parentUserGroupId,
969                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
970                    throws com.liferay.portal.kernel.exception.SystemException {
971                    return getPersistence()
972                                       .fetchByC_P_First(companyId, parentUserGroupId,
973                            orderByComparator);
974            }
975    
976            /**
977            * Returns the last user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
978            *
979            * @param companyId the company ID
980            * @param parentUserGroupId the parent user group ID
981            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
982            * @return the last matching user group
983            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
984            * @throws SystemException if a system exception occurred
985            */
986            public static com.liferay.portal.model.UserGroup findByC_P_Last(
987                    long companyId, long parentUserGroupId,
988                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
989                    throws com.liferay.portal.NoSuchUserGroupException,
990                            com.liferay.portal.kernel.exception.SystemException {
991                    return getPersistence()
992                                       .findByC_P_Last(companyId, parentUserGroupId,
993                            orderByComparator);
994            }
995    
996            /**
997            * Returns the last user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
998            *
999            * @param companyId the company ID
1000            * @param parentUserGroupId the parent user group ID
1001            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1002            * @return the last matching user group, or <code>null</code> if a matching user group could not be found
1003            * @throws SystemException if a system exception occurred
1004            */
1005            public static com.liferay.portal.model.UserGroup fetchByC_P_Last(
1006                    long companyId, long parentUserGroupId,
1007                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1008                    throws com.liferay.portal.kernel.exception.SystemException {
1009                    return getPersistence()
1010                                       .fetchByC_P_Last(companyId, parentUserGroupId,
1011                            orderByComparator);
1012            }
1013    
1014            /**
1015            * Returns the user groups before and after the current user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
1016            *
1017            * @param userGroupId the primary key of the current user group
1018            * @param companyId the company ID
1019            * @param parentUserGroupId the parent user group ID
1020            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1021            * @return the previous, current, and next user group
1022            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
1023            * @throws SystemException if a system exception occurred
1024            */
1025            public static com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
1026                    long userGroupId, long companyId, long parentUserGroupId,
1027                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1028                    throws com.liferay.portal.NoSuchUserGroupException,
1029                            com.liferay.portal.kernel.exception.SystemException {
1030                    return getPersistence()
1031                                       .findByC_P_PrevAndNext(userGroupId, companyId,
1032                            parentUserGroupId, orderByComparator);
1033            }
1034    
1035            /**
1036            * Returns all the user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
1037            *
1038            * @param companyId the company ID
1039            * @param parentUserGroupId the parent user group ID
1040            * @return the matching user groups that the user has permission to view
1041            * @throws SystemException if a system exception occurred
1042            */
1043            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
1044                    long companyId, long parentUserGroupId)
1045                    throws com.liferay.portal.kernel.exception.SystemException {
1046                    return getPersistence().filterFindByC_P(companyId, parentUserGroupId);
1047            }
1048    
1049            /**
1050            * Returns a range of all the user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
1051            *
1052            * <p>
1053            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
1054            * </p>
1055            *
1056            * @param companyId the company ID
1057            * @param parentUserGroupId the parent user group ID
1058            * @param start the lower bound of the range of user groups
1059            * @param end the upper bound of the range of user groups (not inclusive)
1060            * @return the range of matching user groups that the user has permission to view
1061            * @throws SystemException if a system exception occurred
1062            */
1063            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
1064                    long companyId, long parentUserGroupId, int start, int end)
1065                    throws com.liferay.portal.kernel.exception.SystemException {
1066                    return getPersistence()
1067                                       .filterFindByC_P(companyId, parentUserGroupId, start, end);
1068            }
1069    
1070            /**
1071            * Returns an ordered range of all the user groups that the user has permissions to view where companyId = &#63; and parentUserGroupId = &#63;.
1072            *
1073            * <p>
1074            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
1075            * </p>
1076            *
1077            * @param companyId the company ID
1078            * @param parentUserGroupId the parent user group ID
1079            * @param start the lower bound of the range of user groups
1080            * @param end the upper bound of the range of user groups (not inclusive)
1081            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1082            * @return the ordered range of matching user groups that the user has permission to view
1083            * @throws SystemException if a system exception occurred
1084            */
1085            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
1086                    long companyId, long parentUserGroupId, int start, int end,
1087                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1088                    throws com.liferay.portal.kernel.exception.SystemException {
1089                    return getPersistence()
1090                                       .filterFindByC_P(companyId, parentUserGroupId, start, end,
1091                            orderByComparator);
1092            }
1093    
1094            /**
1095            * 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;.
1096            *
1097            * @param userGroupId the primary key of the current user group
1098            * @param companyId the company ID
1099            * @param parentUserGroupId the parent user group ID
1100            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1101            * @return the previous, current, and next user group
1102            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
1103            * @throws SystemException if a system exception occurred
1104            */
1105            public static com.liferay.portal.model.UserGroup[] filterFindByC_P_PrevAndNext(
1106                    long userGroupId, long companyId, long parentUserGroupId,
1107                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1108                    throws com.liferay.portal.NoSuchUserGroupException,
1109                            com.liferay.portal.kernel.exception.SystemException {
1110                    return getPersistence()
1111                                       .filterFindByC_P_PrevAndNext(userGroupId, companyId,
1112                            parentUserGroupId, orderByComparator);
1113            }
1114    
1115            /**
1116            * Removes all the user groups where companyId = &#63; and parentUserGroupId = &#63; from the database.
1117            *
1118            * @param companyId the company ID
1119            * @param parentUserGroupId the parent user group ID
1120            * @throws SystemException if a system exception occurred
1121            */
1122            public static void removeByC_P(long companyId, long parentUserGroupId)
1123                    throws com.liferay.portal.kernel.exception.SystemException {
1124                    getPersistence().removeByC_P(companyId, parentUserGroupId);
1125            }
1126    
1127            /**
1128            * Returns the number of user groups where companyId = &#63; and parentUserGroupId = &#63;.
1129            *
1130            * @param companyId the company ID
1131            * @param parentUserGroupId the parent user group ID
1132            * @return the number of matching user groups
1133            * @throws SystemException if a system exception occurred
1134            */
1135            public static int countByC_P(long companyId, long parentUserGroupId)
1136                    throws com.liferay.portal.kernel.exception.SystemException {
1137                    return getPersistence().countByC_P(companyId, parentUserGroupId);
1138            }
1139    
1140            /**
1141            * Returns the number of user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
1142            *
1143            * @param companyId the company ID
1144            * @param parentUserGroupId the parent user group ID
1145            * @return the number of matching user groups that the user has permission to view
1146            * @throws SystemException if a system exception occurred
1147            */
1148            public static int filterCountByC_P(long companyId, long parentUserGroupId)
1149                    throws com.liferay.portal.kernel.exception.SystemException {
1150                    return getPersistence().filterCountByC_P(companyId, parentUserGroupId);
1151            }
1152    
1153            /**
1154            * Returns the user group where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found.
1155            *
1156            * @param companyId the company ID
1157            * @param name the name
1158            * @return the matching user group
1159            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
1160            * @throws SystemException if a system exception occurred
1161            */
1162            public static com.liferay.portal.model.UserGroup findByC_N(long companyId,
1163                    java.lang.String name)
1164                    throws com.liferay.portal.NoSuchUserGroupException,
1165                            com.liferay.portal.kernel.exception.SystemException {
1166                    return getPersistence().findByC_N(companyId, name);
1167            }
1168    
1169            /**
1170            * 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.
1171            *
1172            * @param companyId the company ID
1173            * @param name the name
1174            * @return the matching user group, or <code>null</code> if a matching user group could not be found
1175            * @throws SystemException if a system exception occurred
1176            */
1177            public static com.liferay.portal.model.UserGroup fetchByC_N(
1178                    long companyId, java.lang.String name)
1179                    throws com.liferay.portal.kernel.exception.SystemException {
1180                    return getPersistence().fetchByC_N(companyId, name);
1181            }
1182    
1183            /**
1184            * 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.
1185            *
1186            * @param companyId the company ID
1187            * @param name the name
1188            * @param retrieveFromCache whether to use the finder cache
1189            * @return the matching user group, or <code>null</code> if a matching user group could not be found
1190            * @throws SystemException if a system exception occurred
1191            */
1192            public static com.liferay.portal.model.UserGroup fetchByC_N(
1193                    long companyId, java.lang.String name, boolean retrieveFromCache)
1194                    throws com.liferay.portal.kernel.exception.SystemException {
1195                    return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
1196            }
1197    
1198            /**
1199            * Removes the user group where companyId = &#63; and name = &#63; from the database.
1200            *
1201            * @param companyId the company ID
1202            * @param name the name
1203            * @return the user group that was removed
1204            * @throws SystemException if a system exception occurred
1205            */
1206            public static com.liferay.portal.model.UserGroup removeByC_N(
1207                    long companyId, java.lang.String name)
1208                    throws com.liferay.portal.NoSuchUserGroupException,
1209                            com.liferay.portal.kernel.exception.SystemException {
1210                    return getPersistence().removeByC_N(companyId, name);
1211            }
1212    
1213            /**
1214            * Returns the number of user groups where companyId = &#63; and name = &#63;.
1215            *
1216            * @param companyId the company ID
1217            * @param name the name
1218            * @return the number of matching user groups
1219            * @throws SystemException if a system exception occurred
1220            */
1221            public static int countByC_N(long companyId, java.lang.String name)
1222                    throws com.liferay.portal.kernel.exception.SystemException {
1223                    return getPersistence().countByC_N(companyId, name);
1224            }
1225    
1226            /**
1227            * Caches the user group in the entity cache if it is enabled.
1228            *
1229            * @param userGroup the user group
1230            */
1231            public static void cacheResult(com.liferay.portal.model.UserGroup userGroup) {
1232                    getPersistence().cacheResult(userGroup);
1233            }
1234    
1235            /**
1236            * Caches the user groups in the entity cache if it is enabled.
1237            *
1238            * @param userGroups the user groups
1239            */
1240            public static void cacheResult(
1241                    java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
1242                    getPersistence().cacheResult(userGroups);
1243            }
1244    
1245            /**
1246            * Creates a new user group with the primary key. Does not add the user group to the database.
1247            *
1248            * @param userGroupId the primary key for the new user group
1249            * @return the new user group
1250            */
1251            public static com.liferay.portal.model.UserGroup create(long userGroupId) {
1252                    return getPersistence().create(userGroupId);
1253            }
1254    
1255            /**
1256            * Removes the user group with the primary key from the database. Also notifies the appropriate model listeners.
1257            *
1258            * @param userGroupId the primary key of the user group
1259            * @return the user group that was removed
1260            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
1261            * @throws SystemException if a system exception occurred
1262            */
1263            public static com.liferay.portal.model.UserGroup remove(long userGroupId)
1264                    throws com.liferay.portal.NoSuchUserGroupException,
1265                            com.liferay.portal.kernel.exception.SystemException {
1266                    return getPersistence().remove(userGroupId);
1267            }
1268    
1269            public static com.liferay.portal.model.UserGroup updateImpl(
1270                    com.liferay.portal.model.UserGroup userGroup)
1271                    throws com.liferay.portal.kernel.exception.SystemException {
1272                    return getPersistence().updateImpl(userGroup);
1273            }
1274    
1275            /**
1276            * Returns the user group with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found.
1277            *
1278            * @param userGroupId the primary key of the user group
1279            * @return the user group
1280            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
1281            * @throws SystemException if a system exception occurred
1282            */
1283            public static com.liferay.portal.model.UserGroup findByPrimaryKey(
1284                    long userGroupId)
1285                    throws com.liferay.portal.NoSuchUserGroupException,
1286                            com.liferay.portal.kernel.exception.SystemException {
1287                    return getPersistence().findByPrimaryKey(userGroupId);
1288            }
1289    
1290            /**
1291            * Returns the user group with the primary key or returns <code>null</code> if it could not be found.
1292            *
1293            * @param userGroupId the primary key of the user group
1294            * @return the user group, or <code>null</code> if a user group with the primary key could not be found
1295            * @throws SystemException if a system exception occurred
1296            */
1297            public static com.liferay.portal.model.UserGroup fetchByPrimaryKey(
1298                    long userGroupId)
1299                    throws com.liferay.portal.kernel.exception.SystemException {
1300                    return getPersistence().fetchByPrimaryKey(userGroupId);
1301            }
1302    
1303            /**
1304            * Returns all the user groups.
1305            *
1306            * @return the user groups
1307            * @throws SystemException if a system exception occurred
1308            */
1309            public static java.util.List<com.liferay.portal.model.UserGroup> findAll()
1310                    throws com.liferay.portal.kernel.exception.SystemException {
1311                    return getPersistence().findAll();
1312            }
1313    
1314            /**
1315            * Returns a range of all the user groups.
1316            *
1317            * <p>
1318            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
1319            * </p>
1320            *
1321            * @param start the lower bound of the range of user groups
1322            * @param end the upper bound of the range of user groups (not inclusive)
1323            * @return the range of user groups
1324            * @throws SystemException if a system exception occurred
1325            */
1326            public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
1327                    int start, int end)
1328                    throws com.liferay.portal.kernel.exception.SystemException {
1329                    return getPersistence().findAll(start, end);
1330            }
1331    
1332            /**
1333            * Returns an ordered range of all the user groups.
1334            *
1335            * <p>
1336            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
1337            * </p>
1338            *
1339            * @param start the lower bound of the range of user groups
1340            * @param end the upper bound of the range of user groups (not inclusive)
1341            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1342            * @return the ordered range of user groups
1343            * @throws SystemException if a system exception occurred
1344            */
1345            public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
1346                    int start, int end,
1347                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1348                    throws com.liferay.portal.kernel.exception.SystemException {
1349                    return getPersistence().findAll(start, end, orderByComparator);
1350            }
1351    
1352            /**
1353            * Removes all the user groups from the database.
1354            *
1355            * @throws SystemException if a system exception occurred
1356            */
1357            public static void removeAll()
1358                    throws com.liferay.portal.kernel.exception.SystemException {
1359                    getPersistence().removeAll();
1360            }
1361    
1362            /**
1363            * Returns the number of user groups.
1364            *
1365            * @return the number of user groups
1366            * @throws SystemException if a system exception occurred
1367            */
1368            public static int countAll()
1369                    throws com.liferay.portal.kernel.exception.SystemException {
1370                    return getPersistence().countAll();
1371            }
1372    
1373            /**
1374            * Returns all the groups associated with the user group.
1375            *
1376            * @param pk the primary key of the user group
1377            * @return the groups associated with the user group
1378            * @throws SystemException if a system exception occurred
1379            */
1380            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1381                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1382                    return getPersistence().getGroups(pk);
1383            }
1384    
1385            /**
1386            * Returns a range of all the groups associated with the user group.
1387            *
1388            * <p>
1389            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
1390            * </p>
1391            *
1392            * @param pk the primary key of the user group
1393            * @param start the lower bound of the range of user groups
1394            * @param end the upper bound of the range of user groups (not inclusive)
1395            * @return the range of groups associated with the user group
1396            * @throws SystemException if a system exception occurred
1397            */
1398            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1399                    long pk, int start, int end)
1400                    throws com.liferay.portal.kernel.exception.SystemException {
1401                    return getPersistence().getGroups(pk, start, end);
1402            }
1403    
1404            /**
1405            * Returns an ordered range of all the groups associated with the user group.
1406            *
1407            * <p>
1408            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
1409            * </p>
1410            *
1411            * @param pk the primary key of the user group
1412            * @param start the lower bound of the range of user groups
1413            * @param end the upper bound of the range of user groups (not inclusive)
1414            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1415            * @return the ordered range of groups associated with the user group
1416            * @throws SystemException if a system exception occurred
1417            */
1418            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1419                    long pk, int start, int end,
1420                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1421                    throws com.liferay.portal.kernel.exception.SystemException {
1422                    return getPersistence().getGroups(pk, start, end, orderByComparator);
1423            }
1424    
1425            /**
1426            * Returns the number of groups associated with the user group.
1427            *
1428            * @param pk the primary key of the user group
1429            * @return the number of groups associated with the user group
1430            * @throws SystemException if a system exception occurred
1431            */
1432            public static int getGroupsSize(long pk)
1433                    throws com.liferay.portal.kernel.exception.SystemException {
1434                    return getPersistence().getGroupsSize(pk);
1435            }
1436    
1437            /**
1438            * Returns <code>true</code> if the group is associated with the user group.
1439            *
1440            * @param pk the primary key of the user group
1441            * @param groupPK the primary key of the group
1442            * @return <code>true</code> if the group is associated with the user group; <code>false</code> otherwise
1443            * @throws SystemException if a system exception occurred
1444            */
1445            public static boolean containsGroup(long pk, long groupPK)
1446                    throws com.liferay.portal.kernel.exception.SystemException {
1447                    return getPersistence().containsGroup(pk, groupPK);
1448            }
1449    
1450            /**
1451            * Returns <code>true</code> if the user group has any groups associated with it.
1452            *
1453            * @param pk the primary key of the user group to check for associations with groups
1454            * @return <code>true</code> if the user group has any groups associated with it; <code>false</code> otherwise
1455            * @throws SystemException if a system exception occurred
1456            */
1457            public static boolean containsGroups(long pk)
1458                    throws com.liferay.portal.kernel.exception.SystemException {
1459                    return getPersistence().containsGroups(pk);
1460            }
1461    
1462            /**
1463            * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1464            *
1465            * @param pk the primary key of the user group
1466            * @param groupPK the primary key of the group
1467            * @throws SystemException if a system exception occurred
1468            */
1469            public static void addGroup(long pk, long groupPK)
1470                    throws com.liferay.portal.kernel.exception.SystemException {
1471                    getPersistence().addGroup(pk, groupPK);
1472            }
1473    
1474            /**
1475            * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1476            *
1477            * @param pk the primary key of the user group
1478            * @param group the group
1479            * @throws SystemException if a system exception occurred
1480            */
1481            public static void addGroup(long pk, com.liferay.portal.model.Group group)
1482                    throws com.liferay.portal.kernel.exception.SystemException {
1483                    getPersistence().addGroup(pk, group);
1484            }
1485    
1486            /**
1487            * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1488            *
1489            * @param pk the primary key of the user group
1490            * @param groupPKs the primary keys of the groups
1491            * @throws SystemException if a system exception occurred
1492            */
1493            public static void addGroups(long pk, long[] groupPKs)
1494                    throws com.liferay.portal.kernel.exception.SystemException {
1495                    getPersistence().addGroups(pk, groupPKs);
1496            }
1497    
1498            /**
1499            * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1500            *
1501            * @param pk the primary key of the user group
1502            * @param groups the groups
1503            * @throws SystemException if a system exception occurred
1504            */
1505            public static void addGroups(long pk,
1506                    java.util.List<com.liferay.portal.model.Group> groups)
1507                    throws com.liferay.portal.kernel.exception.SystemException {
1508                    getPersistence().addGroups(pk, groups);
1509            }
1510    
1511            /**
1512            * Clears all associations between the user group and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1513            *
1514            * @param pk the primary key of the user group to clear the associated groups from
1515            * @throws SystemException if a system exception occurred
1516            */
1517            public static void clearGroups(long pk)
1518                    throws com.liferay.portal.kernel.exception.SystemException {
1519                    getPersistence().clearGroups(pk);
1520            }
1521    
1522            /**
1523            * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1524            *
1525            * @param pk the primary key of the user group
1526            * @param groupPK the primary key of the group
1527            * @throws SystemException if a system exception occurred
1528            */
1529            public static void removeGroup(long pk, long groupPK)
1530                    throws com.liferay.portal.kernel.exception.SystemException {
1531                    getPersistence().removeGroup(pk, groupPK);
1532            }
1533    
1534            /**
1535            * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1536            *
1537            * @param pk the primary key of the user group
1538            * @param group the group
1539            * @throws SystemException if a system exception occurred
1540            */
1541            public static void removeGroup(long pk, com.liferay.portal.model.Group group)
1542                    throws com.liferay.portal.kernel.exception.SystemException {
1543                    getPersistence().removeGroup(pk, group);
1544            }
1545    
1546            /**
1547            * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1548            *
1549            * @param pk the primary key of the user group
1550            * @param groupPKs the primary keys of the groups
1551            * @throws SystemException if a system exception occurred
1552            */
1553            public static void removeGroups(long pk, long[] groupPKs)
1554                    throws com.liferay.portal.kernel.exception.SystemException {
1555                    getPersistence().removeGroups(pk, groupPKs);
1556            }
1557    
1558            /**
1559            * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1560            *
1561            * @param pk the primary key of the user group
1562            * @param groups the groups
1563            * @throws SystemException if a system exception occurred
1564            */
1565            public static void removeGroups(long pk,
1566                    java.util.List<com.liferay.portal.model.Group> groups)
1567                    throws com.liferay.portal.kernel.exception.SystemException {
1568                    getPersistence().removeGroups(pk, groups);
1569            }
1570    
1571            /**
1572            * 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.
1573            *
1574            * @param pk the primary key of the user group
1575            * @param groupPKs the primary keys of the groups to be associated with the user group
1576            * @throws SystemException if a system exception occurred
1577            */
1578            public static void setGroups(long pk, long[] groupPKs)
1579                    throws com.liferay.portal.kernel.exception.SystemException {
1580                    getPersistence().setGroups(pk, groupPKs);
1581            }
1582    
1583            /**
1584            * 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.
1585            *
1586            * @param pk the primary key of the user group
1587            * @param groups the groups to be associated with the user group
1588            * @throws SystemException if a system exception occurred
1589            */
1590            public static void setGroups(long pk,
1591                    java.util.List<com.liferay.portal.model.Group> groups)
1592                    throws com.liferay.portal.kernel.exception.SystemException {
1593                    getPersistence().setGroups(pk, groups);
1594            }
1595    
1596            /**
1597            * Returns all the teams associated with the user group.
1598            *
1599            * @param pk the primary key of the user group
1600            * @return the teams associated with the user group
1601            * @throws SystemException if a system exception occurred
1602            */
1603            public static java.util.List<com.liferay.portal.model.Team> getTeams(
1604                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1605                    return getPersistence().getTeams(pk);
1606            }
1607    
1608            /**
1609            * Returns a range of all the teams associated with the user group.
1610            *
1611            * <p>
1612            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
1613            * </p>
1614            *
1615            * @param pk the primary key of the user group
1616            * @param start the lower bound of the range of user groups
1617            * @param end the upper bound of the range of user groups (not inclusive)
1618            * @return the range of teams associated with the user group
1619            * @throws SystemException if a system exception occurred
1620            */
1621            public static java.util.List<com.liferay.portal.model.Team> getTeams(
1622                    long pk, int start, int end)
1623                    throws com.liferay.portal.kernel.exception.SystemException {
1624                    return getPersistence().getTeams(pk, start, end);
1625            }
1626    
1627            /**
1628            * Returns an ordered range of all the teams associated with the user group.
1629            *
1630            * <p>
1631            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
1632            * </p>
1633            *
1634            * @param pk the primary key of the user group
1635            * @param start the lower bound of the range of user groups
1636            * @param end the upper bound of the range of user groups (not inclusive)
1637            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1638            * @return the ordered range of teams associated with the user group
1639            * @throws SystemException if a system exception occurred
1640            */
1641            public static java.util.List<com.liferay.portal.model.Team> getTeams(
1642                    long pk, int start, int end,
1643                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1644                    throws com.liferay.portal.kernel.exception.SystemException {
1645                    return getPersistence().getTeams(pk, start, end, orderByComparator);
1646            }
1647    
1648            /**
1649            * Returns the number of teams associated with the user group.
1650            *
1651            * @param pk the primary key of the user group
1652            * @return the number of teams associated with the user group
1653            * @throws SystemException if a system exception occurred
1654            */
1655            public static int getTeamsSize(long pk)
1656                    throws com.liferay.portal.kernel.exception.SystemException {
1657                    return getPersistence().getTeamsSize(pk);
1658            }
1659    
1660            /**
1661            * Returns <code>true</code> if the team is associated with the user group.
1662            *
1663            * @param pk the primary key of the user group
1664            * @param teamPK the primary key of the team
1665            * @return <code>true</code> if the team is associated with the user group; <code>false</code> otherwise
1666            * @throws SystemException if a system exception occurred
1667            */
1668            public static boolean containsTeam(long pk, long teamPK)
1669                    throws com.liferay.portal.kernel.exception.SystemException {
1670                    return getPersistence().containsTeam(pk, teamPK);
1671            }
1672    
1673            /**
1674            * Returns <code>true</code> if the user group has any teams associated with it.
1675            *
1676            * @param pk the primary key of the user group to check for associations with teams
1677            * @return <code>true</code> if the user group has any teams associated with it; <code>false</code> otherwise
1678            * @throws SystemException if a system exception occurred
1679            */
1680            public static boolean containsTeams(long pk)
1681                    throws com.liferay.portal.kernel.exception.SystemException {
1682                    return getPersistence().containsTeams(pk);
1683            }
1684    
1685            /**
1686            * Adds an association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1687            *
1688            * @param pk the primary key of the user group
1689            * @param teamPK the primary key of the team
1690            * @throws SystemException if a system exception occurred
1691            */
1692            public static void addTeam(long pk, long teamPK)
1693                    throws com.liferay.portal.kernel.exception.SystemException {
1694                    getPersistence().addTeam(pk, teamPK);
1695            }
1696    
1697            /**
1698            * Adds an association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1699            *
1700            * @param pk the primary key of the user group
1701            * @param team the team
1702            * @throws SystemException if a system exception occurred
1703            */
1704            public static void addTeam(long pk, com.liferay.portal.model.Team team)
1705                    throws com.liferay.portal.kernel.exception.SystemException {
1706                    getPersistence().addTeam(pk, team);
1707            }
1708    
1709            /**
1710            * Adds an association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1711            *
1712            * @param pk the primary key of the user group
1713            * @param teamPKs the primary keys of the teams
1714            * @throws SystemException if a system exception occurred
1715            */
1716            public static void addTeams(long pk, long[] teamPKs)
1717                    throws com.liferay.portal.kernel.exception.SystemException {
1718                    getPersistence().addTeams(pk, teamPKs);
1719            }
1720    
1721            /**
1722            * Adds an association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1723            *
1724            * @param pk the primary key of the user group
1725            * @param teams the teams
1726            * @throws SystemException if a system exception occurred
1727            */
1728            public static void addTeams(long pk,
1729                    java.util.List<com.liferay.portal.model.Team> teams)
1730                    throws com.liferay.portal.kernel.exception.SystemException {
1731                    getPersistence().addTeams(pk, teams);
1732            }
1733    
1734            /**
1735            * Clears all associations between the user group and its teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1736            *
1737            * @param pk the primary key of the user group to clear the associated teams from
1738            * @throws SystemException if a system exception occurred
1739            */
1740            public static void clearTeams(long pk)
1741                    throws com.liferay.portal.kernel.exception.SystemException {
1742                    getPersistence().clearTeams(pk);
1743            }
1744    
1745            /**
1746            * Removes the association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1747            *
1748            * @param pk the primary key of the user group
1749            * @param teamPK the primary key of the team
1750            * @throws SystemException if a system exception occurred
1751            */
1752            public static void removeTeam(long pk, long teamPK)
1753                    throws com.liferay.portal.kernel.exception.SystemException {
1754                    getPersistence().removeTeam(pk, teamPK);
1755            }
1756    
1757            /**
1758            * Removes the association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1759            *
1760            * @param pk the primary key of the user group
1761            * @param team the team
1762            * @throws SystemException if a system exception occurred
1763            */
1764            public static void removeTeam(long pk, com.liferay.portal.model.Team team)
1765                    throws com.liferay.portal.kernel.exception.SystemException {
1766                    getPersistence().removeTeam(pk, team);
1767            }
1768    
1769            /**
1770            * Removes the association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1771            *
1772            * @param pk the primary key of the user group
1773            * @param teamPKs the primary keys of the teams
1774            * @throws SystemException if a system exception occurred
1775            */
1776            public static void removeTeams(long pk, long[] teamPKs)
1777                    throws com.liferay.portal.kernel.exception.SystemException {
1778                    getPersistence().removeTeams(pk, teamPKs);
1779            }
1780    
1781            /**
1782            * Removes the association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1783            *
1784            * @param pk the primary key of the user group
1785            * @param teams the teams
1786            * @throws SystemException if a system exception occurred
1787            */
1788            public static void removeTeams(long pk,
1789                    java.util.List<com.liferay.portal.model.Team> teams)
1790                    throws com.liferay.portal.kernel.exception.SystemException {
1791                    getPersistence().removeTeams(pk, teams);
1792            }
1793    
1794            /**
1795            * 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.
1796            *
1797            * @param pk the primary key of the user group
1798            * @param teamPKs the primary keys of the teams to be associated with the user group
1799            * @throws SystemException if a system exception occurred
1800            */
1801            public static void setTeams(long pk, long[] teamPKs)
1802                    throws com.liferay.portal.kernel.exception.SystemException {
1803                    getPersistence().setTeams(pk, teamPKs);
1804            }
1805    
1806            /**
1807            * 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.
1808            *
1809            * @param pk the primary key of the user group
1810            * @param teams the teams to be associated with the user group
1811            * @throws SystemException if a system exception occurred
1812            */
1813            public static void setTeams(long pk,
1814                    java.util.List<com.liferay.portal.model.Team> teams)
1815                    throws com.liferay.portal.kernel.exception.SystemException {
1816                    getPersistence().setTeams(pk, teams);
1817            }
1818    
1819            /**
1820            * Returns all the users associated with the user group.
1821            *
1822            * @param pk the primary key of the user group
1823            * @return the users associated with the user group
1824            * @throws SystemException if a system exception occurred
1825            */
1826            public static java.util.List<com.liferay.portal.model.User> getUsers(
1827                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1828                    return getPersistence().getUsers(pk);
1829            }
1830    
1831            /**
1832            * Returns a range of all the users associated with the user group.
1833            *
1834            * <p>
1835            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
1836            * </p>
1837            *
1838            * @param pk the primary key of the user group
1839            * @param start the lower bound of the range of user groups
1840            * @param end the upper bound of the range of user groups (not inclusive)
1841            * @return the range of users associated with the user group
1842            * @throws SystemException if a system exception occurred
1843            */
1844            public static java.util.List<com.liferay.portal.model.User> getUsers(
1845                    long pk, int start, int end)
1846                    throws com.liferay.portal.kernel.exception.SystemException {
1847                    return getPersistence().getUsers(pk, start, end);
1848            }
1849    
1850            /**
1851            * Returns an ordered range of all the users associated with the user group.
1852            *
1853            * <p>
1854            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. 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.
1855            * </p>
1856            *
1857            * @param pk the primary key of the user group
1858            * @param start the lower bound of the range of user groups
1859            * @param end the upper bound of the range of user groups (not inclusive)
1860            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1861            * @return the ordered range of users associated with the user group
1862            * @throws SystemException if a system exception occurred
1863            */
1864            public static java.util.List<com.liferay.portal.model.User> getUsers(
1865                    long pk, int start, int end,
1866                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1867                    throws com.liferay.portal.kernel.exception.SystemException {
1868                    return getPersistence().getUsers(pk, start, end, orderByComparator);
1869            }
1870    
1871            /**
1872            * Returns the number of users associated with the user group.
1873            *
1874            * @param pk the primary key of the user group
1875            * @return the number of users associated with the user group
1876            * @throws SystemException if a system exception occurred
1877            */
1878            public static int getUsersSize(long pk)
1879                    throws com.liferay.portal.kernel.exception.SystemException {
1880                    return getPersistence().getUsersSize(pk);
1881            }
1882    
1883            /**
1884            * Returns <code>true</code> if the user is associated with the user group.
1885            *
1886            * @param pk the primary key of the user group
1887            * @param userPK the primary key of the user
1888            * @return <code>true</code> if the user is associated with the user group; <code>false</code> otherwise
1889            * @throws SystemException if a system exception occurred
1890            */
1891            public static boolean containsUser(long pk, long userPK)
1892                    throws com.liferay.portal.kernel.exception.SystemException {
1893                    return getPersistence().containsUser(pk, userPK);
1894            }
1895    
1896            /**
1897            * Returns <code>true</code> if the user group has any users associated with it.
1898            *
1899            * @param pk the primary key of the user group to check for associations with users
1900            * @return <code>true</code> if the user group has any users associated with it; <code>false</code> otherwise
1901            * @throws SystemException if a system exception occurred
1902            */
1903            public static boolean containsUsers(long pk)
1904                    throws com.liferay.portal.kernel.exception.SystemException {
1905                    return getPersistence().containsUsers(pk);
1906            }
1907    
1908            /**
1909            * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1910            *
1911            * @param pk the primary key of the user group
1912            * @param userPK the primary key of the user
1913            * @throws SystemException if a system exception occurred
1914            */
1915            public static void addUser(long pk, long userPK)
1916                    throws com.liferay.portal.kernel.exception.SystemException {
1917                    getPersistence().addUser(pk, userPK);
1918            }
1919    
1920            /**
1921            * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1922            *
1923            * @param pk the primary key of the user group
1924            * @param user the user
1925            * @throws SystemException if a system exception occurred
1926            */
1927            public static void addUser(long pk, com.liferay.portal.model.User user)
1928                    throws com.liferay.portal.kernel.exception.SystemException {
1929                    getPersistence().addUser(pk, user);
1930            }
1931    
1932            /**
1933            * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1934            *
1935            * @param pk the primary key of the user group
1936            * @param userPKs the primary keys of the users
1937            * @throws SystemException if a system exception occurred
1938            */
1939            public static void addUsers(long pk, long[] userPKs)
1940                    throws com.liferay.portal.kernel.exception.SystemException {
1941                    getPersistence().addUsers(pk, userPKs);
1942            }
1943    
1944            /**
1945            * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1946            *
1947            * @param pk the primary key of the user group
1948            * @param users the users
1949            * @throws SystemException if a system exception occurred
1950            */
1951            public static void addUsers(long pk,
1952                    java.util.List<com.liferay.portal.model.User> users)
1953                    throws com.liferay.portal.kernel.exception.SystemException {
1954                    getPersistence().addUsers(pk, users);
1955            }
1956    
1957            /**
1958            * Clears all associations between the user group and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1959            *
1960            * @param pk the primary key of the user group to clear the associated users from
1961            * @throws SystemException if a system exception occurred
1962            */
1963            public static void clearUsers(long pk)
1964                    throws com.liferay.portal.kernel.exception.SystemException {
1965                    getPersistence().clearUsers(pk);
1966            }
1967    
1968            /**
1969            * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1970            *
1971            * @param pk the primary key of the user group
1972            * @param userPK the primary key of the user
1973            * @throws SystemException if a system exception occurred
1974            */
1975            public static void removeUser(long pk, long userPK)
1976                    throws com.liferay.portal.kernel.exception.SystemException {
1977                    getPersistence().removeUser(pk, userPK);
1978            }
1979    
1980            /**
1981            * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1982            *
1983            * @param pk the primary key of the user group
1984            * @param user the user
1985            * @throws SystemException if a system exception occurred
1986            */
1987            public static void removeUser(long pk, com.liferay.portal.model.User user)
1988                    throws com.liferay.portal.kernel.exception.SystemException {
1989                    getPersistence().removeUser(pk, user);
1990            }
1991    
1992            /**
1993            * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1994            *
1995            * @param pk the primary key of the user group
1996            * @param userPKs the primary keys of the users
1997            * @throws SystemException if a system exception occurred
1998            */
1999            public static void removeUsers(long pk, long[] userPKs)
2000                    throws com.liferay.portal.kernel.exception.SystemException {
2001                    getPersistence().removeUsers(pk, userPKs);
2002            }
2003    
2004            /**
2005            * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2006            *
2007            * @param pk the primary key of the user group
2008            * @param users the users
2009            * @throws SystemException if a system exception occurred
2010            */
2011            public static void removeUsers(long pk,
2012                    java.util.List<com.liferay.portal.model.User> users)
2013                    throws com.liferay.portal.kernel.exception.SystemException {
2014                    getPersistence().removeUsers(pk, users);
2015            }
2016    
2017            /**
2018            * 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.
2019            *
2020            * @param pk the primary key of the user group
2021            * @param userPKs the primary keys of the users to be associated with the user group
2022            * @throws SystemException if a system exception occurred
2023            */
2024            public static void setUsers(long pk, long[] userPKs)
2025                    throws com.liferay.portal.kernel.exception.SystemException {
2026                    getPersistence().setUsers(pk, userPKs);
2027            }
2028    
2029            /**
2030            * 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.
2031            *
2032            * @param pk the primary key of the user group
2033            * @param users the users to be associated with the user group
2034            * @throws SystemException if a system exception occurred
2035            */
2036            public static void setUsers(long pk,
2037                    java.util.List<com.liferay.portal.model.User> users)
2038                    throws com.liferay.portal.kernel.exception.SystemException {
2039                    getPersistence().setUsers(pk, users);
2040            }
2041    
2042            public static UserGroupPersistence getPersistence() {
2043                    if (_persistence == null) {
2044                            _persistence = (UserGroupPersistence)PortalBeanLocatorUtil.locate(UserGroupPersistence.class.getName());
2045    
2046                            ReferenceRegistry.registerReference(UserGroupUtil.class,
2047                                    "_persistence");
2048                    }
2049    
2050                    return _persistence;
2051            }
2052    
2053            /**
2054             * @deprecated As of 6.2.0
2055             */
2056            public void setPersistence(UserGroupPersistence persistence) {
2057            }
2058    
2059            private static UserGroupPersistence _persistence;
2060    }