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