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