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