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