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