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.UserGroupRole;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the user group role service. This utility wraps {@link UserGroupRolePersistenceImpl} 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 UserGroupRolePersistence
037     * @see UserGroupRolePersistenceImpl
038     * @generated
039     */
040    @ProviderType
041    public class UserGroupRoleUtil {
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(UserGroupRole userGroupRole) {
059                    getPersistence().clearCache(userGroupRole);
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<UserGroupRole> 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<UserGroupRole> 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<UserGroupRole> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator<UserGroupRole> 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 UserGroupRole update(UserGroupRole userGroupRole) {
100                    return getPersistence().update(userGroupRole);
101            }
102    
103            /**
104             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
105             */
106            public static UserGroupRole update(UserGroupRole userGroupRole,
107                    ServiceContext serviceContext) {
108                    return getPersistence().update(userGroupRole, serviceContext);
109            }
110    
111            /**
112            * Returns all the user group roles where userId = &#63;.
113            *
114            * @param userId the user ID
115            * @return the matching user group roles
116            */
117            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
118                    long userId) {
119                    return getPersistence().findByUserId(userId);
120            }
121    
122            /**
123            * Returns a range of all the user group roles where userId = &#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.UserGroupRoleModelImpl}. 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 userId the user ID
130            * @param start the lower bound of the range of user group roles
131            * @param end the upper bound of the range of user group roles (not inclusive)
132            * @return the range of matching user group roles
133            */
134            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
135                    long userId, int start, int end) {
136                    return getPersistence().findByUserId(userId, start, end);
137            }
138    
139            /**
140            * Returns an ordered range of all the user group roles where userId = &#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.UserGroupRoleModelImpl}. 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 userId the user ID
147            * @param start the lower bound of the range of user group roles
148            * @param end the upper bound of the range of user group roles (not inclusive)
149            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
150            * @return the ordered range of matching user group roles
151            */
152            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
153                    long userId, int start, int end,
154                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
155                    return getPersistence()
156                                       .findByUserId(userId, start, end, orderByComparator);
157            }
158    
159            /**
160            * Returns the first user group role in the ordered set where userId = &#63;.
161            *
162            * @param userId the user ID
163            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
164            * @return the first matching user group role
165            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
166            */
167            public static com.liferay.portal.model.UserGroupRole findByUserId_First(
168                    long userId,
169                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
170                    throws com.liferay.portal.NoSuchUserGroupRoleException {
171                    return getPersistence().findByUserId_First(userId, orderByComparator);
172            }
173    
174            /**
175            * Returns the first user group role in the ordered set where userId = &#63;.
176            *
177            * @param userId the user ID
178            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
179            * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found
180            */
181            public static com.liferay.portal.model.UserGroupRole fetchByUserId_First(
182                    long userId,
183                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
184                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
185            }
186    
187            /**
188            * Returns the last user group role in the ordered set where userId = &#63;.
189            *
190            * @param userId the user ID
191            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
192            * @return the last matching user group role
193            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
194            */
195            public static com.liferay.portal.model.UserGroupRole findByUserId_Last(
196                    long userId,
197                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
198                    throws com.liferay.portal.NoSuchUserGroupRoleException {
199                    return getPersistence().findByUserId_Last(userId, orderByComparator);
200            }
201    
202            /**
203            * Returns the last user group role in the ordered set where userId = &#63;.
204            *
205            * @param userId the user ID
206            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
207            * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found
208            */
209            public static com.liferay.portal.model.UserGroupRole fetchByUserId_Last(
210                    long userId,
211                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
212                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
213            }
214    
215            /**
216            * Returns the user group roles before and after the current user group role in the ordered set where userId = &#63;.
217            *
218            * @param userGroupRolePK the primary key of the current user group role
219            * @param userId the user ID
220            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
221            * @return the previous, current, and next user group role
222            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
223            */
224            public static com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
225                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
226                    long userId,
227                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
228                    throws com.liferay.portal.NoSuchUserGroupRoleException {
229                    return getPersistence()
230                                       .findByUserId_PrevAndNext(userGroupRolePK, userId,
231                            orderByComparator);
232            }
233    
234            /**
235            * Removes all the user group roles where userId = &#63; from the database.
236            *
237            * @param userId the user ID
238            */
239            public static void removeByUserId(long userId) {
240                    getPersistence().removeByUserId(userId);
241            }
242    
243            /**
244            * Returns the number of user group roles where userId = &#63;.
245            *
246            * @param userId the user ID
247            * @return the number of matching user group roles
248            */
249            public static int countByUserId(long userId) {
250                    return getPersistence().countByUserId(userId);
251            }
252    
253            /**
254            * Returns all the user group roles where groupId = &#63;.
255            *
256            * @param groupId the group ID
257            * @return the matching user group roles
258            */
259            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
260                    long groupId) {
261                    return getPersistence().findByGroupId(groupId);
262            }
263    
264            /**
265            * Returns a range of all the user group roles where groupId = &#63;.
266            *
267            * <p>
268            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupRoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
269            * </p>
270            *
271            * @param groupId the group ID
272            * @param start the lower bound of the range of user group roles
273            * @param end the upper bound of the range of user group roles (not inclusive)
274            * @return the range of matching user group roles
275            */
276            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
277                    long groupId, int start, int end) {
278                    return getPersistence().findByGroupId(groupId, start, end);
279            }
280    
281            /**
282            * Returns an ordered range of all the user group roles where groupId = &#63;.
283            *
284            * <p>
285            * 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.UserGroupRoleModelImpl}. 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.
286            * </p>
287            *
288            * @param groupId the group ID
289            * @param start the lower bound of the range of user group roles
290            * @param end the upper bound of the range of user group roles (not inclusive)
291            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
292            * @return the ordered range of matching user group roles
293            */
294            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
295                    long groupId, int start, int end,
296                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
297                    return getPersistence()
298                                       .findByGroupId(groupId, start, end, orderByComparator);
299            }
300    
301            /**
302            * Returns the first user group role in the ordered set where groupId = &#63;.
303            *
304            * @param groupId the group ID
305            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
306            * @return the first matching user group role
307            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
308            */
309            public static com.liferay.portal.model.UserGroupRole findByGroupId_First(
310                    long groupId,
311                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
312                    throws com.liferay.portal.NoSuchUserGroupRoleException {
313                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
314            }
315    
316            /**
317            * Returns the first user group role in the ordered set where groupId = &#63;.
318            *
319            * @param groupId the group ID
320            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
321            * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found
322            */
323            public static com.liferay.portal.model.UserGroupRole fetchByGroupId_First(
324                    long groupId,
325                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
326                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
327            }
328    
329            /**
330            * Returns the last user group role in the ordered set where groupId = &#63;.
331            *
332            * @param groupId the group ID
333            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
334            * @return the last matching user group role
335            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
336            */
337            public static com.liferay.portal.model.UserGroupRole findByGroupId_Last(
338                    long groupId,
339                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
340                    throws com.liferay.portal.NoSuchUserGroupRoleException {
341                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
342            }
343    
344            /**
345            * Returns the last user group role in the ordered set where groupId = &#63;.
346            *
347            * @param groupId the group ID
348            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
349            * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found
350            */
351            public static com.liferay.portal.model.UserGroupRole fetchByGroupId_Last(
352                    long groupId,
353                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
354                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
355            }
356    
357            /**
358            * Returns the user group roles before and after the current user group role in the ordered set where groupId = &#63;.
359            *
360            * @param userGroupRolePK the primary key of the current user group role
361            * @param groupId the group ID
362            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
363            * @return the previous, current, and next user group role
364            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
365            */
366            public static com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
367                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
368                    long groupId,
369                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
370                    throws com.liferay.portal.NoSuchUserGroupRoleException {
371                    return getPersistence()
372                                       .findByGroupId_PrevAndNext(userGroupRolePK, groupId,
373                            orderByComparator);
374            }
375    
376            /**
377            * Removes all the user group roles where groupId = &#63; from the database.
378            *
379            * @param groupId the group ID
380            */
381            public static void removeByGroupId(long groupId) {
382                    getPersistence().removeByGroupId(groupId);
383            }
384    
385            /**
386            * Returns the number of user group roles where groupId = &#63;.
387            *
388            * @param groupId the group ID
389            * @return the number of matching user group roles
390            */
391            public static int countByGroupId(long groupId) {
392                    return getPersistence().countByGroupId(groupId);
393            }
394    
395            /**
396            * Returns all the user group roles where roleId = &#63;.
397            *
398            * @param roleId the role ID
399            * @return the matching user group roles
400            */
401            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
402                    long roleId) {
403                    return getPersistence().findByRoleId(roleId);
404            }
405    
406            /**
407            * Returns a range of all the user group roles where roleId = &#63;.
408            *
409            * <p>
410            * 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.UserGroupRoleModelImpl}. 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.
411            * </p>
412            *
413            * @param roleId the role ID
414            * @param start the lower bound of the range of user group roles
415            * @param end the upper bound of the range of user group roles (not inclusive)
416            * @return the range of matching user group roles
417            */
418            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
419                    long roleId, int start, int end) {
420                    return getPersistence().findByRoleId(roleId, start, end);
421            }
422    
423            /**
424            * Returns an ordered range of all the user group roles where roleId = &#63;.
425            *
426            * <p>
427            * 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.UserGroupRoleModelImpl}. 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.
428            * </p>
429            *
430            * @param roleId the role ID
431            * @param start the lower bound of the range of user group roles
432            * @param end the upper bound of the range of user group roles (not inclusive)
433            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
434            * @return the ordered range of matching user group roles
435            */
436            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
437                    long roleId, int start, int end,
438                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
439                    return getPersistence()
440                                       .findByRoleId(roleId, start, end, orderByComparator);
441            }
442    
443            /**
444            * Returns the first user group role in the ordered set where roleId = &#63;.
445            *
446            * @param roleId the role ID
447            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
448            * @return the first matching user group role
449            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
450            */
451            public static com.liferay.portal.model.UserGroupRole findByRoleId_First(
452                    long roleId,
453                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
454                    throws com.liferay.portal.NoSuchUserGroupRoleException {
455                    return getPersistence().findByRoleId_First(roleId, orderByComparator);
456            }
457    
458            /**
459            * Returns the first user group role in the ordered set where roleId = &#63;.
460            *
461            * @param roleId the role ID
462            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
463            * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found
464            */
465            public static com.liferay.portal.model.UserGroupRole fetchByRoleId_First(
466                    long roleId,
467                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
468                    return getPersistence().fetchByRoleId_First(roleId, orderByComparator);
469            }
470    
471            /**
472            * Returns the last user group role in the ordered set where roleId = &#63;.
473            *
474            * @param roleId the role ID
475            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
476            * @return the last matching user group role
477            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
478            */
479            public static com.liferay.portal.model.UserGroupRole findByRoleId_Last(
480                    long roleId,
481                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
482                    throws com.liferay.portal.NoSuchUserGroupRoleException {
483                    return getPersistence().findByRoleId_Last(roleId, orderByComparator);
484            }
485    
486            /**
487            * Returns the last user group role in the ordered set where roleId = &#63;.
488            *
489            * @param roleId the role ID
490            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
491            * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found
492            */
493            public static com.liferay.portal.model.UserGroupRole fetchByRoleId_Last(
494                    long roleId,
495                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
496                    return getPersistence().fetchByRoleId_Last(roleId, orderByComparator);
497            }
498    
499            /**
500            * Returns the user group roles before and after the current user group role in the ordered set where roleId = &#63;.
501            *
502            * @param userGroupRolePK the primary key of the current user group role
503            * @param roleId the role ID
504            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
505            * @return the previous, current, and next user group role
506            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
507            */
508            public static com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
509                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
510                    long roleId,
511                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
512                    throws com.liferay.portal.NoSuchUserGroupRoleException {
513                    return getPersistence()
514                                       .findByRoleId_PrevAndNext(userGroupRolePK, roleId,
515                            orderByComparator);
516            }
517    
518            /**
519            * Removes all the user group roles where roleId = &#63; from the database.
520            *
521            * @param roleId the role ID
522            */
523            public static void removeByRoleId(long roleId) {
524                    getPersistence().removeByRoleId(roleId);
525            }
526    
527            /**
528            * Returns the number of user group roles where roleId = &#63;.
529            *
530            * @param roleId the role ID
531            * @return the number of matching user group roles
532            */
533            public static int countByRoleId(long roleId) {
534                    return getPersistence().countByRoleId(roleId);
535            }
536    
537            /**
538            * Returns all the user group roles where userId = &#63; and groupId = &#63;.
539            *
540            * @param userId the user ID
541            * @param groupId the group ID
542            * @return the matching user group roles
543            */
544            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
545                    long userId, long groupId) {
546                    return getPersistence().findByU_G(userId, groupId);
547            }
548    
549            /**
550            * Returns a range of all the user group roles where userId = &#63; and groupId = &#63;.
551            *
552            * <p>
553            * 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.UserGroupRoleModelImpl}. 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.
554            * </p>
555            *
556            * @param userId the user ID
557            * @param groupId the group ID
558            * @param start the lower bound of the range of user group roles
559            * @param end the upper bound of the range of user group roles (not inclusive)
560            * @return the range of matching user group roles
561            */
562            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
563                    long userId, long groupId, int start, int end) {
564                    return getPersistence().findByU_G(userId, groupId, start, end);
565            }
566    
567            /**
568            * Returns an ordered range of all the user group roles where userId = &#63; and groupId = &#63;.
569            *
570            * <p>
571            * 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.UserGroupRoleModelImpl}. 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.
572            * </p>
573            *
574            * @param userId the user ID
575            * @param groupId the group ID
576            * @param start the lower bound of the range of user group roles
577            * @param end the upper bound of the range of user group roles (not inclusive)
578            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
579            * @return the ordered range of matching user group roles
580            */
581            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
582                    long userId, long groupId, int start, int end,
583                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
584                    return getPersistence()
585                                       .findByU_G(userId, groupId, start, end, orderByComparator);
586            }
587    
588            /**
589            * Returns the first user group role in the ordered set where userId = &#63; and groupId = &#63;.
590            *
591            * @param userId the user ID
592            * @param groupId the group ID
593            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
594            * @return the first matching user group role
595            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
596            */
597            public static com.liferay.portal.model.UserGroupRole findByU_G_First(
598                    long userId, long groupId,
599                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
600                    throws com.liferay.portal.NoSuchUserGroupRoleException {
601                    return getPersistence()
602                                       .findByU_G_First(userId, groupId, orderByComparator);
603            }
604    
605            /**
606            * Returns the first user group role in the ordered set where userId = &#63; and groupId = &#63;.
607            *
608            * @param userId the user ID
609            * @param groupId the group ID
610            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
611            * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found
612            */
613            public static com.liferay.portal.model.UserGroupRole fetchByU_G_First(
614                    long userId, long groupId,
615                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
616                    return getPersistence()
617                                       .fetchByU_G_First(userId, groupId, orderByComparator);
618            }
619    
620            /**
621            * Returns the last user group role in the ordered set where userId = &#63; and groupId = &#63;.
622            *
623            * @param userId the user ID
624            * @param groupId the group ID
625            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
626            * @return the last matching user group role
627            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
628            */
629            public static com.liferay.portal.model.UserGroupRole findByU_G_Last(
630                    long userId, long groupId,
631                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
632                    throws com.liferay.portal.NoSuchUserGroupRoleException {
633                    return getPersistence()
634                                       .findByU_G_Last(userId, groupId, orderByComparator);
635            }
636    
637            /**
638            * Returns the last user group role in the ordered set where userId = &#63; and groupId = &#63;.
639            *
640            * @param userId the user ID
641            * @param groupId the group ID
642            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
643            * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found
644            */
645            public static com.liferay.portal.model.UserGroupRole fetchByU_G_Last(
646                    long userId, long groupId,
647                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
648                    return getPersistence()
649                                       .fetchByU_G_Last(userId, groupId, orderByComparator);
650            }
651    
652            /**
653            * Returns the user group roles before and after the current user group role in the ordered set where userId = &#63; and groupId = &#63;.
654            *
655            * @param userGroupRolePK the primary key of the current user group role
656            * @param userId the user ID
657            * @param groupId the group ID
658            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
659            * @return the previous, current, and next user group role
660            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
661            */
662            public static com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
663                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
664                    long userId, long groupId,
665                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
666                    throws com.liferay.portal.NoSuchUserGroupRoleException {
667                    return getPersistence()
668                                       .findByU_G_PrevAndNext(userGroupRolePK, userId, groupId,
669                            orderByComparator);
670            }
671    
672            /**
673            * Removes all the user group roles where userId = &#63; and groupId = &#63; from the database.
674            *
675            * @param userId the user ID
676            * @param groupId the group ID
677            */
678            public static void removeByU_G(long userId, long groupId) {
679                    getPersistence().removeByU_G(userId, groupId);
680            }
681    
682            /**
683            * Returns the number of user group roles where userId = &#63; and groupId = &#63;.
684            *
685            * @param userId the user ID
686            * @param groupId the group ID
687            * @return the number of matching user group roles
688            */
689            public static int countByU_G(long userId, long groupId) {
690                    return getPersistence().countByU_G(userId, groupId);
691            }
692    
693            /**
694            * Returns all the user group roles where groupId = &#63; and roleId = &#63;.
695            *
696            * @param groupId the group ID
697            * @param roleId the role ID
698            * @return the matching user group roles
699            */
700            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
701                    long groupId, long roleId) {
702                    return getPersistence().findByG_R(groupId, roleId);
703            }
704    
705            /**
706            * Returns a range of all the user group roles where groupId = &#63; and roleId = &#63;.
707            *
708            * <p>
709            * 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.UserGroupRoleModelImpl}. 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.
710            * </p>
711            *
712            * @param groupId the group ID
713            * @param roleId the role ID
714            * @param start the lower bound of the range of user group roles
715            * @param end the upper bound of the range of user group roles (not inclusive)
716            * @return the range of matching user group roles
717            */
718            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
719                    long groupId, long roleId, int start, int end) {
720                    return getPersistence().findByG_R(groupId, roleId, start, end);
721            }
722    
723            /**
724            * Returns an ordered range of all the user group roles where groupId = &#63; and roleId = &#63;.
725            *
726            * <p>
727            * 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.UserGroupRoleModelImpl}. 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.
728            * </p>
729            *
730            * @param groupId the group ID
731            * @param roleId the role ID
732            * @param start the lower bound of the range of user group roles
733            * @param end the upper bound of the range of user group roles (not inclusive)
734            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
735            * @return the ordered range of matching user group roles
736            */
737            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
738                    long groupId, long roleId, int start, int end,
739                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
740                    return getPersistence()
741                                       .findByG_R(groupId, roleId, start, end, orderByComparator);
742            }
743    
744            /**
745            * Returns the first user group role in the ordered set where groupId = &#63; and roleId = &#63;.
746            *
747            * @param groupId the group ID
748            * @param roleId the role ID
749            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
750            * @return the first matching user group role
751            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
752            */
753            public static com.liferay.portal.model.UserGroupRole findByG_R_First(
754                    long groupId, long roleId,
755                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
756                    throws com.liferay.portal.NoSuchUserGroupRoleException {
757                    return getPersistence()
758                                       .findByG_R_First(groupId, roleId, orderByComparator);
759            }
760    
761            /**
762            * Returns the first user group role in the ordered set where groupId = &#63; and roleId = &#63;.
763            *
764            * @param groupId the group ID
765            * @param roleId the role ID
766            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
767            * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found
768            */
769            public static com.liferay.portal.model.UserGroupRole fetchByG_R_First(
770                    long groupId, long roleId,
771                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
772                    return getPersistence()
773                                       .fetchByG_R_First(groupId, roleId, orderByComparator);
774            }
775    
776            /**
777            * Returns the last user group role in the ordered set where groupId = &#63; and roleId = &#63;.
778            *
779            * @param groupId the group ID
780            * @param roleId the role ID
781            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
782            * @return the last matching user group role
783            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
784            */
785            public static com.liferay.portal.model.UserGroupRole findByG_R_Last(
786                    long groupId, long roleId,
787                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
788                    throws com.liferay.portal.NoSuchUserGroupRoleException {
789                    return getPersistence()
790                                       .findByG_R_Last(groupId, roleId, orderByComparator);
791            }
792    
793            /**
794            * Returns the last user group role in the ordered set where groupId = &#63; and roleId = &#63;.
795            *
796            * @param groupId the group ID
797            * @param roleId the role ID
798            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
799            * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found
800            */
801            public static com.liferay.portal.model.UserGroupRole fetchByG_R_Last(
802                    long groupId, long roleId,
803                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
804                    return getPersistence()
805                                       .fetchByG_R_Last(groupId, roleId, orderByComparator);
806            }
807    
808            /**
809            * Returns the user group roles before and after the current user group role in the ordered set where groupId = &#63; and roleId = &#63;.
810            *
811            * @param userGroupRolePK the primary key of the current user group role
812            * @param groupId the group ID
813            * @param roleId the role ID
814            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
815            * @return the previous, current, and next user group role
816            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
817            */
818            public static com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
819                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
820                    long groupId, long roleId,
821                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator)
822                    throws com.liferay.portal.NoSuchUserGroupRoleException {
823                    return getPersistence()
824                                       .findByG_R_PrevAndNext(userGroupRolePK, groupId, roleId,
825                            orderByComparator);
826            }
827    
828            /**
829            * Removes all the user group roles where groupId = &#63; and roleId = &#63; from the database.
830            *
831            * @param groupId the group ID
832            * @param roleId the role ID
833            */
834            public static void removeByG_R(long groupId, long roleId) {
835                    getPersistence().removeByG_R(groupId, roleId);
836            }
837    
838            /**
839            * Returns the number of user group roles where groupId = &#63; and roleId = &#63;.
840            *
841            * @param groupId the group ID
842            * @param roleId the role ID
843            * @return the number of matching user group roles
844            */
845            public static int countByG_R(long groupId, long roleId) {
846                    return getPersistence().countByG_R(groupId, roleId);
847            }
848    
849            /**
850            * Caches the user group role in the entity cache if it is enabled.
851            *
852            * @param userGroupRole the user group role
853            */
854            public static void cacheResult(
855                    com.liferay.portal.model.UserGroupRole userGroupRole) {
856                    getPersistence().cacheResult(userGroupRole);
857            }
858    
859            /**
860            * Caches the user group roles in the entity cache if it is enabled.
861            *
862            * @param userGroupRoles the user group roles
863            */
864            public static void cacheResult(
865                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles) {
866                    getPersistence().cacheResult(userGroupRoles);
867            }
868    
869            /**
870            * Creates a new user group role with the primary key. Does not add the user group role to the database.
871            *
872            * @param userGroupRolePK the primary key for the new user group role
873            * @return the new user group role
874            */
875            public static com.liferay.portal.model.UserGroupRole create(
876                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) {
877                    return getPersistence().create(userGroupRolePK);
878            }
879    
880            /**
881            * Removes the user group role with the primary key from the database. Also notifies the appropriate model listeners.
882            *
883            * @param userGroupRolePK the primary key of the user group role
884            * @return the user group role that was removed
885            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
886            */
887            public static com.liferay.portal.model.UserGroupRole remove(
888                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
889                    throws com.liferay.portal.NoSuchUserGroupRoleException {
890                    return getPersistence().remove(userGroupRolePK);
891            }
892    
893            public static com.liferay.portal.model.UserGroupRole updateImpl(
894                    com.liferay.portal.model.UserGroupRole userGroupRole) {
895                    return getPersistence().updateImpl(userGroupRole);
896            }
897    
898            /**
899            * Returns the user group role with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupRoleException} if it could not be found.
900            *
901            * @param userGroupRolePK the primary key of the user group role
902            * @return the user group role
903            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
904            */
905            public static com.liferay.portal.model.UserGroupRole findByPrimaryKey(
906                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
907                    throws com.liferay.portal.NoSuchUserGroupRoleException {
908                    return getPersistence().findByPrimaryKey(userGroupRolePK);
909            }
910    
911            /**
912            * Returns the user group role with the primary key or returns <code>null</code> if it could not be found.
913            *
914            * @param userGroupRolePK the primary key of the user group role
915            * @return the user group role, or <code>null</code> if a user group role with the primary key could not be found
916            */
917            public static com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
918                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) {
919                    return getPersistence().fetchByPrimaryKey(userGroupRolePK);
920            }
921    
922            public static java.util.Map<java.io.Serializable, com.liferay.portal.model.UserGroupRole> fetchByPrimaryKeys(
923                    java.util.Set<java.io.Serializable> primaryKeys) {
924                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
925            }
926    
927            /**
928            * Returns all the user group roles.
929            *
930            * @return the user group roles
931            */
932            public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll() {
933                    return getPersistence().findAll();
934            }
935    
936            /**
937            * Returns a range of all the user group roles.
938            *
939            * <p>
940            * 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.UserGroupRoleModelImpl}. 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.
941            * </p>
942            *
943            * @param start the lower bound of the range of user group roles
944            * @param end the upper bound of the range of user group roles (not inclusive)
945            * @return the range of user group roles
946            */
947            public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
948                    int start, int end) {
949                    return getPersistence().findAll(start, end);
950            }
951    
952            /**
953            * Returns an ordered range of all the user group roles.
954            *
955            * <p>
956            * 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.UserGroupRoleModelImpl}. 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.
957            * </p>
958            *
959            * @param start the lower bound of the range of user group roles
960            * @param end the upper bound of the range of user group roles (not inclusive)
961            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
962            * @return the ordered range of user group roles
963            */
964            public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
965                    int start, int end,
966                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroupRole> orderByComparator) {
967                    return getPersistence().findAll(start, end, orderByComparator);
968            }
969    
970            /**
971            * Removes all the user group roles from the database.
972            */
973            public static void removeAll() {
974                    getPersistence().removeAll();
975            }
976    
977            /**
978            * Returns the number of user group roles.
979            *
980            * @return the number of user group roles
981            */
982            public static int countAll() {
983                    return getPersistence().countAll();
984            }
985    
986            public static UserGroupRolePersistence getPersistence() {
987                    if (_persistence == null) {
988                            _persistence = (UserGroupRolePersistence)PortalBeanLocatorUtil.locate(UserGroupRolePersistence.class.getName());
989    
990                            ReferenceRegistry.registerReference(UserGroupRoleUtil.class,
991                                    "_persistence");
992                    }
993    
994                    return _persistence;
995            }
996    
997            /**
998             * @deprecated As of 6.2.0
999             */
1000            @Deprecated
1001            public void setPersistence(UserGroupRolePersistence persistence) {
1002            }
1003    
1004            private static UserGroupRolePersistence _persistence;
1005    }