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