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