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