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