001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.model.ResourceTypePermission;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the resource type permission service. This utility wraps {@link com.liferay.portal.service.persistence.impl.ResourceTypePermissionPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see ResourceTypePermissionPersistence
037     * @see com.liferay.portal.service.persistence.impl.ResourceTypePermissionPersistenceImpl
038     * @generated
039     */
040    @ProviderType
041    public class ResourceTypePermissionUtil {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
046             */
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
050             */
051            public static void clearCache() {
052                    getPersistence().clearCache();
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
057             */
058            public static void clearCache(ResourceTypePermission resourceTypePermission) {
059                    getPersistence().clearCache(resourceTypePermission);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<ResourceTypePermission> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<ResourceTypePermission> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end) {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<ResourceTypePermission> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator<ResourceTypePermission> orderByComparator) {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
098             */
099            public static ResourceTypePermission update(
100                    ResourceTypePermission resourceTypePermission) {
101                    return getPersistence().update(resourceTypePermission);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static ResourceTypePermission update(
108                    ResourceTypePermission resourceTypePermission,
109                    ServiceContext serviceContext) {
110                    return getPersistence().update(resourceTypePermission, serviceContext);
111            }
112    
113            /**
114            * Returns all the resource type permissions where roleId = &#63;.
115            *
116            * @param roleId the role ID
117            * @return the matching resource type permissions
118            */
119            public static List<ResourceTypePermission> findByRoleId(long roleId) {
120                    return getPersistence().findByRoleId(roleId);
121            }
122    
123            /**
124            * Returns a range of all the resource type permissions where roleId = &#63;.
125            *
126            * <p>
127            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourceTypePermissionModelImpl}. 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.
128            * </p>
129            *
130            * @param roleId the role ID
131            * @param start the lower bound of the range of resource type permissions
132            * @param end the upper bound of the range of resource type permissions (not inclusive)
133            * @return the range of matching resource type permissions
134            */
135            public static List<ResourceTypePermission> findByRoleId(long roleId,
136                    int start, int end) {
137                    return getPersistence().findByRoleId(roleId, start, end);
138            }
139    
140            /**
141            * Returns an ordered range of all the resource type permissions where roleId = &#63;.
142            *
143            * <p>
144            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourceTypePermissionModelImpl}. 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.
145            * </p>
146            *
147            * @param roleId the role ID
148            * @param start the lower bound of the range of resource type permissions
149            * @param end the upper bound of the range of resource type permissions (not inclusive)
150            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
151            * @return the ordered range of matching resource type permissions
152            */
153            public static List<ResourceTypePermission> findByRoleId(long roleId,
154                    int start, int end,
155                    OrderByComparator<ResourceTypePermission> orderByComparator) {
156                    return getPersistence()
157                                       .findByRoleId(roleId, start, end, orderByComparator);
158            }
159    
160            /**
161            * Returns the first resource type permission in the ordered set where roleId = &#63;.
162            *
163            * @param roleId the role ID
164            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
165            * @return the first matching resource type permission
166            * @throws NoSuchResourceTypePermissionException if a matching resource type permission could not be found
167            */
168            public static ResourceTypePermission findByRoleId_First(long roleId,
169                    OrderByComparator<ResourceTypePermission> orderByComparator)
170                    throws com.liferay.portal.NoSuchResourceTypePermissionException {
171                    return getPersistence().findByRoleId_First(roleId, orderByComparator);
172            }
173    
174            /**
175            * Returns the first resource type permission in the ordered set where roleId = &#63;.
176            *
177            * @param roleId the role ID
178            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
179            * @return the first matching resource type permission, or <code>null</code> if a matching resource type permission could not be found
180            */
181            public static ResourceTypePermission fetchByRoleId_First(long roleId,
182                    OrderByComparator<ResourceTypePermission> orderByComparator) {
183                    return getPersistence().fetchByRoleId_First(roleId, orderByComparator);
184            }
185    
186            /**
187            * Returns the last resource type permission in the ordered set where roleId = &#63;.
188            *
189            * @param roleId the role ID
190            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
191            * @return the last matching resource type permission
192            * @throws NoSuchResourceTypePermissionException if a matching resource type permission could not be found
193            */
194            public static ResourceTypePermission findByRoleId_Last(long roleId,
195                    OrderByComparator<ResourceTypePermission> orderByComparator)
196                    throws com.liferay.portal.NoSuchResourceTypePermissionException {
197                    return getPersistence().findByRoleId_Last(roleId, orderByComparator);
198            }
199    
200            /**
201            * Returns the last resource type permission in the ordered set where roleId = &#63;.
202            *
203            * @param roleId the role ID
204            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
205            * @return the last matching resource type permission, or <code>null</code> if a matching resource type permission could not be found
206            */
207            public static ResourceTypePermission fetchByRoleId_Last(long roleId,
208                    OrderByComparator<ResourceTypePermission> orderByComparator) {
209                    return getPersistence().fetchByRoleId_Last(roleId, orderByComparator);
210            }
211    
212            /**
213            * Returns the resource type permissions before and after the current resource type permission in the ordered set where roleId = &#63;.
214            *
215            * @param resourceTypePermissionId the primary key of the current resource type permission
216            * @param roleId the role ID
217            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
218            * @return the previous, current, and next resource type permission
219            * @throws NoSuchResourceTypePermissionException if a resource type permission with the primary key could not be found
220            */
221            public static ResourceTypePermission[] findByRoleId_PrevAndNext(
222                    long resourceTypePermissionId, long roleId,
223                    OrderByComparator<ResourceTypePermission> orderByComparator)
224                    throws com.liferay.portal.NoSuchResourceTypePermissionException {
225                    return getPersistence()
226                                       .findByRoleId_PrevAndNext(resourceTypePermissionId, roleId,
227                            orderByComparator);
228            }
229    
230            /**
231            * Removes all the resource type permissions where roleId = &#63; from the database.
232            *
233            * @param roleId the role ID
234            */
235            public static void removeByRoleId(long roleId) {
236                    getPersistence().removeByRoleId(roleId);
237            }
238    
239            /**
240            * Returns the number of resource type permissions where roleId = &#63;.
241            *
242            * @param roleId the role ID
243            * @return the number of matching resource type permissions
244            */
245            public static int countByRoleId(long roleId) {
246                    return getPersistence().countByRoleId(roleId);
247            }
248    
249            /**
250            * Returns all the resource type permissions where companyId = &#63; and name = &#63; and roleId = &#63;.
251            *
252            * @param companyId the company ID
253            * @param name the name
254            * @param roleId the role ID
255            * @return the matching resource type permissions
256            */
257            public static List<ResourceTypePermission> findByC_N_R(long companyId,
258                    java.lang.String name, long roleId) {
259                    return getPersistence().findByC_N_R(companyId, name, roleId);
260            }
261    
262            /**
263            * Returns a range of all the resource type permissions where companyId = &#63; and name = &#63; and roleId = &#63;.
264            *
265            * <p>
266            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourceTypePermissionModelImpl}. 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.
267            * </p>
268            *
269            * @param companyId the company ID
270            * @param name the name
271            * @param roleId the role ID
272            * @param start the lower bound of the range of resource type permissions
273            * @param end the upper bound of the range of resource type permissions (not inclusive)
274            * @return the range of matching resource type permissions
275            */
276            public static List<ResourceTypePermission> findByC_N_R(long companyId,
277                    java.lang.String name, long roleId, int start, int end) {
278                    return getPersistence().findByC_N_R(companyId, name, roleId, start, end);
279            }
280    
281            /**
282            * Returns an ordered range of all the resource type permissions where companyId = &#63; and name = &#63; and roleId = &#63;.
283            *
284            * <p>
285            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourceTypePermissionModelImpl}. 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.
286            * </p>
287            *
288            * @param companyId the company ID
289            * @param name the name
290            * @param roleId the role ID
291            * @param start the lower bound of the range of resource type permissions
292            * @param end the upper bound of the range of resource type permissions (not inclusive)
293            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
294            * @return the ordered range of matching resource type permissions
295            */
296            public static List<ResourceTypePermission> findByC_N_R(long companyId,
297                    java.lang.String name, long roleId, int start, int end,
298                    OrderByComparator<ResourceTypePermission> orderByComparator) {
299                    return getPersistence()
300                                       .findByC_N_R(companyId, name, roleId, start, end,
301                            orderByComparator);
302            }
303    
304            /**
305            * Returns the first resource type permission in the ordered set where companyId = &#63; and name = &#63; and roleId = &#63;.
306            *
307            * @param companyId the company ID
308            * @param name the name
309            * @param roleId the role ID
310            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
311            * @return the first matching resource type permission
312            * @throws NoSuchResourceTypePermissionException if a matching resource type permission could not be found
313            */
314            public static ResourceTypePermission findByC_N_R_First(long companyId,
315                    java.lang.String name, long roleId,
316                    OrderByComparator<ResourceTypePermission> orderByComparator)
317                    throws com.liferay.portal.NoSuchResourceTypePermissionException {
318                    return getPersistence()
319                                       .findByC_N_R_First(companyId, name, roleId, orderByComparator);
320            }
321    
322            /**
323            * Returns the first resource type permission in the ordered set where companyId = &#63; and name = &#63; and roleId = &#63;.
324            *
325            * @param companyId the company ID
326            * @param name the name
327            * @param roleId the role ID
328            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
329            * @return the first matching resource type permission, or <code>null</code> if a matching resource type permission could not be found
330            */
331            public static ResourceTypePermission fetchByC_N_R_First(long companyId,
332                    java.lang.String name, long roleId,
333                    OrderByComparator<ResourceTypePermission> orderByComparator) {
334                    return getPersistence()
335                                       .fetchByC_N_R_First(companyId, name, roleId,
336                            orderByComparator);
337            }
338    
339            /**
340            * Returns the last resource type permission in the ordered set where companyId = &#63; and name = &#63; and roleId = &#63;.
341            *
342            * @param companyId the company ID
343            * @param name the name
344            * @param roleId the role ID
345            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
346            * @return the last matching resource type permission
347            * @throws NoSuchResourceTypePermissionException if a matching resource type permission could not be found
348            */
349            public static ResourceTypePermission findByC_N_R_Last(long companyId,
350                    java.lang.String name, long roleId,
351                    OrderByComparator<ResourceTypePermission> orderByComparator)
352                    throws com.liferay.portal.NoSuchResourceTypePermissionException {
353                    return getPersistence()
354                                       .findByC_N_R_Last(companyId, name, roleId, orderByComparator);
355            }
356    
357            /**
358            * Returns the last resource type permission in the ordered set where companyId = &#63; and name = &#63; and roleId = &#63;.
359            *
360            * @param companyId the company ID
361            * @param name the name
362            * @param roleId the role ID
363            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
364            * @return the last matching resource type permission, or <code>null</code> if a matching resource type permission could not be found
365            */
366            public static ResourceTypePermission fetchByC_N_R_Last(long companyId,
367                    java.lang.String name, long roleId,
368                    OrderByComparator<ResourceTypePermission> orderByComparator) {
369                    return getPersistence()
370                                       .fetchByC_N_R_Last(companyId, name, roleId, orderByComparator);
371            }
372    
373            /**
374            * Returns the resource type permissions before and after the current resource type permission in the ordered set where companyId = &#63; and name = &#63; and roleId = &#63;.
375            *
376            * @param resourceTypePermissionId the primary key of the current resource type permission
377            * @param companyId the company ID
378            * @param name the name
379            * @param roleId the role ID
380            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
381            * @return the previous, current, and next resource type permission
382            * @throws NoSuchResourceTypePermissionException if a resource type permission with the primary key could not be found
383            */
384            public static ResourceTypePermission[] findByC_N_R_PrevAndNext(
385                    long resourceTypePermissionId, long companyId, java.lang.String name,
386                    long roleId, OrderByComparator<ResourceTypePermission> orderByComparator)
387                    throws com.liferay.portal.NoSuchResourceTypePermissionException {
388                    return getPersistence()
389                                       .findByC_N_R_PrevAndNext(resourceTypePermissionId,
390                            companyId, name, roleId, orderByComparator);
391            }
392    
393            /**
394            * Removes all the resource type permissions where companyId = &#63; and name = &#63; and roleId = &#63; from the database.
395            *
396            * @param companyId the company ID
397            * @param name the name
398            * @param roleId the role ID
399            */
400            public static void removeByC_N_R(long companyId, java.lang.String name,
401                    long roleId) {
402                    getPersistence().removeByC_N_R(companyId, name, roleId);
403            }
404    
405            /**
406            * Returns the number of resource type permissions where companyId = &#63; and name = &#63; and roleId = &#63;.
407            *
408            * @param companyId the company ID
409            * @param name the name
410            * @param roleId the role ID
411            * @return the number of matching resource type permissions
412            */
413            public static int countByC_N_R(long companyId, java.lang.String name,
414                    long roleId) {
415                    return getPersistence().countByC_N_R(companyId, name, roleId);
416            }
417    
418            /**
419            * Returns the resource type permission where companyId = &#63; and groupId = &#63; and name = &#63; and roleId = &#63; or throws a {@link NoSuchResourceTypePermissionException} if it could not be found.
420            *
421            * @param companyId the company ID
422            * @param groupId the group ID
423            * @param name the name
424            * @param roleId the role ID
425            * @return the matching resource type permission
426            * @throws NoSuchResourceTypePermissionException if a matching resource type permission could not be found
427            */
428            public static ResourceTypePermission findByC_G_N_R(long companyId,
429                    long groupId, java.lang.String name, long roleId)
430                    throws com.liferay.portal.NoSuchResourceTypePermissionException {
431                    return getPersistence().findByC_G_N_R(companyId, groupId, name, roleId);
432            }
433    
434            /**
435            * Returns the resource type permission where companyId = &#63; and groupId = &#63; and name = &#63; and roleId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
436            *
437            * @param companyId the company ID
438            * @param groupId the group ID
439            * @param name the name
440            * @param roleId the role ID
441            * @return the matching resource type permission, or <code>null</code> if a matching resource type permission could not be found
442            */
443            public static ResourceTypePermission fetchByC_G_N_R(long companyId,
444                    long groupId, java.lang.String name, long roleId) {
445                    return getPersistence().fetchByC_G_N_R(companyId, groupId, name, roleId);
446            }
447    
448            /**
449            * Returns the resource type permission where companyId = &#63; and groupId = &#63; and name = &#63; and roleId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
450            *
451            * @param companyId the company ID
452            * @param groupId the group ID
453            * @param name the name
454            * @param roleId the role ID
455            * @param retrieveFromCache whether to use the finder cache
456            * @return the matching resource type permission, or <code>null</code> if a matching resource type permission could not be found
457            */
458            public static ResourceTypePermission fetchByC_G_N_R(long companyId,
459                    long groupId, java.lang.String name, long roleId,
460                    boolean retrieveFromCache) {
461                    return getPersistence()
462                                       .fetchByC_G_N_R(companyId, groupId, name, roleId,
463                            retrieveFromCache);
464            }
465    
466            /**
467            * Removes the resource type permission where companyId = &#63; and groupId = &#63; and name = &#63; and roleId = &#63; from the database.
468            *
469            * @param companyId the company ID
470            * @param groupId the group ID
471            * @param name the name
472            * @param roleId the role ID
473            * @return the resource type permission that was removed
474            */
475            public static ResourceTypePermission removeByC_G_N_R(long companyId,
476                    long groupId, java.lang.String name, long roleId)
477                    throws com.liferay.portal.NoSuchResourceTypePermissionException {
478                    return getPersistence().removeByC_G_N_R(companyId, groupId, name, roleId);
479            }
480    
481            /**
482            * Returns the number of resource type permissions where companyId = &#63; and groupId = &#63; and name = &#63; and roleId = &#63;.
483            *
484            * @param companyId the company ID
485            * @param groupId the group ID
486            * @param name the name
487            * @param roleId the role ID
488            * @return the number of matching resource type permissions
489            */
490            public static int countByC_G_N_R(long companyId, long groupId,
491                    java.lang.String name, long roleId) {
492                    return getPersistence().countByC_G_N_R(companyId, groupId, name, roleId);
493            }
494    
495            /**
496            * Caches the resource type permission in the entity cache if it is enabled.
497            *
498            * @param resourceTypePermission the resource type permission
499            */
500            public static void cacheResult(
501                    ResourceTypePermission resourceTypePermission) {
502                    getPersistence().cacheResult(resourceTypePermission);
503            }
504    
505            /**
506            * Caches the resource type permissions in the entity cache if it is enabled.
507            *
508            * @param resourceTypePermissions the resource type permissions
509            */
510            public static void cacheResult(
511                    List<ResourceTypePermission> resourceTypePermissions) {
512                    getPersistence().cacheResult(resourceTypePermissions);
513            }
514    
515            /**
516            * Creates a new resource type permission with the primary key. Does not add the resource type permission to the database.
517            *
518            * @param resourceTypePermissionId the primary key for the new resource type permission
519            * @return the new resource type permission
520            */
521            public static ResourceTypePermission create(long resourceTypePermissionId) {
522                    return getPersistence().create(resourceTypePermissionId);
523            }
524    
525            /**
526            * Removes the resource type permission with the primary key from the database. Also notifies the appropriate model listeners.
527            *
528            * @param resourceTypePermissionId the primary key of the resource type permission
529            * @return the resource type permission that was removed
530            * @throws NoSuchResourceTypePermissionException if a resource type permission with the primary key could not be found
531            */
532            public static ResourceTypePermission remove(long resourceTypePermissionId)
533                    throws com.liferay.portal.NoSuchResourceTypePermissionException {
534                    return getPersistence().remove(resourceTypePermissionId);
535            }
536    
537            public static ResourceTypePermission updateImpl(
538                    ResourceTypePermission resourceTypePermission) {
539                    return getPersistence().updateImpl(resourceTypePermission);
540            }
541    
542            /**
543            * Returns the resource type permission with the primary key or throws a {@link NoSuchResourceTypePermissionException} if it could not be found.
544            *
545            * @param resourceTypePermissionId the primary key of the resource type permission
546            * @return the resource type permission
547            * @throws NoSuchResourceTypePermissionException if a resource type permission with the primary key could not be found
548            */
549            public static ResourceTypePermission findByPrimaryKey(
550                    long resourceTypePermissionId)
551                    throws com.liferay.portal.NoSuchResourceTypePermissionException {
552                    return getPersistence().findByPrimaryKey(resourceTypePermissionId);
553            }
554    
555            /**
556            * Returns the resource type permission with the primary key or returns <code>null</code> if it could not be found.
557            *
558            * @param resourceTypePermissionId the primary key of the resource type permission
559            * @return the resource type permission, or <code>null</code> if a resource type permission with the primary key could not be found
560            */
561            public static ResourceTypePermission fetchByPrimaryKey(
562                    long resourceTypePermissionId) {
563                    return getPersistence().fetchByPrimaryKey(resourceTypePermissionId);
564            }
565    
566            public static java.util.Map<java.io.Serializable, ResourceTypePermission> fetchByPrimaryKeys(
567                    java.util.Set<java.io.Serializable> primaryKeys) {
568                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
569            }
570    
571            /**
572            * Returns all the resource type permissions.
573            *
574            * @return the resource type permissions
575            */
576            public static List<ResourceTypePermission> findAll() {
577                    return getPersistence().findAll();
578            }
579    
580            /**
581            * Returns a range of all the resource type permissions.
582            *
583            * <p>
584            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourceTypePermissionModelImpl}. 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.
585            * </p>
586            *
587            * @param start the lower bound of the range of resource type permissions
588            * @param end the upper bound of the range of resource type permissions (not inclusive)
589            * @return the range of resource type permissions
590            */
591            public static List<ResourceTypePermission> findAll(int start, int end) {
592                    return getPersistence().findAll(start, end);
593            }
594    
595            /**
596            * Returns an ordered range of all the resource type permissions.
597            *
598            * <p>
599            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourceTypePermissionModelImpl}. 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.
600            * </p>
601            *
602            * @param start the lower bound of the range of resource type permissions
603            * @param end the upper bound of the range of resource type permissions (not inclusive)
604            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
605            * @return the ordered range of resource type permissions
606            */
607            public static List<ResourceTypePermission> findAll(int start, int end,
608                    OrderByComparator<ResourceTypePermission> orderByComparator) {
609                    return getPersistence().findAll(start, end, orderByComparator);
610            }
611    
612            /**
613            * Removes all the resource type permissions from the database.
614            */
615            public static void removeAll() {
616                    getPersistence().removeAll();
617            }
618    
619            /**
620            * Returns the number of resource type permissions.
621            *
622            * @return the number of resource type permissions
623            */
624            public static int countAll() {
625                    return getPersistence().countAll();
626            }
627    
628            public static ResourceTypePermissionPersistence getPersistence() {
629                    if (_persistence == null) {
630                            _persistence = (ResourceTypePermissionPersistence)PortalBeanLocatorUtil.locate(ResourceTypePermissionPersistence.class.getName());
631    
632                            ReferenceRegistry.registerReference(ResourceTypePermissionUtil.class,
633                                    "_persistence");
634                    }
635    
636                    return _persistence;
637            }
638    
639            /**
640             * @deprecated As of 6.2.0
641             */
642            @Deprecated
643            public void setPersistence(ResourceTypePermissionPersistence persistence) {
644            }
645    
646            private static ResourceTypePermissionPersistence _persistence;
647    }