001    /**
002     * Copyright (c) 2000-2013 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 com.liferay.portal.model.ResourcePermission;
018    
019    /**
020     * The persistence interface for the resource permission service.
021     *
022     * <p>
023     * Caching information and settings can be found in <code>portal.properties</code>
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see ResourcePermissionPersistenceImpl
028     * @see ResourcePermissionUtil
029     * @generated
030     */
031    public interface ResourcePermissionPersistence extends BasePersistence<ResourcePermission> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * Never modify or reference this interface directly. Always use {@link ResourcePermissionUtil} to access the resource permission persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
036             */
037    
038            /**
039            * Returns all the resource permissions where scope = &#63;.
040            *
041            * @param scope the scope
042            * @return the matching resource permissions
043            * @throws SystemException if a system exception occurred
044            */
045            public java.util.List<com.liferay.portal.model.ResourcePermission> findByScope(
046                    int scope) throws com.liferay.portal.kernel.exception.SystemException;
047    
048            /**
049            * Returns a range of all the resource permissions where scope = &#63;.
050            *
051            * <p>
052            * 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.ResourcePermissionModelImpl}. 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.
053            * </p>
054            *
055            * @param scope the scope
056            * @param start the lower bound of the range of resource permissions
057            * @param end the upper bound of the range of resource permissions (not inclusive)
058            * @return the range of matching resource permissions
059            * @throws SystemException if a system exception occurred
060            */
061            public java.util.List<com.liferay.portal.model.ResourcePermission> findByScope(
062                    int scope, int start, int end)
063                    throws com.liferay.portal.kernel.exception.SystemException;
064    
065            /**
066            * Returns an ordered range of all the resource permissions where scope = &#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.ResourcePermissionModelImpl}. 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 scope the scope
073            * @param start the lower bound of the range of resource permissions
074            * @param end the upper bound of the range of resource permissions (not inclusive)
075            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
076            * @return the ordered range of matching resource permissions
077            * @throws SystemException if a system exception occurred
078            */
079            public java.util.List<com.liferay.portal.model.ResourcePermission> findByScope(
080                    int scope, int start, int end,
081                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
082                    throws com.liferay.portal.kernel.exception.SystemException;
083    
084            /**
085            * Returns the first resource permission in the ordered set where scope = &#63;.
086            *
087            * @param scope the scope
088            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
089            * @return the first matching resource permission
090            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
091            * @throws SystemException if a system exception occurred
092            */
093            public com.liferay.portal.model.ResourcePermission findByScope_First(
094                    int scope,
095                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
096                    throws com.liferay.portal.NoSuchResourcePermissionException,
097                            com.liferay.portal.kernel.exception.SystemException;
098    
099            /**
100            * Returns the first resource permission in the ordered set where scope = &#63;.
101            *
102            * @param scope the scope
103            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
104            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
105            * @throws SystemException if a system exception occurred
106            */
107            public com.liferay.portal.model.ResourcePermission fetchByScope_First(
108                    int scope,
109                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
110                    throws com.liferay.portal.kernel.exception.SystemException;
111    
112            /**
113            * Returns the last resource permission in the ordered set where scope = &#63;.
114            *
115            * @param scope the scope
116            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
117            * @return the last matching resource permission
118            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
119            * @throws SystemException if a system exception occurred
120            */
121            public com.liferay.portal.model.ResourcePermission findByScope_Last(
122                    int scope,
123                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
124                    throws com.liferay.portal.NoSuchResourcePermissionException,
125                            com.liferay.portal.kernel.exception.SystemException;
126    
127            /**
128            * Returns the last resource permission in the ordered set where scope = &#63;.
129            *
130            * @param scope the scope
131            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
132            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
133            * @throws SystemException if a system exception occurred
134            */
135            public com.liferay.portal.model.ResourcePermission fetchByScope_Last(
136                    int scope,
137                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
138                    throws com.liferay.portal.kernel.exception.SystemException;
139    
140            /**
141            * Returns the resource permissions before and after the current resource permission in the ordered set where scope = &#63;.
142            *
143            * @param resourcePermissionId the primary key of the current resource permission
144            * @param scope the scope
145            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
146            * @return the previous, current, and next resource permission
147            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
148            * @throws SystemException if a system exception occurred
149            */
150            public com.liferay.portal.model.ResourcePermission[] findByScope_PrevAndNext(
151                    long resourcePermissionId, int scope,
152                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
153                    throws com.liferay.portal.NoSuchResourcePermissionException,
154                            com.liferay.portal.kernel.exception.SystemException;
155    
156            /**
157            * Returns all the resource permissions where scope = any &#63;.
158            *
159            * <p>
160            * 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.ResourcePermissionModelImpl}. 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.
161            * </p>
162            *
163            * @param scopes the scopes
164            * @return the matching resource permissions
165            * @throws SystemException if a system exception occurred
166            */
167            public java.util.List<com.liferay.portal.model.ResourcePermission> findByScope(
168                    int[] scopes)
169                    throws com.liferay.portal.kernel.exception.SystemException;
170    
171            /**
172            * Returns a range of all the resource permissions where scope = any &#63;.
173            *
174            * <p>
175            * 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.ResourcePermissionModelImpl}. 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.
176            * </p>
177            *
178            * @param scopes the scopes
179            * @param start the lower bound of the range of resource permissions
180            * @param end the upper bound of the range of resource permissions (not inclusive)
181            * @return the range of matching resource permissions
182            * @throws SystemException if a system exception occurred
183            */
184            public java.util.List<com.liferay.portal.model.ResourcePermission> findByScope(
185                    int[] scopes, int start, int end)
186                    throws com.liferay.portal.kernel.exception.SystemException;
187    
188            /**
189            * Returns an ordered range of all the resource permissions where scope = any &#63;.
190            *
191            * <p>
192            * 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.ResourcePermissionModelImpl}. 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.
193            * </p>
194            *
195            * @param scopes the scopes
196            * @param start the lower bound of the range of resource permissions
197            * @param end the upper bound of the range of resource permissions (not inclusive)
198            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
199            * @return the ordered range of matching resource permissions
200            * @throws SystemException if a system exception occurred
201            */
202            public java.util.List<com.liferay.portal.model.ResourcePermission> findByScope(
203                    int[] scopes, int start, int end,
204                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
205                    throws com.liferay.portal.kernel.exception.SystemException;
206    
207            /**
208            * Removes all the resource permissions where scope = &#63; from the database.
209            *
210            * @param scope the scope
211            * @throws SystemException if a system exception occurred
212            */
213            public void removeByScope(int scope)
214                    throws com.liferay.portal.kernel.exception.SystemException;
215    
216            /**
217            * Returns the number of resource permissions where scope = &#63;.
218            *
219            * @param scope the scope
220            * @return the number of matching resource permissions
221            * @throws SystemException if a system exception occurred
222            */
223            public int countByScope(int scope)
224                    throws com.liferay.portal.kernel.exception.SystemException;
225    
226            /**
227            * Returns the number of resource permissions where scope = any &#63;.
228            *
229            * @param scopes the scopes
230            * @return the number of matching resource permissions
231            * @throws SystemException if a system exception occurred
232            */
233            public int countByScope(int[] scopes)
234                    throws com.liferay.portal.kernel.exception.SystemException;
235    
236            /**
237            * Returns all the resource permissions where roleId = &#63;.
238            *
239            * @param roleId the role ID
240            * @return the matching resource permissions
241            * @throws SystemException if a system exception occurred
242            */
243            public java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
244                    long roleId) throws com.liferay.portal.kernel.exception.SystemException;
245    
246            /**
247            * Returns a range of all the resource permissions where roleId = &#63;.
248            *
249            * <p>
250            * 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.ResourcePermissionModelImpl}. 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.
251            * </p>
252            *
253            * @param roleId the role ID
254            * @param start the lower bound of the range of resource permissions
255            * @param end the upper bound of the range of resource permissions (not inclusive)
256            * @return the range of matching resource permissions
257            * @throws SystemException if a system exception occurred
258            */
259            public java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
260                    long roleId, int start, int end)
261                    throws com.liferay.portal.kernel.exception.SystemException;
262    
263            /**
264            * Returns an ordered range of all the resource permissions where roleId = &#63;.
265            *
266            * <p>
267            * 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.ResourcePermissionModelImpl}. 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.
268            * </p>
269            *
270            * @param roleId the role ID
271            * @param start the lower bound of the range of resource permissions
272            * @param end the upper bound of the range of resource permissions (not inclusive)
273            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
274            * @return the ordered range of matching resource permissions
275            * @throws SystemException if a system exception occurred
276            */
277            public java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
278                    long roleId, int start, int end,
279                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
280                    throws com.liferay.portal.kernel.exception.SystemException;
281    
282            /**
283            * Returns the first resource permission in the ordered set where roleId = &#63;.
284            *
285            * @param roleId the role ID
286            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
287            * @return the first matching resource permission
288            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
289            * @throws SystemException if a system exception occurred
290            */
291            public com.liferay.portal.model.ResourcePermission findByRoleId_First(
292                    long roleId,
293                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
294                    throws com.liferay.portal.NoSuchResourcePermissionException,
295                            com.liferay.portal.kernel.exception.SystemException;
296    
297            /**
298            * Returns the first resource permission in the ordered set where roleId = &#63;.
299            *
300            * @param roleId the role ID
301            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
302            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
303            * @throws SystemException if a system exception occurred
304            */
305            public com.liferay.portal.model.ResourcePermission fetchByRoleId_First(
306                    long roleId,
307                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
308                    throws com.liferay.portal.kernel.exception.SystemException;
309    
310            /**
311            * Returns the last resource permission in the ordered set where roleId = &#63;.
312            *
313            * @param roleId the role ID
314            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
315            * @return the last matching resource permission
316            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
317            * @throws SystemException if a system exception occurred
318            */
319            public com.liferay.portal.model.ResourcePermission findByRoleId_Last(
320                    long roleId,
321                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
322                    throws com.liferay.portal.NoSuchResourcePermissionException,
323                            com.liferay.portal.kernel.exception.SystemException;
324    
325            /**
326            * Returns the last resource permission in the ordered set where roleId = &#63;.
327            *
328            * @param roleId the role ID
329            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
330            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
331            * @throws SystemException if a system exception occurred
332            */
333            public com.liferay.portal.model.ResourcePermission fetchByRoleId_Last(
334                    long roleId,
335                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
336                    throws com.liferay.portal.kernel.exception.SystemException;
337    
338            /**
339            * Returns the resource permissions before and after the current resource permission in the ordered set where roleId = &#63;.
340            *
341            * @param resourcePermissionId the primary key of the current resource permission
342            * @param roleId the role ID
343            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
344            * @return the previous, current, and next resource permission
345            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
346            * @throws SystemException if a system exception occurred
347            */
348            public com.liferay.portal.model.ResourcePermission[] findByRoleId_PrevAndNext(
349                    long resourcePermissionId, long roleId,
350                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
351                    throws com.liferay.portal.NoSuchResourcePermissionException,
352                            com.liferay.portal.kernel.exception.SystemException;
353    
354            /**
355            * Removes all the resource permissions where roleId = &#63; from the database.
356            *
357            * @param roleId the role ID
358            * @throws SystemException if a system exception occurred
359            */
360            public void removeByRoleId(long roleId)
361                    throws com.liferay.portal.kernel.exception.SystemException;
362    
363            /**
364            * Returns the number of resource permissions where roleId = &#63;.
365            *
366            * @param roleId the role ID
367            * @return the number of matching resource permissions
368            * @throws SystemException if a system exception occurred
369            */
370            public int countByRoleId(long roleId)
371                    throws com.liferay.portal.kernel.exception.SystemException;
372    
373            /**
374            * Returns all the resource permissions where companyId = &#63; and primKey LIKE &#63;.
375            *
376            * @param companyId the company ID
377            * @param primKey the prim key
378            * @return the matching resource permissions
379            * @throws SystemException if a system exception occurred
380            */
381            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_LikeP(
382                    long companyId, java.lang.String primKey)
383                    throws com.liferay.portal.kernel.exception.SystemException;
384    
385            /**
386            * Returns a range of all the resource permissions where companyId = &#63; and primKey LIKE &#63;.
387            *
388            * <p>
389            * 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.ResourcePermissionModelImpl}. 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.
390            * </p>
391            *
392            * @param companyId the company ID
393            * @param primKey the prim key
394            * @param start the lower bound of the range of resource permissions
395            * @param end the upper bound of the range of resource permissions (not inclusive)
396            * @return the range of matching resource permissions
397            * @throws SystemException if a system exception occurred
398            */
399            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_LikeP(
400                    long companyId, java.lang.String primKey, int start, int end)
401                    throws com.liferay.portal.kernel.exception.SystemException;
402    
403            /**
404            * Returns an ordered range of all the resource permissions where companyId = &#63; and primKey LIKE &#63;.
405            *
406            * <p>
407            * 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.ResourcePermissionModelImpl}. 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.
408            * </p>
409            *
410            * @param companyId the company ID
411            * @param primKey the prim key
412            * @param start the lower bound of the range of resource permissions
413            * @param end the upper bound of the range of resource permissions (not inclusive)
414            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
415            * @return the ordered range of matching resource permissions
416            * @throws SystemException if a system exception occurred
417            */
418            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_LikeP(
419                    long companyId, java.lang.String primKey, int start, int end,
420                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
421                    throws com.liferay.portal.kernel.exception.SystemException;
422    
423            /**
424            * Returns the first resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
425            *
426            * @param companyId the company ID
427            * @param primKey the prim key
428            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
429            * @return the first matching resource permission
430            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
431            * @throws SystemException if a system exception occurred
432            */
433            public com.liferay.portal.model.ResourcePermission findByC_LikeP_First(
434                    long companyId, java.lang.String primKey,
435                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
436                    throws com.liferay.portal.NoSuchResourcePermissionException,
437                            com.liferay.portal.kernel.exception.SystemException;
438    
439            /**
440            * Returns the first resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
441            *
442            * @param companyId the company ID
443            * @param primKey the prim key
444            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
445            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
446            * @throws SystemException if a system exception occurred
447            */
448            public com.liferay.portal.model.ResourcePermission fetchByC_LikeP_First(
449                    long companyId, java.lang.String primKey,
450                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
451                    throws com.liferay.portal.kernel.exception.SystemException;
452    
453            /**
454            * Returns the last resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
455            *
456            * @param companyId the company ID
457            * @param primKey the prim key
458            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
459            * @return the last matching resource permission
460            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
461            * @throws SystemException if a system exception occurred
462            */
463            public com.liferay.portal.model.ResourcePermission findByC_LikeP_Last(
464                    long companyId, java.lang.String primKey,
465                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
466                    throws com.liferay.portal.NoSuchResourcePermissionException,
467                            com.liferay.portal.kernel.exception.SystemException;
468    
469            /**
470            * Returns the last resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
471            *
472            * @param companyId the company ID
473            * @param primKey the prim key
474            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
475            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
476            * @throws SystemException if a system exception occurred
477            */
478            public com.liferay.portal.model.ResourcePermission fetchByC_LikeP_Last(
479                    long companyId, java.lang.String primKey,
480                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
481                    throws com.liferay.portal.kernel.exception.SystemException;
482    
483            /**
484            * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
485            *
486            * @param resourcePermissionId the primary key of the current resource permission
487            * @param companyId the company ID
488            * @param primKey the prim key
489            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
490            * @return the previous, current, and next resource permission
491            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
492            * @throws SystemException if a system exception occurred
493            */
494            public com.liferay.portal.model.ResourcePermission[] findByC_LikeP_PrevAndNext(
495                    long resourcePermissionId, long companyId, java.lang.String primKey,
496                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
497                    throws com.liferay.portal.NoSuchResourcePermissionException,
498                            com.liferay.portal.kernel.exception.SystemException;
499    
500            /**
501            * Removes all the resource permissions where companyId = &#63; and primKey LIKE &#63; from the database.
502            *
503            * @param companyId the company ID
504            * @param primKey the prim key
505            * @throws SystemException if a system exception occurred
506            */
507            public void removeByC_LikeP(long companyId, java.lang.String primKey)
508                    throws com.liferay.portal.kernel.exception.SystemException;
509    
510            /**
511            * Returns the number of resource permissions where companyId = &#63; and primKey LIKE &#63;.
512            *
513            * @param companyId the company ID
514            * @param primKey the prim key
515            * @return the number of matching resource permissions
516            * @throws SystemException if a system exception occurred
517            */
518            public int countByC_LikeP(long companyId, java.lang.String primKey)
519                    throws com.liferay.portal.kernel.exception.SystemException;
520    
521            /**
522            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
523            *
524            * @param companyId the company ID
525            * @param name the name
526            * @param scope the scope
527            * @return the matching resource permissions
528            * @throws SystemException if a system exception occurred
529            */
530            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
531                    long companyId, java.lang.String name, int scope)
532                    throws com.liferay.portal.kernel.exception.SystemException;
533    
534            /**
535            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
536            *
537            * <p>
538            * 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.ResourcePermissionModelImpl}. 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.
539            * </p>
540            *
541            * @param companyId the company ID
542            * @param name the name
543            * @param scope the scope
544            * @param start the lower bound of the range of resource permissions
545            * @param end the upper bound of the range of resource permissions (not inclusive)
546            * @return the range of matching resource permissions
547            * @throws SystemException if a system exception occurred
548            */
549            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
550                    long companyId, java.lang.String name, int scope, int start, int end)
551                    throws com.liferay.portal.kernel.exception.SystemException;
552    
553            /**
554            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#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.ResourcePermissionModelImpl}. 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 companyId the company ID
561            * @param name the name
562            * @param scope the scope
563            * @param start the lower bound of the range of resource permissions
564            * @param end the upper bound of the range of resource permissions (not inclusive)
565            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
566            * @return the ordered range of matching resource permissions
567            * @throws SystemException if a system exception occurred
568            */
569            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
570                    long companyId, java.lang.String name, int scope, int start, int end,
571                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
572                    throws com.liferay.portal.kernel.exception.SystemException;
573    
574            /**
575            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
576            *
577            * @param companyId the company ID
578            * @param name the name
579            * @param scope the scope
580            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
581            * @return the first matching resource permission
582            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
583            * @throws SystemException if a system exception occurred
584            */
585            public com.liferay.portal.model.ResourcePermission findByC_N_S_First(
586                    long companyId, java.lang.String name, int scope,
587                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
588                    throws com.liferay.portal.NoSuchResourcePermissionException,
589                            com.liferay.portal.kernel.exception.SystemException;
590    
591            /**
592            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
593            *
594            * @param companyId the company ID
595            * @param name the name
596            * @param scope the scope
597            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
598            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
599            * @throws SystemException if a system exception occurred
600            */
601            public com.liferay.portal.model.ResourcePermission fetchByC_N_S_First(
602                    long companyId, java.lang.String name, int scope,
603                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
604                    throws com.liferay.portal.kernel.exception.SystemException;
605    
606            /**
607            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
608            *
609            * @param companyId the company ID
610            * @param name the name
611            * @param scope the scope
612            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
613            * @return the last matching resource permission
614            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
615            * @throws SystemException if a system exception occurred
616            */
617            public com.liferay.portal.model.ResourcePermission findByC_N_S_Last(
618                    long companyId, java.lang.String name, int scope,
619                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
620                    throws com.liferay.portal.NoSuchResourcePermissionException,
621                            com.liferay.portal.kernel.exception.SystemException;
622    
623            /**
624            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
625            *
626            * @param companyId the company ID
627            * @param name the name
628            * @param scope the scope
629            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
630            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
631            * @throws SystemException if a system exception occurred
632            */
633            public com.liferay.portal.model.ResourcePermission fetchByC_N_S_Last(
634                    long companyId, java.lang.String name, int scope,
635                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
636                    throws com.liferay.portal.kernel.exception.SystemException;
637    
638            /**
639            * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
640            *
641            * @param resourcePermissionId the primary key of the current resource permission
642            * @param companyId the company ID
643            * @param name the name
644            * @param scope the scope
645            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
646            * @return the previous, current, and next resource permission
647            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
648            * @throws SystemException if a system exception occurred
649            */
650            public com.liferay.portal.model.ResourcePermission[] findByC_N_S_PrevAndNext(
651                    long resourcePermissionId, long companyId, java.lang.String name,
652                    int scope,
653                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
654                    throws com.liferay.portal.NoSuchResourcePermissionException,
655                            com.liferay.portal.kernel.exception.SystemException;
656    
657            /**
658            * Removes all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; from the database.
659            *
660            * @param companyId the company ID
661            * @param name the name
662            * @param scope the scope
663            * @throws SystemException if a system exception occurred
664            */
665            public void removeByC_N_S(long companyId, java.lang.String name, int scope)
666                    throws com.liferay.portal.kernel.exception.SystemException;
667    
668            /**
669            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
670            *
671            * @param companyId the company ID
672            * @param name the name
673            * @param scope the scope
674            * @return the number of matching resource permissions
675            * @throws SystemException if a system exception occurred
676            */
677            public int countByC_N_S(long companyId, java.lang.String name, int scope)
678                    throws com.liferay.portal.kernel.exception.SystemException;
679    
680            /**
681            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
682            *
683            * @param companyId the company ID
684            * @param name the name
685            * @param scope the scope
686            * @param primKey the prim key
687            * @return the matching resource permissions
688            * @throws SystemException if a system exception occurred
689            */
690            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
691                    long companyId, java.lang.String name, int scope,
692                    java.lang.String primKey)
693                    throws com.liferay.portal.kernel.exception.SystemException;
694    
695            /**
696            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
697            *
698            * <p>
699            * 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.ResourcePermissionModelImpl}. 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.
700            * </p>
701            *
702            * @param companyId the company ID
703            * @param name the name
704            * @param scope the scope
705            * @param primKey the prim key
706            * @param start the lower bound of the range of resource permissions
707            * @param end the upper bound of the range of resource permissions (not inclusive)
708            * @return the range of matching resource permissions
709            * @throws SystemException if a system exception occurred
710            */
711            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
712                    long companyId, java.lang.String name, int scope,
713                    java.lang.String primKey, int start, int end)
714                    throws com.liferay.portal.kernel.exception.SystemException;
715    
716            /**
717            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
718            *
719            * <p>
720            * 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.ResourcePermissionModelImpl}. 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.
721            * </p>
722            *
723            * @param companyId the company ID
724            * @param name the name
725            * @param scope the scope
726            * @param primKey the prim key
727            * @param start the lower bound of the range of resource permissions
728            * @param end the upper bound of the range of resource permissions (not inclusive)
729            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
730            * @return the ordered range of matching resource permissions
731            * @throws SystemException if a system exception occurred
732            */
733            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
734                    long companyId, java.lang.String name, int scope,
735                    java.lang.String primKey, int start, int end,
736                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
737                    throws com.liferay.portal.kernel.exception.SystemException;
738    
739            /**
740            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
741            *
742            * @param companyId the company ID
743            * @param name the name
744            * @param scope the scope
745            * @param primKey the prim key
746            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
747            * @return the first matching resource permission
748            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
749            * @throws SystemException if a system exception occurred
750            */
751            public com.liferay.portal.model.ResourcePermission findByC_N_S_P_First(
752                    long companyId, java.lang.String name, int scope,
753                    java.lang.String primKey,
754                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
755                    throws com.liferay.portal.NoSuchResourcePermissionException,
756                            com.liferay.portal.kernel.exception.SystemException;
757    
758            /**
759            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
760            *
761            * @param companyId the company ID
762            * @param name the name
763            * @param scope the scope
764            * @param primKey the prim key
765            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
766            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
767            * @throws SystemException if a system exception occurred
768            */
769            public com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_First(
770                    long companyId, java.lang.String name, int scope,
771                    java.lang.String primKey,
772                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
773                    throws com.liferay.portal.kernel.exception.SystemException;
774    
775            /**
776            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
777            *
778            * @param companyId the company ID
779            * @param name the name
780            * @param scope the scope
781            * @param primKey the prim key
782            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
783            * @return the last matching resource permission
784            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
785            * @throws SystemException if a system exception occurred
786            */
787            public com.liferay.portal.model.ResourcePermission findByC_N_S_P_Last(
788                    long companyId, java.lang.String name, int scope,
789                    java.lang.String primKey,
790                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
791                    throws com.liferay.portal.NoSuchResourcePermissionException,
792                            com.liferay.portal.kernel.exception.SystemException;
793    
794            /**
795            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
796            *
797            * @param companyId the company ID
798            * @param name the name
799            * @param scope the scope
800            * @param primKey the prim key
801            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
802            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
803            * @throws SystemException if a system exception occurred
804            */
805            public com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_Last(
806                    long companyId, java.lang.String name, int scope,
807                    java.lang.String primKey,
808                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
809                    throws com.liferay.portal.kernel.exception.SystemException;
810    
811            /**
812            * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
813            *
814            * @param resourcePermissionId the primary key of the current resource permission
815            * @param companyId the company ID
816            * @param name the name
817            * @param scope the scope
818            * @param primKey the prim key
819            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
820            * @return the previous, current, and next resource permission
821            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
822            * @throws SystemException if a system exception occurred
823            */
824            public com.liferay.portal.model.ResourcePermission[] findByC_N_S_P_PrevAndNext(
825                    long resourcePermissionId, long companyId, java.lang.String name,
826                    int scope, java.lang.String primKey,
827                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
828                    throws com.liferay.portal.NoSuchResourcePermissionException,
829                            com.liferay.portal.kernel.exception.SystemException;
830    
831            /**
832            * Removes all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; from the database.
833            *
834            * @param companyId the company ID
835            * @param name the name
836            * @param scope the scope
837            * @param primKey the prim key
838            * @throws SystemException if a system exception occurred
839            */
840            public void removeByC_N_S_P(long companyId, java.lang.String name,
841                    int scope, java.lang.String primKey)
842                    throws com.liferay.portal.kernel.exception.SystemException;
843    
844            /**
845            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
846            *
847            * @param companyId the company ID
848            * @param name the name
849            * @param scope the scope
850            * @param primKey the prim key
851            * @return the number of matching resource permissions
852            * @throws SystemException if a system exception occurred
853            */
854            public int countByC_N_S_P(long companyId, java.lang.String name, int scope,
855                    java.lang.String primKey)
856                    throws com.liferay.portal.kernel.exception.SystemException;
857    
858            /**
859            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = any &#63;.
860            *
861            * <p>
862            * 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.ResourcePermissionModelImpl}. 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.
863            * </p>
864            *
865            * @param companyId the company ID
866            * @param name the name
867            * @param scope the scope
868            * @param primKey the prim key
869            * @param roleIds the role IDs
870            * @return the matching resource permissions
871            * @throws SystemException if a system exception occurred
872            */
873            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R(
874                    long companyId, java.lang.String name, int scope,
875                    java.lang.String primKey, long[] roleIds)
876                    throws com.liferay.portal.kernel.exception.SystemException;
877    
878            /**
879            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = any &#63;.
880            *
881            * <p>
882            * 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.ResourcePermissionModelImpl}. 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.
883            * </p>
884            *
885            * @param companyId the company ID
886            * @param name the name
887            * @param scope the scope
888            * @param primKey the prim key
889            * @param roleIds the role IDs
890            * @param start the lower bound of the range of resource permissions
891            * @param end the upper bound of the range of resource permissions (not inclusive)
892            * @return the range of matching resource permissions
893            * @throws SystemException if a system exception occurred
894            */
895            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R(
896                    long companyId, java.lang.String name, int scope,
897                    java.lang.String primKey, long[] roleIds, int start, int end)
898                    throws com.liferay.portal.kernel.exception.SystemException;
899    
900            /**
901            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = any &#63;.
902            *
903            * <p>
904            * 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.ResourcePermissionModelImpl}. 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.
905            * </p>
906            *
907            * @param companyId the company ID
908            * @param name the name
909            * @param scope the scope
910            * @param primKey the prim key
911            * @param roleIds the role IDs
912            * @param start the lower bound of the range of resource permissions
913            * @param end the upper bound of the range of resource permissions (not inclusive)
914            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
915            * @return the ordered range of matching resource permissions
916            * @throws SystemException if a system exception occurred
917            */
918            public java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R(
919                    long companyId, java.lang.String name, int scope,
920                    java.lang.String primKey, long[] roleIds, int start, int end,
921                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
922                    throws com.liferay.portal.kernel.exception.SystemException;
923    
924            /**
925            * Returns the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; or throws a {@link com.liferay.portal.NoSuchResourcePermissionException} if it could not be found.
926            *
927            * @param companyId the company ID
928            * @param name the name
929            * @param scope the scope
930            * @param primKey the prim key
931            * @param roleId the role ID
932            * @return the matching resource permission
933            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
934            * @throws SystemException if a system exception occurred
935            */
936            public com.liferay.portal.model.ResourcePermission findByC_N_S_P_R(
937                    long companyId, java.lang.String name, int scope,
938                    java.lang.String primKey, long roleId)
939                    throws com.liferay.portal.NoSuchResourcePermissionException,
940                            com.liferay.portal.kernel.exception.SystemException;
941    
942            /**
943            * Returns the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
944            *
945            * @param companyId the company ID
946            * @param name the name
947            * @param scope the scope
948            * @param primKey the prim key
949            * @param roleId the role ID
950            * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found
951            * @throws SystemException if a system exception occurred
952            */
953            public com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R(
954                    long companyId, java.lang.String name, int scope,
955                    java.lang.String primKey, long roleId)
956                    throws com.liferay.portal.kernel.exception.SystemException;
957    
958            /**
959            * Returns the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
960            *
961            * @param companyId the company ID
962            * @param name the name
963            * @param scope the scope
964            * @param primKey the prim key
965            * @param roleId the role ID
966            * @param retrieveFromCache whether to use the finder cache
967            * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found
968            * @throws SystemException if a system exception occurred
969            */
970            public com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R(
971                    long companyId, java.lang.String name, int scope,
972                    java.lang.String primKey, long roleId, boolean retrieveFromCache)
973                    throws com.liferay.portal.kernel.exception.SystemException;
974    
975            /**
976            * Removes the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; from the database.
977            *
978            * @param companyId the company ID
979            * @param name the name
980            * @param scope the scope
981            * @param primKey the prim key
982            * @param roleId the role ID
983            * @return the resource permission that was removed
984            * @throws SystemException if a system exception occurred
985            */
986            public com.liferay.portal.model.ResourcePermission removeByC_N_S_P_R(
987                    long companyId, java.lang.String name, int scope,
988                    java.lang.String primKey, long roleId)
989                    throws com.liferay.portal.NoSuchResourcePermissionException,
990                            com.liferay.portal.kernel.exception.SystemException;
991    
992            /**
993            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;.
994            *
995            * @param companyId the company ID
996            * @param name the name
997            * @param scope the scope
998            * @param primKey the prim key
999            * @param roleId the role ID
1000            * @return the number of matching resource permissions
1001            * @throws SystemException if a system exception occurred
1002            */
1003            public int countByC_N_S_P_R(long companyId, java.lang.String name,
1004                    int scope, java.lang.String primKey, long roleId)
1005                    throws com.liferay.portal.kernel.exception.SystemException;
1006    
1007            /**
1008            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = any &#63;.
1009            *
1010            * @param companyId the company ID
1011            * @param name the name
1012            * @param scope the scope
1013            * @param primKey the prim key
1014            * @param roleIds the role IDs
1015            * @return the number of matching resource permissions
1016            * @throws SystemException if a system exception occurred
1017            */
1018            public int countByC_N_S_P_R(long companyId, java.lang.String name,
1019                    int scope, java.lang.String primKey, long[] roleIds)
1020                    throws com.liferay.portal.kernel.exception.SystemException;
1021    
1022            /**
1023            * Caches the resource permission in the entity cache if it is enabled.
1024            *
1025            * @param resourcePermission the resource permission
1026            */
1027            public void cacheResult(
1028                    com.liferay.portal.model.ResourcePermission resourcePermission);
1029    
1030            /**
1031            * Caches the resource permissions in the entity cache if it is enabled.
1032            *
1033            * @param resourcePermissions the resource permissions
1034            */
1035            public void cacheResult(
1036                    java.util.List<com.liferay.portal.model.ResourcePermission> resourcePermissions);
1037    
1038            /**
1039            * Creates a new resource permission with the primary key. Does not add the resource permission to the database.
1040            *
1041            * @param resourcePermissionId the primary key for the new resource permission
1042            * @return the new resource permission
1043            */
1044            public com.liferay.portal.model.ResourcePermission create(
1045                    long resourcePermissionId);
1046    
1047            /**
1048            * Removes the resource permission with the primary key from the database. Also notifies the appropriate model listeners.
1049            *
1050            * @param resourcePermissionId the primary key of the resource permission
1051            * @return the resource permission that was removed
1052            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
1053            * @throws SystemException if a system exception occurred
1054            */
1055            public com.liferay.portal.model.ResourcePermission remove(
1056                    long resourcePermissionId)
1057                    throws com.liferay.portal.NoSuchResourcePermissionException,
1058                            com.liferay.portal.kernel.exception.SystemException;
1059    
1060            public com.liferay.portal.model.ResourcePermission updateImpl(
1061                    com.liferay.portal.model.ResourcePermission resourcePermission)
1062                    throws com.liferay.portal.kernel.exception.SystemException;
1063    
1064            /**
1065            * Returns the resource permission with the primary key or throws a {@link com.liferay.portal.NoSuchResourcePermissionException} if it could not be found.
1066            *
1067            * @param resourcePermissionId the primary key of the resource permission
1068            * @return the resource permission
1069            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
1070            * @throws SystemException if a system exception occurred
1071            */
1072            public com.liferay.portal.model.ResourcePermission findByPrimaryKey(
1073                    long resourcePermissionId)
1074                    throws com.liferay.portal.NoSuchResourcePermissionException,
1075                            com.liferay.portal.kernel.exception.SystemException;
1076    
1077            /**
1078            * Returns the resource permission with the primary key or returns <code>null</code> if it could not be found.
1079            *
1080            * @param resourcePermissionId the primary key of the resource permission
1081            * @return the resource permission, or <code>null</code> if a resource permission with the primary key could not be found
1082            * @throws SystemException if a system exception occurred
1083            */
1084            public com.liferay.portal.model.ResourcePermission fetchByPrimaryKey(
1085                    long resourcePermissionId)
1086                    throws com.liferay.portal.kernel.exception.SystemException;
1087    
1088            /**
1089            * Returns all the resource permissions.
1090            *
1091            * @return the resource permissions
1092            * @throws SystemException if a system exception occurred
1093            */
1094            public java.util.List<com.liferay.portal.model.ResourcePermission> findAll()
1095                    throws com.liferay.portal.kernel.exception.SystemException;
1096    
1097            /**
1098            * Returns a range of all the resource permissions.
1099            *
1100            * <p>
1101            * 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.ResourcePermissionModelImpl}. 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.
1102            * </p>
1103            *
1104            * @param start the lower bound of the range of resource permissions
1105            * @param end the upper bound of the range of resource permissions (not inclusive)
1106            * @return the range of resource permissions
1107            * @throws SystemException if a system exception occurred
1108            */
1109            public java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
1110                    int start, int end)
1111                    throws com.liferay.portal.kernel.exception.SystemException;
1112    
1113            /**
1114            * Returns an ordered range of all the resource permissions.
1115            *
1116            * <p>
1117            * 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.ResourcePermissionModelImpl}. 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.
1118            * </p>
1119            *
1120            * @param start the lower bound of the range of resource permissions
1121            * @param end the upper bound of the range of resource permissions (not inclusive)
1122            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1123            * @return the ordered range of resource permissions
1124            * @throws SystemException if a system exception occurred
1125            */
1126            public java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
1127                    int start, int end,
1128                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1129                    throws com.liferay.portal.kernel.exception.SystemException;
1130    
1131            /**
1132            * Removes all the resource permissions from the database.
1133            *
1134            * @throws SystemException if a system exception occurred
1135            */
1136            public void removeAll()
1137                    throws com.liferay.portal.kernel.exception.SystemException;
1138    
1139            /**
1140            * Returns the number of resource permissions.
1141            *
1142            * @return the number of resource permissions
1143            * @throws SystemException if a system exception occurred
1144            */
1145            public int countAll()
1146                    throws com.liferay.portal.kernel.exception.SystemException;
1147    }