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