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