001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.exception.SystemException;
022    import com.liferay.portal.kernel.util.OrderByComparator;
023    import com.liferay.portal.kernel.util.ReferenceRegistry;
024    import com.liferay.portal.model.UserGroupGroupRole;
025    import com.liferay.portal.service.ServiceContext;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the user group group role service. This utility wraps {@link UserGroupGroupRolePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
031     *
032     * <p>
033     * Caching information and settings can be found in <code>portal.properties</code>
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see UserGroupGroupRolePersistence
038     * @see UserGroupGroupRolePersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class UserGroupGroupRoleUtil {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
047             */
048    
049            /**
050             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
051             */
052            public static void clearCache() {
053                    getPersistence().clearCache();
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
058             */
059            public static void clearCache(UserGroupGroupRole userGroupGroupRole) {
060                    getPersistence().clearCache(userGroupGroupRole);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
065             */
066            public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
067                    throws SystemException {
068                    return getPersistence().countWithDynamicQuery(dynamicQuery);
069            }
070    
071            /**
072             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
073             */
074            public static List<UserGroupGroupRole> findWithDynamicQuery(
075                    DynamicQuery dynamicQuery) throws SystemException {
076                    return getPersistence().findWithDynamicQuery(dynamicQuery);
077            }
078    
079            /**
080             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
081             */
082            public static List<UserGroupGroupRole> findWithDynamicQuery(
083                    DynamicQuery dynamicQuery, int start, int end)
084                    throws SystemException {
085                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
086            }
087    
088            /**
089             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
090             */
091            public static List<UserGroupGroupRole> findWithDynamicQuery(
092                    DynamicQuery dynamicQuery, int start, int end,
093                    OrderByComparator orderByComparator) throws SystemException {
094                    return getPersistence()
095                                       .findWithDynamicQuery(dynamicQuery, start, end,
096                            orderByComparator);
097            }
098    
099            /**
100             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
101             */
102            public static UserGroupGroupRole update(
103                    UserGroupGroupRole userGroupGroupRole) throws SystemException {
104                    return getPersistence().update(userGroupGroupRole);
105            }
106    
107            /**
108             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
109             */
110            public static UserGroupGroupRole update(
111                    UserGroupGroupRole userGroupGroupRole, ServiceContext serviceContext)
112                    throws SystemException {
113                    return getPersistence().update(userGroupGroupRole, serviceContext);
114            }
115    
116            /**
117            * Returns all the user group group roles where userGroupId = &#63;.
118            *
119            * @param userGroupId the user group ID
120            * @return the matching user group group roles
121            * @throws SystemException if a system exception occurred
122            */
123            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
124                    long userGroupId)
125                    throws com.liferay.portal.kernel.exception.SystemException {
126                    return getPersistence().findByUserGroupId(userGroupId);
127            }
128    
129            /**
130            * Returns a range of all the user group group roles where userGroupId = &#63;.
131            *
132            * <p>
133            * 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.UserGroupGroupRoleModelImpl}. 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.
134            * </p>
135            *
136            * @param userGroupId the user group ID
137            * @param start the lower bound of the range of user group group roles
138            * @param end the upper bound of the range of user group group roles (not inclusive)
139            * @return the range of matching user group group roles
140            * @throws SystemException if a system exception occurred
141            */
142            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
143                    long userGroupId, int start, int end)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return getPersistence().findByUserGroupId(userGroupId, start, end);
146            }
147    
148            /**
149            * Returns an ordered range of all the user group group roles where userGroupId = &#63;.
150            *
151            * <p>
152            * 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.UserGroupGroupRoleModelImpl}. 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.
153            * </p>
154            *
155            * @param userGroupId the user group ID
156            * @param start the lower bound of the range of user group group roles
157            * @param end the upper bound of the range of user group group roles (not inclusive)
158            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
159            * @return the ordered range of matching user group group roles
160            * @throws SystemException if a system exception occurred
161            */
162            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
163                    long userGroupId, int start, int end,
164                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence()
167                                       .findByUserGroupId(userGroupId, start, end, orderByComparator);
168            }
169    
170            /**
171            * Returns the first user group group role in the ordered set where userGroupId = &#63;.
172            *
173            * @param userGroupId the user group ID
174            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
175            * @return the first matching user group group role
176            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
177            * @throws SystemException if a system exception occurred
178            */
179            public static com.liferay.portal.model.UserGroupGroupRole findByUserGroupId_First(
180                    long userGroupId,
181                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
183                            com.liferay.portal.kernel.exception.SystemException {
184                    return getPersistence()
185                                       .findByUserGroupId_First(userGroupId, orderByComparator);
186            }
187    
188            /**
189            * Returns the first user group group role in the ordered set where userGroupId = &#63;.
190            *
191            * @param userGroupId the user group ID
192            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
193            * @return the first matching user group group role, or <code>null</code> if a matching user group group role could not be found
194            * @throws SystemException if a system exception occurred
195            */
196            public static com.liferay.portal.model.UserGroupGroupRole fetchByUserGroupId_First(
197                    long userGroupId,
198                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
199                    throws com.liferay.portal.kernel.exception.SystemException {
200                    return getPersistence()
201                                       .fetchByUserGroupId_First(userGroupId, orderByComparator);
202            }
203    
204            /**
205            * Returns the last user group group role in the ordered set where userGroupId = &#63;.
206            *
207            * @param userGroupId the user group ID
208            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
209            * @return the last matching user group group role
210            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
211            * @throws SystemException if a system exception occurred
212            */
213            public static com.liferay.portal.model.UserGroupGroupRole findByUserGroupId_Last(
214                    long userGroupId,
215                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
216                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
217                            com.liferay.portal.kernel.exception.SystemException {
218                    return getPersistence()
219                                       .findByUserGroupId_Last(userGroupId, orderByComparator);
220            }
221    
222            /**
223            * Returns the last user group group role in the ordered set where userGroupId = &#63;.
224            *
225            * @param userGroupId the user group ID
226            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
227            * @return the last matching user group group role, or <code>null</code> if a matching user group group role could not be found
228            * @throws SystemException if a system exception occurred
229            */
230            public static com.liferay.portal.model.UserGroupGroupRole fetchByUserGroupId_Last(
231                    long userGroupId,
232                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
233                    throws com.liferay.portal.kernel.exception.SystemException {
234                    return getPersistence()
235                                       .fetchByUserGroupId_Last(userGroupId, orderByComparator);
236            }
237    
238            /**
239            * Returns the user group group roles before and after the current user group group role in the ordered set where userGroupId = &#63;.
240            *
241            * @param userGroupGroupRolePK the primary key of the current user group group role
242            * @param userGroupId the user group ID
243            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
244            * @return the previous, current, and next user group group role
245            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
246            * @throws SystemException if a system exception occurred
247            */
248            public static com.liferay.portal.model.UserGroupGroupRole[] findByUserGroupId_PrevAndNext(
249                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
250                    long userGroupId,
251                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
253                            com.liferay.portal.kernel.exception.SystemException {
254                    return getPersistence()
255                                       .findByUserGroupId_PrevAndNext(userGroupGroupRolePK,
256                            userGroupId, orderByComparator);
257            }
258    
259            /**
260            * Removes all the user group group roles where userGroupId = &#63; from the database.
261            *
262            * @param userGroupId the user group ID
263            * @throws SystemException if a system exception occurred
264            */
265            public static void removeByUserGroupId(long userGroupId)
266                    throws com.liferay.portal.kernel.exception.SystemException {
267                    getPersistence().removeByUserGroupId(userGroupId);
268            }
269    
270            /**
271            * Returns the number of user group group roles where userGroupId = &#63;.
272            *
273            * @param userGroupId the user group ID
274            * @return the number of matching user group group roles
275            * @throws SystemException if a system exception occurred
276            */
277            public static int countByUserGroupId(long userGroupId)
278                    throws com.liferay.portal.kernel.exception.SystemException {
279                    return getPersistence().countByUserGroupId(userGroupId);
280            }
281    
282            /**
283            * Returns all the user group group roles where groupId = &#63;.
284            *
285            * @param groupId the group ID
286            * @return the matching user group group roles
287            * @throws SystemException if a system exception occurred
288            */
289            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
290                    long groupId)
291                    throws com.liferay.portal.kernel.exception.SystemException {
292                    return getPersistence().findByGroupId(groupId);
293            }
294    
295            /**
296            * Returns a range of all the user group group roles where groupId = &#63;.
297            *
298            * <p>
299            * 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.UserGroupGroupRoleModelImpl}. 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.
300            * </p>
301            *
302            * @param groupId the group ID
303            * @param start the lower bound of the range of user group group roles
304            * @param end the upper bound of the range of user group group roles (not inclusive)
305            * @return the range of matching user group group roles
306            * @throws SystemException if a system exception occurred
307            */
308            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
309                    long groupId, int start, int end)
310                    throws com.liferay.portal.kernel.exception.SystemException {
311                    return getPersistence().findByGroupId(groupId, start, end);
312            }
313    
314            /**
315            * Returns an ordered range of all the user group group roles where groupId = &#63;.
316            *
317            * <p>
318            * 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.UserGroupGroupRoleModelImpl}. 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.
319            * </p>
320            *
321            * @param groupId the group ID
322            * @param start the lower bound of the range of user group group roles
323            * @param end the upper bound of the range of user group group roles (not inclusive)
324            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
325            * @return the ordered range of matching user group group roles
326            * @throws SystemException if a system exception occurred
327            */
328            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
329                    long groupId, int start, int end,
330                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
331                    throws com.liferay.portal.kernel.exception.SystemException {
332                    return getPersistence()
333                                       .findByGroupId(groupId, start, end, orderByComparator);
334            }
335    
336            /**
337            * Returns the first user group group role in the ordered set where groupId = &#63;.
338            *
339            * @param groupId the group ID
340            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
341            * @return the first matching user group group role
342            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
343            * @throws SystemException if a system exception occurred
344            */
345            public static com.liferay.portal.model.UserGroupGroupRole findByGroupId_First(
346                    long groupId,
347                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
348                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
349                            com.liferay.portal.kernel.exception.SystemException {
350                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
351            }
352    
353            /**
354            * Returns the first user group group role in the ordered set where groupId = &#63;.
355            *
356            * @param groupId the group ID
357            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
358            * @return the first matching user group group role, or <code>null</code> if a matching user group group role could not be found
359            * @throws SystemException if a system exception occurred
360            */
361            public static com.liferay.portal.model.UserGroupGroupRole fetchByGroupId_First(
362                    long groupId,
363                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
364                    throws com.liferay.portal.kernel.exception.SystemException {
365                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
366            }
367    
368            /**
369            * Returns the last user group group role in the ordered set where groupId = &#63;.
370            *
371            * @param groupId the group ID
372            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
373            * @return the last matching user group group role
374            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
375            * @throws SystemException if a system exception occurred
376            */
377            public static com.liferay.portal.model.UserGroupGroupRole findByGroupId_Last(
378                    long groupId,
379                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
380                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
381                            com.liferay.portal.kernel.exception.SystemException {
382                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
383            }
384    
385            /**
386            * Returns the last user group group role in the ordered set where groupId = &#63;.
387            *
388            * @param groupId the group ID
389            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
390            * @return the last matching user group group role, or <code>null</code> if a matching user group group role could not be found
391            * @throws SystemException if a system exception occurred
392            */
393            public static com.liferay.portal.model.UserGroupGroupRole fetchByGroupId_Last(
394                    long groupId,
395                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
396                    throws com.liferay.portal.kernel.exception.SystemException {
397                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
398            }
399    
400            /**
401            * Returns the user group group roles before and after the current user group group role in the ordered set where groupId = &#63;.
402            *
403            * @param userGroupGroupRolePK the primary key of the current user group group role
404            * @param groupId the group ID
405            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
406            * @return the previous, current, and next user group group role
407            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
408            * @throws SystemException if a system exception occurred
409            */
410            public static com.liferay.portal.model.UserGroupGroupRole[] findByGroupId_PrevAndNext(
411                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
412                    long groupId,
413                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
414                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
415                            com.liferay.portal.kernel.exception.SystemException {
416                    return getPersistence()
417                                       .findByGroupId_PrevAndNext(userGroupGroupRolePK, groupId,
418                            orderByComparator);
419            }
420    
421            /**
422            * Removes all the user group group roles where groupId = &#63; from the database.
423            *
424            * @param groupId the group ID
425            * @throws SystemException if a system exception occurred
426            */
427            public static void removeByGroupId(long groupId)
428                    throws com.liferay.portal.kernel.exception.SystemException {
429                    getPersistence().removeByGroupId(groupId);
430            }
431    
432            /**
433            * Returns the number of user group group roles where groupId = &#63;.
434            *
435            * @param groupId the group ID
436            * @return the number of matching user group group roles
437            * @throws SystemException if a system exception occurred
438            */
439            public static int countByGroupId(long groupId)
440                    throws com.liferay.portal.kernel.exception.SystemException {
441                    return getPersistence().countByGroupId(groupId);
442            }
443    
444            /**
445            * Returns all the user group group roles where roleId = &#63;.
446            *
447            * @param roleId the role ID
448            * @return the matching user group group roles
449            * @throws SystemException if a system exception occurred
450            */
451            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
452                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
453                    return getPersistence().findByRoleId(roleId);
454            }
455    
456            /**
457            * Returns a range of all the user group group roles where roleId = &#63;.
458            *
459            * <p>
460            * 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.UserGroupGroupRoleModelImpl}. 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.
461            * </p>
462            *
463            * @param roleId the role ID
464            * @param start the lower bound of the range of user group group roles
465            * @param end the upper bound of the range of user group group roles (not inclusive)
466            * @return the range of matching user group group roles
467            * @throws SystemException if a system exception occurred
468            */
469            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
470                    long roleId, int start, int end)
471                    throws com.liferay.portal.kernel.exception.SystemException {
472                    return getPersistence().findByRoleId(roleId, start, end);
473            }
474    
475            /**
476            * Returns an ordered range of all the user group group roles where roleId = &#63;.
477            *
478            * <p>
479            * 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.UserGroupGroupRoleModelImpl}. 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.
480            * </p>
481            *
482            * @param roleId the role ID
483            * @param start the lower bound of the range of user group group roles
484            * @param end the upper bound of the range of user group group roles (not inclusive)
485            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
486            * @return the ordered range of matching user group group roles
487            * @throws SystemException if a system exception occurred
488            */
489            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
490                    long roleId, int start, int end,
491                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
492                    throws com.liferay.portal.kernel.exception.SystemException {
493                    return getPersistence()
494                                       .findByRoleId(roleId, start, end, orderByComparator);
495            }
496    
497            /**
498            * Returns the first user group group role in the ordered set where roleId = &#63;.
499            *
500            * @param roleId the role ID
501            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
502            * @return the first matching user group group role
503            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
504            * @throws SystemException if a system exception occurred
505            */
506            public static com.liferay.portal.model.UserGroupGroupRole findByRoleId_First(
507                    long roleId,
508                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
509                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
510                            com.liferay.portal.kernel.exception.SystemException {
511                    return getPersistence().findByRoleId_First(roleId, orderByComparator);
512            }
513    
514            /**
515            * Returns the first user group group role in the ordered set where roleId = &#63;.
516            *
517            * @param roleId the role ID
518            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
519            * @return the first matching user group group role, or <code>null</code> if a matching user group group role could not be found
520            * @throws SystemException if a system exception occurred
521            */
522            public static com.liferay.portal.model.UserGroupGroupRole fetchByRoleId_First(
523                    long roleId,
524                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    return getPersistence().fetchByRoleId_First(roleId, orderByComparator);
527            }
528    
529            /**
530            * Returns the last user group group role in the ordered set where roleId = &#63;.
531            *
532            * @param roleId the role ID
533            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
534            * @return the last matching user group group role
535            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
536            * @throws SystemException if a system exception occurred
537            */
538            public static com.liferay.portal.model.UserGroupGroupRole findByRoleId_Last(
539                    long roleId,
540                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
541                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
542                            com.liferay.portal.kernel.exception.SystemException {
543                    return getPersistence().findByRoleId_Last(roleId, orderByComparator);
544            }
545    
546            /**
547            * Returns the last user group group role in the ordered set where roleId = &#63;.
548            *
549            * @param roleId the role ID
550            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
551            * @return the last matching user group group role, or <code>null</code> if a matching user group group role could not be found
552            * @throws SystemException if a system exception occurred
553            */
554            public static com.liferay.portal.model.UserGroupGroupRole fetchByRoleId_Last(
555                    long roleId,
556                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
557                    throws com.liferay.portal.kernel.exception.SystemException {
558                    return getPersistence().fetchByRoleId_Last(roleId, orderByComparator);
559            }
560    
561            /**
562            * Returns the user group group roles before and after the current user group group role in the ordered set where roleId = &#63;.
563            *
564            * @param userGroupGroupRolePK the primary key of the current user group group role
565            * @param roleId the role ID
566            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
567            * @return the previous, current, and next user group group role
568            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
569            * @throws SystemException if a system exception occurred
570            */
571            public static com.liferay.portal.model.UserGroupGroupRole[] findByRoleId_PrevAndNext(
572                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
573                    long roleId,
574                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
575                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
576                            com.liferay.portal.kernel.exception.SystemException {
577                    return getPersistence()
578                                       .findByRoleId_PrevAndNext(userGroupGroupRolePK, roleId,
579                            orderByComparator);
580            }
581    
582            /**
583            * Removes all the user group group roles where roleId = &#63; from the database.
584            *
585            * @param roleId the role ID
586            * @throws SystemException if a system exception occurred
587            */
588            public static void removeByRoleId(long roleId)
589                    throws com.liferay.portal.kernel.exception.SystemException {
590                    getPersistence().removeByRoleId(roleId);
591            }
592    
593            /**
594            * Returns the number of user group group roles where roleId = &#63;.
595            *
596            * @param roleId the role ID
597            * @return the number of matching user group group roles
598            * @throws SystemException if a system exception occurred
599            */
600            public static int countByRoleId(long roleId)
601                    throws com.liferay.portal.kernel.exception.SystemException {
602                    return getPersistence().countByRoleId(roleId);
603            }
604    
605            /**
606            * Returns all the user group group roles where userGroupId = &#63; and groupId = &#63;.
607            *
608            * @param userGroupId the user group ID
609            * @param groupId the group ID
610            * @return the matching user group group roles
611            * @throws SystemException if a system exception occurred
612            */
613            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
614                    long userGroupId, long groupId)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    return getPersistence().findByU_G(userGroupId, groupId);
617            }
618    
619            /**
620            * Returns a range of all the user group group roles where userGroupId = &#63; and groupId = &#63;.
621            *
622            * <p>
623            * 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.UserGroupGroupRoleModelImpl}. 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.
624            * </p>
625            *
626            * @param userGroupId the user group ID
627            * @param groupId the group ID
628            * @param start the lower bound of the range of user group group roles
629            * @param end the upper bound of the range of user group group roles (not inclusive)
630            * @return the range of matching user group group roles
631            * @throws SystemException if a system exception occurred
632            */
633            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
634                    long userGroupId, long groupId, int start, int end)
635                    throws com.liferay.portal.kernel.exception.SystemException {
636                    return getPersistence().findByU_G(userGroupId, groupId, start, end);
637            }
638    
639            /**
640            * Returns an ordered range of all the user group group roles where userGroupId = &#63; and groupId = &#63;.
641            *
642            * <p>
643            * 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.UserGroupGroupRoleModelImpl}. 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.
644            * </p>
645            *
646            * @param userGroupId the user group ID
647            * @param groupId the group ID
648            * @param start the lower bound of the range of user group group roles
649            * @param end the upper bound of the range of user group group roles (not inclusive)
650            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
651            * @return the ordered range of matching user group group roles
652            * @throws SystemException if a system exception occurred
653            */
654            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
655                    long userGroupId, long groupId, int start, int end,
656                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
657                    throws com.liferay.portal.kernel.exception.SystemException {
658                    return getPersistence()
659                                       .findByU_G(userGroupId, groupId, start, end,
660                            orderByComparator);
661            }
662    
663            /**
664            * Returns the first user group group role in the ordered set where userGroupId = &#63; and groupId = &#63;.
665            *
666            * @param userGroupId the user group ID
667            * @param groupId the group ID
668            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
669            * @return the first matching user group group role
670            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
671            * @throws SystemException if a system exception occurred
672            */
673            public static com.liferay.portal.model.UserGroupGroupRole findByU_G_First(
674                    long userGroupId, long groupId,
675                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
676                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
677                            com.liferay.portal.kernel.exception.SystemException {
678                    return getPersistence()
679                                       .findByU_G_First(userGroupId, groupId, orderByComparator);
680            }
681    
682            /**
683            * Returns the first user group group role in the ordered set where userGroupId = &#63; and groupId = &#63;.
684            *
685            * @param userGroupId the user group ID
686            * @param groupId the group ID
687            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
688            * @return the first matching user group group role, or <code>null</code> if a matching user group group role could not be found
689            * @throws SystemException if a system exception occurred
690            */
691            public static com.liferay.portal.model.UserGroupGroupRole fetchByU_G_First(
692                    long userGroupId, long groupId,
693                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
694                    throws com.liferay.portal.kernel.exception.SystemException {
695                    return getPersistence()
696                                       .fetchByU_G_First(userGroupId, groupId, orderByComparator);
697            }
698    
699            /**
700            * Returns the last user group group role in the ordered set where userGroupId = &#63; and groupId = &#63;.
701            *
702            * @param userGroupId the user group ID
703            * @param groupId the group ID
704            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
705            * @return the last matching user group group role
706            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
707            * @throws SystemException if a system exception occurred
708            */
709            public static com.liferay.portal.model.UserGroupGroupRole findByU_G_Last(
710                    long userGroupId, long groupId,
711                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
712                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
713                            com.liferay.portal.kernel.exception.SystemException {
714                    return getPersistence()
715                                       .findByU_G_Last(userGroupId, groupId, orderByComparator);
716            }
717    
718            /**
719            * Returns the last user group group role in the ordered set where userGroupId = &#63; and groupId = &#63;.
720            *
721            * @param userGroupId the user group ID
722            * @param groupId the group ID
723            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
724            * @return the last matching user group group role, or <code>null</code> if a matching user group group role could not be found
725            * @throws SystemException if a system exception occurred
726            */
727            public static com.liferay.portal.model.UserGroupGroupRole fetchByU_G_Last(
728                    long userGroupId, long groupId,
729                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
730                    throws com.liferay.portal.kernel.exception.SystemException {
731                    return getPersistence()
732                                       .fetchByU_G_Last(userGroupId, groupId, orderByComparator);
733            }
734    
735            /**
736            * Returns the user group group roles before and after the current user group group role in the ordered set where userGroupId = &#63; and groupId = &#63;.
737            *
738            * @param userGroupGroupRolePK the primary key of the current user group group role
739            * @param userGroupId the user group ID
740            * @param groupId the group ID
741            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
742            * @return the previous, current, and next user group group role
743            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
744            * @throws SystemException if a system exception occurred
745            */
746            public static com.liferay.portal.model.UserGroupGroupRole[] findByU_G_PrevAndNext(
747                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
748                    long userGroupId, long groupId,
749                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
750                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
751                            com.liferay.portal.kernel.exception.SystemException {
752                    return getPersistence()
753                                       .findByU_G_PrevAndNext(userGroupGroupRolePK, userGroupId,
754                            groupId, orderByComparator);
755            }
756    
757            /**
758            * Removes all the user group group roles where userGroupId = &#63; and groupId = &#63; from the database.
759            *
760            * @param userGroupId the user group ID
761            * @param groupId the group ID
762            * @throws SystemException if a system exception occurred
763            */
764            public static void removeByU_G(long userGroupId, long groupId)
765                    throws com.liferay.portal.kernel.exception.SystemException {
766                    getPersistence().removeByU_G(userGroupId, groupId);
767            }
768    
769            /**
770            * Returns the number of user group group roles where userGroupId = &#63; and groupId = &#63;.
771            *
772            * @param userGroupId the user group ID
773            * @param groupId the group ID
774            * @return the number of matching user group group roles
775            * @throws SystemException if a system exception occurred
776            */
777            public static int countByU_G(long userGroupId, long groupId)
778                    throws com.liferay.portal.kernel.exception.SystemException {
779                    return getPersistence().countByU_G(userGroupId, groupId);
780            }
781    
782            /**
783            * Returns all the user group group roles where groupId = &#63; and roleId = &#63;.
784            *
785            * @param groupId the group ID
786            * @param roleId the role ID
787            * @return the matching user group group roles
788            * @throws SystemException if a system exception occurred
789            */
790            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
791                    long groupId, long roleId)
792                    throws com.liferay.portal.kernel.exception.SystemException {
793                    return getPersistence().findByG_R(groupId, roleId);
794            }
795    
796            /**
797            * Returns a range of all the user group group roles where groupId = &#63; and roleId = &#63;.
798            *
799            * <p>
800            * 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.UserGroupGroupRoleModelImpl}. 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.
801            * </p>
802            *
803            * @param groupId the group ID
804            * @param roleId the role ID
805            * @param start the lower bound of the range of user group group roles
806            * @param end the upper bound of the range of user group group roles (not inclusive)
807            * @return the range of matching user group group roles
808            * @throws SystemException if a system exception occurred
809            */
810            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
811                    long groupId, long roleId, int start, int end)
812                    throws com.liferay.portal.kernel.exception.SystemException {
813                    return getPersistence().findByG_R(groupId, roleId, start, end);
814            }
815    
816            /**
817            * Returns an ordered range of all the user group group roles where groupId = &#63; and roleId = &#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.UserGroupGroupRoleModelImpl}. 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 groupId the group ID
824            * @param roleId the role ID
825            * @param start the lower bound of the range of user group group roles
826            * @param end the upper bound of the range of user group group roles (not inclusive)
827            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
828            * @return the ordered range of matching user group group roles
829            * @throws SystemException if a system exception occurred
830            */
831            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
832                    long groupId, long roleId, int start, int end,
833                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
834                    throws com.liferay.portal.kernel.exception.SystemException {
835                    return getPersistence()
836                                       .findByG_R(groupId, roleId, start, end, orderByComparator);
837            }
838    
839            /**
840            * Returns the first user group group role in the ordered set where groupId = &#63; and roleId = &#63;.
841            *
842            * @param groupId the group ID
843            * @param roleId the role ID
844            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
845            * @return the first matching user group group role
846            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
847            * @throws SystemException if a system exception occurred
848            */
849            public static com.liferay.portal.model.UserGroupGroupRole findByG_R_First(
850                    long groupId, long roleId,
851                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
852                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
853                            com.liferay.portal.kernel.exception.SystemException {
854                    return getPersistence()
855                                       .findByG_R_First(groupId, roleId, orderByComparator);
856            }
857    
858            /**
859            * Returns the first user group group role in the ordered set where groupId = &#63; and roleId = &#63;.
860            *
861            * @param groupId the group ID
862            * @param roleId the role ID
863            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
864            * @return the first matching user group group role, or <code>null</code> if a matching user group group role could not be found
865            * @throws SystemException if a system exception occurred
866            */
867            public static com.liferay.portal.model.UserGroupGroupRole fetchByG_R_First(
868                    long groupId, long roleId,
869                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
870                    throws com.liferay.portal.kernel.exception.SystemException {
871                    return getPersistence()
872                                       .fetchByG_R_First(groupId, roleId, orderByComparator);
873            }
874    
875            /**
876            * Returns the last user group group role in the ordered set where groupId = &#63; and roleId = &#63;.
877            *
878            * @param groupId the group ID
879            * @param roleId the role ID
880            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
881            * @return the last matching user group group role
882            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
883            * @throws SystemException if a system exception occurred
884            */
885            public static com.liferay.portal.model.UserGroupGroupRole findByG_R_Last(
886                    long groupId, long roleId,
887                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
888                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
889                            com.liferay.portal.kernel.exception.SystemException {
890                    return getPersistence()
891                                       .findByG_R_Last(groupId, roleId, orderByComparator);
892            }
893    
894            /**
895            * Returns the last user group group role in the ordered set where groupId = &#63; and roleId = &#63;.
896            *
897            * @param groupId the group ID
898            * @param roleId the role ID
899            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
900            * @return the last matching user group group role, or <code>null</code> if a matching user group group role could not be found
901            * @throws SystemException if a system exception occurred
902            */
903            public static com.liferay.portal.model.UserGroupGroupRole fetchByG_R_Last(
904                    long groupId, long roleId,
905                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
906                    throws com.liferay.portal.kernel.exception.SystemException {
907                    return getPersistence()
908                                       .fetchByG_R_Last(groupId, roleId, orderByComparator);
909            }
910    
911            /**
912            * Returns the user group group roles before and after the current user group group role in the ordered set where groupId = &#63; and roleId = &#63;.
913            *
914            * @param userGroupGroupRolePK the primary key of the current user group group role
915            * @param groupId the group ID
916            * @param roleId the role ID
917            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
918            * @return the previous, current, and next user group group role
919            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
920            * @throws SystemException if a system exception occurred
921            */
922            public static com.liferay.portal.model.UserGroupGroupRole[] findByG_R_PrevAndNext(
923                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
924                    long groupId, long roleId,
925                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
926                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
927                            com.liferay.portal.kernel.exception.SystemException {
928                    return getPersistence()
929                                       .findByG_R_PrevAndNext(userGroupGroupRolePK, groupId,
930                            roleId, orderByComparator);
931            }
932    
933            /**
934            * Removes all the user group group roles where groupId = &#63; and roleId = &#63; from the database.
935            *
936            * @param groupId the group ID
937            * @param roleId the role ID
938            * @throws SystemException if a system exception occurred
939            */
940            public static void removeByG_R(long groupId, long roleId)
941                    throws com.liferay.portal.kernel.exception.SystemException {
942                    getPersistence().removeByG_R(groupId, roleId);
943            }
944    
945            /**
946            * Returns the number of user group group roles where groupId = &#63; and roleId = &#63;.
947            *
948            * @param groupId the group ID
949            * @param roleId the role ID
950            * @return the number of matching user group group roles
951            * @throws SystemException if a system exception occurred
952            */
953            public static int countByG_R(long groupId, long roleId)
954                    throws com.liferay.portal.kernel.exception.SystemException {
955                    return getPersistence().countByG_R(groupId, roleId);
956            }
957    
958            /**
959            * Caches the user group group role in the entity cache if it is enabled.
960            *
961            * @param userGroupGroupRole the user group group role
962            */
963            public static void cacheResult(
964                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole) {
965                    getPersistence().cacheResult(userGroupGroupRole);
966            }
967    
968            /**
969            * Caches the user group group roles in the entity cache if it is enabled.
970            *
971            * @param userGroupGroupRoles the user group group roles
972            */
973            public static void cacheResult(
974                    java.util.List<com.liferay.portal.model.UserGroupGroupRole> userGroupGroupRoles) {
975                    getPersistence().cacheResult(userGroupGroupRoles);
976            }
977    
978            /**
979            * Creates a new user group group role with the primary key. Does not add the user group group role to the database.
980            *
981            * @param userGroupGroupRolePK the primary key for the new user group group role
982            * @return the new user group group role
983            */
984            public static com.liferay.portal.model.UserGroupGroupRole create(
985                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) {
986                    return getPersistence().create(userGroupGroupRolePK);
987            }
988    
989            /**
990            * Removes the user group group role with the primary key from the database. Also notifies the appropriate model listeners.
991            *
992            * @param userGroupGroupRolePK the primary key of the user group group role
993            * @return the user group group role that was removed
994            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
995            * @throws SystemException if a system exception occurred
996            */
997            public static com.liferay.portal.model.UserGroupGroupRole remove(
998                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
999                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
1000                            com.liferay.portal.kernel.exception.SystemException {
1001                    return getPersistence().remove(userGroupGroupRolePK);
1002            }
1003    
1004            public static com.liferay.portal.model.UserGroupGroupRole updateImpl(
1005                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
1006                    throws com.liferay.portal.kernel.exception.SystemException {
1007                    return getPersistence().updateImpl(userGroupGroupRole);
1008            }
1009    
1010            /**
1011            * Returns the user group group role with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupGroupRoleException} if it could not be found.
1012            *
1013            * @param userGroupGroupRolePK the primary key of the user group group role
1014            * @return the user group group role
1015            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
1016            * @throws SystemException if a system exception occurred
1017            */
1018            public static com.liferay.portal.model.UserGroupGroupRole findByPrimaryKey(
1019                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
1020                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
1021                            com.liferay.portal.kernel.exception.SystemException {
1022                    return getPersistence().findByPrimaryKey(userGroupGroupRolePK);
1023            }
1024    
1025            /**
1026            * Returns the user group group role with the primary key or returns <code>null</code> if it could not be found.
1027            *
1028            * @param userGroupGroupRolePK the primary key of the user group group role
1029            * @return the user group group role, or <code>null</code> if a user group group role with the primary key could not be found
1030            * @throws SystemException if a system exception occurred
1031            */
1032            public static com.liferay.portal.model.UserGroupGroupRole fetchByPrimaryKey(
1033                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
1034                    throws com.liferay.portal.kernel.exception.SystemException {
1035                    return getPersistence().fetchByPrimaryKey(userGroupGroupRolePK);
1036            }
1037    
1038            /**
1039            * Returns all the user group group roles.
1040            *
1041            * @return the user group group roles
1042            * @throws SystemException if a system exception occurred
1043            */
1044            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findAll()
1045                    throws com.liferay.portal.kernel.exception.SystemException {
1046                    return getPersistence().findAll();
1047            }
1048    
1049            /**
1050            * Returns a range of all the user group group roles.
1051            *
1052            * <p>
1053            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupGroupRoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1054            * </p>
1055            *
1056            * @param start the lower bound of the range of user group group roles
1057            * @param end the upper bound of the range of user group group roles (not inclusive)
1058            * @return the range of user group group roles
1059            * @throws SystemException if a system exception occurred
1060            */
1061            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findAll(
1062                    int start, int end)
1063                    throws com.liferay.portal.kernel.exception.SystemException {
1064                    return getPersistence().findAll(start, end);
1065            }
1066    
1067            /**
1068            * Returns an ordered range of all the user group group roles.
1069            *
1070            * <p>
1071            * 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.UserGroupGroupRoleModelImpl}. 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.
1072            * </p>
1073            *
1074            * @param start the lower bound of the range of user group group roles
1075            * @param end the upper bound of the range of user group group roles (not inclusive)
1076            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1077            * @return the ordered range of user group group roles
1078            * @throws SystemException if a system exception occurred
1079            */
1080            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findAll(
1081                    int start, int end,
1082                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1083                    throws com.liferay.portal.kernel.exception.SystemException {
1084                    return getPersistence().findAll(start, end, orderByComparator);
1085            }
1086    
1087            /**
1088            * Removes all the user group group roles from the database.
1089            *
1090            * @throws SystemException if a system exception occurred
1091            */
1092            public static void removeAll()
1093                    throws com.liferay.portal.kernel.exception.SystemException {
1094                    getPersistence().removeAll();
1095            }
1096    
1097            /**
1098            * Returns the number of user group group roles.
1099            *
1100            * @return the number of user group group roles
1101            * @throws SystemException if a system exception occurred
1102            */
1103            public static int countAll()
1104                    throws com.liferay.portal.kernel.exception.SystemException {
1105                    return getPersistence().countAll();
1106            }
1107    
1108            public static UserGroupGroupRolePersistence getPersistence() {
1109                    if (_persistence == null) {
1110                            _persistence = (UserGroupGroupRolePersistence)PortalBeanLocatorUtil.locate(UserGroupGroupRolePersistence.class.getName());
1111    
1112                            ReferenceRegistry.registerReference(UserGroupGroupRoleUtil.class,
1113                                    "_persistence");
1114                    }
1115    
1116                    return _persistence;
1117            }
1118    
1119            /**
1120             * @deprecated As of 6.2.0
1121             */
1122            public void setPersistence(UserGroupGroupRolePersistence persistence) {
1123            }
1124    
1125            private static UserGroupGroupRolePersistence _persistence;
1126    }