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