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