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