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