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