001    /**
002     * Copyright (c) 2000-2010 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.model.UserGroupRole;
018    
019    /**
020     * The persistence interface for the user group role service.
021     *
022     * <p>
023     * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface.
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see UserGroupRolePersistenceImpl
028     * @see UserGroupRoleUtil
029     * @generated
030     */
031    public interface UserGroupRolePersistence extends BasePersistence<UserGroupRole> {
032            /**
033            * Caches the user group role in the entity cache if it is enabled.
034            *
035            * @param userGroupRole the user group role to cache
036            */
037            public void cacheResult(
038                    com.liferay.portal.model.UserGroupRole userGroupRole);
039    
040            /**
041            * Caches the user group roles in the entity cache if it is enabled.
042            *
043            * @param userGroupRoles the user group roles to cache
044            */
045            public void cacheResult(
046                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles);
047    
048            /**
049            * Creates a new user group role with the primary key.
050            *
051            * @param userGroupRolePK the primary key for the new user group role
052            * @return the new user group role
053            */
054            public com.liferay.portal.model.UserGroupRole create(
055                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK);
056    
057            /**
058            * Removes the user group role with the primary key from the database. Also notifies the appropriate model listeners.
059            *
060            * @param userGroupRolePK the primary key of the user group role to remove
061            * @return the user group role that was removed
062            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
063            * @throws SystemException if a system exception occurred
064            */
065            public com.liferay.portal.model.UserGroupRole remove(
066                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
067                    throws com.liferay.portal.NoSuchUserGroupRoleException,
068                            com.liferay.portal.kernel.exception.SystemException;
069    
070            public com.liferay.portal.model.UserGroupRole updateImpl(
071                    com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
072                    throws com.liferay.portal.kernel.exception.SystemException;
073    
074            /**
075            * Finds the user group role with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupRoleException} if it could not be found.
076            *
077            * @param userGroupRolePK the primary key of the user group role to find
078            * @return the user group role
079            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
080            * @throws SystemException if a system exception occurred
081            */
082            public com.liferay.portal.model.UserGroupRole findByPrimaryKey(
083                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
084                    throws com.liferay.portal.NoSuchUserGroupRoleException,
085                            com.liferay.portal.kernel.exception.SystemException;
086    
087            /**
088            * Finds the user group role with the primary key or returns <code>null</code> if it could not be found.
089            *
090            * @param userGroupRolePK the primary key of the user group role to find
091            * @return the user group role, or <code>null</code> if a user group role with the primary key could not be found
092            * @throws SystemException if a system exception occurred
093            */
094            public com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
095                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
096                    throws com.liferay.portal.kernel.exception.SystemException;
097    
098            /**
099            * Finds all the user group roles where userId = &#63;.
100            *
101            * @param userId the user id to search with
102            * @return the matching user group roles
103            * @throws SystemException if a system exception occurred
104            */
105            public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
106                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
107    
108            /**
109            * Finds a range of all the user group roles where userId = &#63;.
110            *
111            * <p>
112            * 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.
113            * </p>
114            *
115            * @param userId the user id to search with
116            * @param start the lower bound of the range of user group roles to return
117            * @param end the upper bound of the range of user group roles to return (not inclusive)
118            * @return the range of matching user group roles
119            * @throws SystemException if a system exception occurred
120            */
121            public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
122                    long userId, int start, int end)
123                    throws com.liferay.portal.kernel.exception.SystemException;
124    
125            /**
126            * Finds an ordered range of all the user group roles where userId = &#63;.
127            *
128            * <p>
129            * 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.
130            * </p>
131            *
132            * @param userId the user id to search with
133            * @param start the lower bound of the range of user group roles to return
134            * @param end the upper bound of the range of user group roles to return (not inclusive)
135            * @param orderByComparator the comparator to order the results by
136            * @return the ordered range of matching user group roles
137            * @throws SystemException if a system exception occurred
138            */
139            public java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
140                    long userId, int start, int end,
141                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142                    throws com.liferay.portal.kernel.exception.SystemException;
143    
144            /**
145            * Finds the first user group role in the ordered set where userId = &#63;.
146            *
147            * <p>
148            * 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.
149            * </p>
150            *
151            * @param userId the user id to search with
152            * @param orderByComparator the comparator to order the set by
153            * @return the first matching user group role
154            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
155            * @throws SystemException if a system exception occurred
156            */
157            public com.liferay.portal.model.UserGroupRole findByUserId_First(
158                    long userId,
159                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160                    throws com.liferay.portal.NoSuchUserGroupRoleException,
161                            com.liferay.portal.kernel.exception.SystemException;
162    
163            /**
164            * Finds the last user group role in the ordered set where userId = &#63;.
165            *
166            * <p>
167            * 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.
168            * </p>
169            *
170            * @param userId the user id to search with
171            * @param orderByComparator the comparator to order the set by
172            * @return the last matching user group role
173            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
174            * @throws SystemException if a system exception occurred
175            */
176            public com.liferay.portal.model.UserGroupRole findByUserId_Last(
177                    long userId,
178                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
179                    throws com.liferay.portal.NoSuchUserGroupRoleException,
180                            com.liferay.portal.kernel.exception.SystemException;
181    
182            /**
183            * Finds the user group roles before and after the current user group role in the ordered set where userId = &#63;.
184            *
185            * <p>
186            * 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.
187            * </p>
188            *
189            * @param userGroupRolePK the primary key of the current user group role
190            * @param userId the user id to search with
191            * @param orderByComparator the comparator to order the set by
192            * @return the previous, current, and next user group role
193            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
194            * @throws SystemException if a system exception occurred
195            */
196            public com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
197                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
198                    long userId,
199                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
200                    throws com.liferay.portal.NoSuchUserGroupRoleException,
201                            com.liferay.portal.kernel.exception.SystemException;
202    
203            /**
204            * Finds all the user group roles where groupId = &#63;.
205            *
206            * @param groupId the group id to search with
207            * @return the matching user group roles
208            * @throws SystemException if a system exception occurred
209            */
210            public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
211                    long groupId)
212                    throws com.liferay.portal.kernel.exception.SystemException;
213    
214            /**
215            * Finds a range of all the user group roles where groupId = &#63;.
216            *
217            * <p>
218            * 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.
219            * </p>
220            *
221            * @param groupId the group id to search with
222            * @param start the lower bound of the range of user group roles to return
223            * @param end the upper bound of the range of user group roles to return (not inclusive)
224            * @return the range of matching user group roles
225            * @throws SystemException if a system exception occurred
226            */
227            public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
228                    long groupId, int start, int end)
229                    throws com.liferay.portal.kernel.exception.SystemException;
230    
231            /**
232            * Finds an ordered range of all the user group roles where groupId = &#63;.
233            *
234            * <p>
235            * 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.
236            * </p>
237            *
238            * @param groupId the group id to search with
239            * @param start the lower bound of the range of user group roles to return
240            * @param end the upper bound of the range of user group roles to return (not inclusive)
241            * @param orderByComparator the comparator to order the results by
242            * @return the ordered range of matching user group roles
243            * @throws SystemException if a system exception occurred
244            */
245            public java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
246                    long groupId, int start, int end,
247                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
248                    throws com.liferay.portal.kernel.exception.SystemException;
249    
250            /**
251            * Finds the first user group role in the ordered set where groupId = &#63;.
252            *
253            * <p>
254            * 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.
255            * </p>
256            *
257            * @param groupId the group id to search with
258            * @param orderByComparator the comparator to order the set by
259            * @return the first matching user group role
260            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
261            * @throws SystemException if a system exception occurred
262            */
263            public com.liferay.portal.model.UserGroupRole findByGroupId_First(
264                    long groupId,
265                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
266                    throws com.liferay.portal.NoSuchUserGroupRoleException,
267                            com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * Finds the last user group role in the ordered set where groupId = &#63;.
271            *
272            * <p>
273            * 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.
274            * </p>
275            *
276            * @param groupId the group id to search with
277            * @param orderByComparator the comparator to order the set by
278            * @return the last matching user group role
279            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
280            * @throws SystemException if a system exception occurred
281            */
282            public com.liferay.portal.model.UserGroupRole findByGroupId_Last(
283                    long groupId,
284                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285                    throws com.liferay.portal.NoSuchUserGroupRoleException,
286                            com.liferay.portal.kernel.exception.SystemException;
287    
288            /**
289            * Finds the user group roles before and after the current user group role in the ordered set where groupId = &#63;.
290            *
291            * <p>
292            * 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.
293            * </p>
294            *
295            * @param userGroupRolePK the primary key of the current user group role
296            * @param groupId the group id to search with
297            * @param orderByComparator the comparator to order the set by
298            * @return the previous, current, and next user group role
299            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
300            * @throws SystemException if a system exception occurred
301            */
302            public com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
303                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
304                    long groupId,
305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
306                    throws com.liferay.portal.NoSuchUserGroupRoleException,
307                            com.liferay.portal.kernel.exception.SystemException;
308    
309            /**
310            * Finds all the user group roles where roleId = &#63;.
311            *
312            * @param roleId the role id to search with
313            * @return the matching user group roles
314            * @throws SystemException if a system exception occurred
315            */
316            public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
317                    long roleId) throws com.liferay.portal.kernel.exception.SystemException;
318    
319            /**
320            * Finds a range of all the user group roles where roleId = &#63;.
321            *
322            * <p>
323            * 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.
324            * </p>
325            *
326            * @param roleId the role id to search with
327            * @param start the lower bound of the range of user group roles to return
328            * @param end the upper bound of the range of user group roles to return (not inclusive)
329            * @return the range of matching user group roles
330            * @throws SystemException if a system exception occurred
331            */
332            public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
333                    long roleId, int start, int end)
334                    throws com.liferay.portal.kernel.exception.SystemException;
335    
336            /**
337            * Finds an ordered range of all the user group roles where roleId = &#63;.
338            *
339            * <p>
340            * 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.
341            * </p>
342            *
343            * @param roleId the role id to search with
344            * @param start the lower bound of the range of user group roles to return
345            * @param end the upper bound of the range of user group roles to return (not inclusive)
346            * @param orderByComparator the comparator to order the results by
347            * @return the ordered range of matching user group roles
348            * @throws SystemException if a system exception occurred
349            */
350            public java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
351                    long roleId, int start, int end,
352                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
353                    throws com.liferay.portal.kernel.exception.SystemException;
354    
355            /**
356            * Finds the first user group role in the ordered set where roleId = &#63;.
357            *
358            * <p>
359            * 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.
360            * </p>
361            *
362            * @param roleId the role id to search with
363            * @param orderByComparator the comparator to order the set by
364            * @return the first matching user group role
365            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
366            * @throws SystemException if a system exception occurred
367            */
368            public com.liferay.portal.model.UserGroupRole findByRoleId_First(
369                    long roleId,
370                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
371                    throws com.liferay.portal.NoSuchUserGroupRoleException,
372                            com.liferay.portal.kernel.exception.SystemException;
373    
374            /**
375            * Finds the last user group role in the ordered set where roleId = &#63;.
376            *
377            * <p>
378            * 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.
379            * </p>
380            *
381            * @param roleId the role id to search with
382            * @param orderByComparator the comparator to order the set by
383            * @return the last matching user group role
384            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
385            * @throws SystemException if a system exception occurred
386            */
387            public com.liferay.portal.model.UserGroupRole findByRoleId_Last(
388                    long roleId,
389                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
390                    throws com.liferay.portal.NoSuchUserGroupRoleException,
391                            com.liferay.portal.kernel.exception.SystemException;
392    
393            /**
394            * Finds the user group roles before and after the current user group role in the ordered set where roleId = &#63;.
395            *
396            * <p>
397            * 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.
398            * </p>
399            *
400            * @param userGroupRolePK the primary key of the current user group role
401            * @param roleId the role id to search with
402            * @param orderByComparator the comparator to order the set by
403            * @return the previous, current, and next user group role
404            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
405            * @throws SystemException if a system exception occurred
406            */
407            public com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
408                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
409                    long roleId,
410                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
411                    throws com.liferay.portal.NoSuchUserGroupRoleException,
412                            com.liferay.portal.kernel.exception.SystemException;
413    
414            /**
415            * Finds all the user group roles where userId = &#63; and groupId = &#63;.
416            *
417            * @param userId the user id to search with
418            * @param groupId the group id to search with
419            * @return the matching user group roles
420            * @throws SystemException if a system exception occurred
421            */
422            public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
423                    long userId, long groupId)
424                    throws com.liferay.portal.kernel.exception.SystemException;
425    
426            /**
427            * Finds a range of all the user group roles where userId = &#63; and groupId = &#63;.
428            *
429            * <p>
430            * 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.
431            * </p>
432            *
433            * @param userId the user id to search with
434            * @param groupId the group id to search with
435            * @param start the lower bound of the range of user group roles to return
436            * @param end the upper bound of the range of user group roles to return (not inclusive)
437            * @return the range of matching user group roles
438            * @throws SystemException if a system exception occurred
439            */
440            public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
441                    long userId, long groupId, int start, int end)
442                    throws com.liferay.portal.kernel.exception.SystemException;
443    
444            /**
445            * Finds an ordered range of all the user group roles where userId = &#63; and groupId = &#63;.
446            *
447            * <p>
448            * 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.
449            * </p>
450            *
451            * @param userId the user id to search with
452            * @param groupId the group id to search with
453            * @param start the lower bound of the range of user group roles to return
454            * @param end the upper bound of the range of user group roles to return (not inclusive)
455            * @param orderByComparator the comparator to order the results by
456            * @return the ordered range of matching user group roles
457            * @throws SystemException if a system exception occurred
458            */
459            public java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
460                    long userId, long groupId, int start, int end,
461                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
462                    throws com.liferay.portal.kernel.exception.SystemException;
463    
464            /**
465            * Finds the first user group role in the ordered set where userId = &#63; and groupId = &#63;.
466            *
467            * <p>
468            * 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.
469            * </p>
470            *
471            * @param userId the user id to search with
472            * @param groupId the group id to search with
473            * @param orderByComparator the comparator to order the set by
474            * @return the first matching user group role
475            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
476            * @throws SystemException if a system exception occurred
477            */
478            public com.liferay.portal.model.UserGroupRole findByU_G_First(long userId,
479                    long groupId,
480                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
481                    throws com.liferay.portal.NoSuchUserGroupRoleException,
482                            com.liferay.portal.kernel.exception.SystemException;
483    
484            /**
485            * Finds the last user group role in the ordered set where userId = &#63; and groupId = &#63;.
486            *
487            * <p>
488            * 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.
489            * </p>
490            *
491            * @param userId the user id to search with
492            * @param groupId the group id to search with
493            * @param orderByComparator the comparator to order the set by
494            * @return the last matching user group role
495            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
496            * @throws SystemException if a system exception occurred
497            */
498            public com.liferay.portal.model.UserGroupRole findByU_G_Last(long userId,
499                    long groupId,
500                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
501                    throws com.liferay.portal.NoSuchUserGroupRoleException,
502                            com.liferay.portal.kernel.exception.SystemException;
503    
504            /**
505            * Finds the user group roles before and after the current user group role in the ordered set where userId = &#63; and groupId = &#63;.
506            *
507            * <p>
508            * 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.
509            * </p>
510            *
511            * @param userGroupRolePK the primary key of the current user group role
512            * @param userId the user id to search with
513            * @param groupId the group id to search with
514            * @param orderByComparator the comparator to order the set by
515            * @return the previous, current, and next user group role
516            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
517            * @throws SystemException if a system exception occurred
518            */
519            public com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
520                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
521                    long userId, long groupId,
522                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
523                    throws com.liferay.portal.NoSuchUserGroupRoleException,
524                            com.liferay.portal.kernel.exception.SystemException;
525    
526            /**
527            * Finds all the user group roles where groupId = &#63; and roleId = &#63;.
528            *
529            * @param groupId the group id to search with
530            * @param roleId the role id to search with
531            * @return the matching user group roles
532            * @throws SystemException if a system exception occurred
533            */
534            public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
535                    long groupId, long roleId)
536                    throws com.liferay.portal.kernel.exception.SystemException;
537    
538            /**
539            * Finds a range of all the user group roles where groupId = &#63; and roleId = &#63;.
540            *
541            * <p>
542            * 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.
543            * </p>
544            *
545            * @param groupId the group id to search with
546            * @param roleId the role id to search with
547            * @param start the lower bound of the range of user group roles to return
548            * @param end the upper bound of the range of user group roles to return (not inclusive)
549            * @return the range of matching user group roles
550            * @throws SystemException if a system exception occurred
551            */
552            public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
553                    long groupId, long roleId, int start, int end)
554                    throws com.liferay.portal.kernel.exception.SystemException;
555    
556            /**
557            * Finds an ordered range of all the user group roles where groupId = &#63; and roleId = &#63;.
558            *
559            * <p>
560            * 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.
561            * </p>
562            *
563            * @param groupId the group id to search with
564            * @param roleId the role id to search with
565            * @param start the lower bound of the range of user group roles to return
566            * @param end the upper bound of the range of user group roles to return (not inclusive)
567            * @param orderByComparator the comparator to order the results by
568            * @return the ordered range of matching user group roles
569            * @throws SystemException if a system exception occurred
570            */
571            public java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
572                    long groupId, long roleId, int start, int end,
573                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
574                    throws com.liferay.portal.kernel.exception.SystemException;
575    
576            /**
577            * Finds the first user group role in the ordered set where groupId = &#63; and roleId = &#63;.
578            *
579            * <p>
580            * 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.
581            * </p>
582            *
583            * @param groupId the group id to search with
584            * @param roleId the role id to search with
585            * @param orderByComparator the comparator to order the set by
586            * @return the first matching user group role
587            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
588            * @throws SystemException if a system exception occurred
589            */
590            public com.liferay.portal.model.UserGroupRole findByG_R_First(
591                    long groupId, long roleId,
592                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
593                    throws com.liferay.portal.NoSuchUserGroupRoleException,
594                            com.liferay.portal.kernel.exception.SystemException;
595    
596            /**
597            * Finds the last user group role in the ordered set where groupId = &#63; and roleId = &#63;.
598            *
599            * <p>
600            * 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.
601            * </p>
602            *
603            * @param groupId the group id to search with
604            * @param roleId the role id to search with
605            * @param orderByComparator the comparator to order the set by
606            * @return the last matching user group role
607            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found
608            * @throws SystemException if a system exception occurred
609            */
610            public com.liferay.portal.model.UserGroupRole findByG_R_Last(long groupId,
611                    long roleId,
612                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
613                    throws com.liferay.portal.NoSuchUserGroupRoleException,
614                            com.liferay.portal.kernel.exception.SystemException;
615    
616            /**
617            * Finds the user group roles before and after the current user group role in the ordered set where groupId = &#63; and roleId = &#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.
621            * </p>
622            *
623            * @param userGroupRolePK the primary key of the current user group role
624            * @param groupId the group id to search with
625            * @param roleId the role id to search with
626            * @param orderByComparator the comparator to order the set by
627            * @return the previous, current, and next user group role
628            * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found
629            * @throws SystemException if a system exception occurred
630            */
631            public com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
632                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
633                    long groupId, long roleId,
634                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
635                    throws com.liferay.portal.NoSuchUserGroupRoleException,
636                            com.liferay.portal.kernel.exception.SystemException;
637    
638            /**
639            * Finds all the user group roles.
640            *
641            * @return the user group roles
642            * @throws SystemException if a system exception occurred
643            */
644            public java.util.List<com.liferay.portal.model.UserGroupRole> findAll()
645                    throws com.liferay.portal.kernel.exception.SystemException;
646    
647            /**
648            * Finds a range of all the user group roles.
649            *
650            * <p>
651            * 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.
652            * </p>
653            *
654            * @param start the lower bound of the range of user group roles to return
655            * @param end the upper bound of the range of user group roles to return (not inclusive)
656            * @return the range of user group roles
657            * @throws SystemException if a system exception occurred
658            */
659            public java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
660                    int start, int end)
661                    throws com.liferay.portal.kernel.exception.SystemException;
662    
663            /**
664            * Finds an ordered range of all the user group roles.
665            *
666            * <p>
667            * 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.
668            * </p>
669            *
670            * @param start the lower bound of the range of user group roles to return
671            * @param end the upper bound of the range of user group roles to return (not inclusive)
672            * @param orderByComparator the comparator to order the results by
673            * @return the ordered range of user group roles
674            * @throws SystemException if a system exception occurred
675            */
676            public java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
677                    int start, int end,
678                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
679                    throws com.liferay.portal.kernel.exception.SystemException;
680    
681            /**
682            * Removes all the user group roles where userId = &#63; from the database.
683            *
684            * @param userId the user id to search with
685            * @throws SystemException if a system exception occurred
686            */
687            public void removeByUserId(long userId)
688                    throws com.liferay.portal.kernel.exception.SystemException;
689    
690            /**
691            * Removes all the user group roles where groupId = &#63; from the database.
692            *
693            * @param groupId the group id to search with
694            * @throws SystemException if a system exception occurred
695            */
696            public void removeByGroupId(long groupId)
697                    throws com.liferay.portal.kernel.exception.SystemException;
698    
699            /**
700            * Removes all the user group roles where roleId = &#63; from the database.
701            *
702            * @param roleId the role id to search with
703            * @throws SystemException if a system exception occurred
704            */
705            public void removeByRoleId(long roleId)
706                    throws com.liferay.portal.kernel.exception.SystemException;
707    
708            /**
709            * Removes all the user group roles where userId = &#63; and groupId = &#63; from the database.
710            *
711            * @param userId the user id to search with
712            * @param groupId the group id to search with
713            * @throws SystemException if a system exception occurred
714            */
715            public void removeByU_G(long userId, long groupId)
716                    throws com.liferay.portal.kernel.exception.SystemException;
717    
718            /**
719            * Removes all the user group roles where groupId = &#63; and roleId = &#63; from the database.
720            *
721            * @param groupId the group id to search with
722            * @param roleId the role id to search with
723            * @throws SystemException if a system exception occurred
724            */
725            public void removeByG_R(long groupId, long roleId)
726                    throws com.liferay.portal.kernel.exception.SystemException;
727    
728            /**
729            * Removes all the user group roles from the database.
730            *
731            * @throws SystemException if a system exception occurred
732            */
733            public void removeAll()
734                    throws com.liferay.portal.kernel.exception.SystemException;
735    
736            /**
737            * Counts all the user group roles where userId = &#63;.
738            *
739            * @param userId the user id to search with
740            * @return the number of matching user group roles
741            * @throws SystemException if a system exception occurred
742            */
743            public int countByUserId(long userId)
744                    throws com.liferay.portal.kernel.exception.SystemException;
745    
746            /**
747            * Counts all the user group roles where groupId = &#63;.
748            *
749            * @param groupId the group id to search with
750            * @return the number of matching user group roles
751            * @throws SystemException if a system exception occurred
752            */
753            public int countByGroupId(long groupId)
754                    throws com.liferay.portal.kernel.exception.SystemException;
755    
756            /**
757            * Counts all the user group roles where roleId = &#63;.
758            *
759            * @param roleId the role id to search with
760            * @return the number of matching user group roles
761            * @throws SystemException if a system exception occurred
762            */
763            public int countByRoleId(long roleId)
764                    throws com.liferay.portal.kernel.exception.SystemException;
765    
766            /**
767            * Counts all the user group roles where userId = &#63; and groupId = &#63;.
768            *
769            * @param userId the user id to search with
770            * @param groupId the group id to search with
771            * @return the number of matching user group roles
772            * @throws SystemException if a system exception occurred
773            */
774            public int countByU_G(long userId, long groupId)
775                    throws com.liferay.portal.kernel.exception.SystemException;
776    
777            /**
778            * Counts all the user group roles where groupId = &#63; and roleId = &#63;.
779            *
780            * @param groupId the group id to search with
781            * @param roleId the role id to search with
782            * @return the number of matching user group roles
783            * @throws SystemException if a system exception occurred
784            */
785            public int countByG_R(long groupId, long roleId)
786                    throws com.liferay.portal.kernel.exception.SystemException;
787    
788            /**
789            * Counts all the user group roles.
790            *
791            * @return the number of user group roles
792            * @throws SystemException if a system exception occurred
793            */
794            public int countAll()
795                    throws com.liferay.portal.kernel.exception.SystemException;
796    }