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