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.ResourceBlock;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the resource block service. This utility wraps {@link com.liferay.portal.service.persistence.impl.ResourceBlockPersistenceImpl} 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 ResourceBlockPersistence
037     * @see com.liferay.portal.service.persistence.impl.ResourceBlockPersistenceImpl
038     * @generated
039     */
040    @ProviderType
041    public class ResourceBlockUtil {
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(ResourceBlock resourceBlock) {
059                    getPersistence().clearCache(resourceBlock);
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<ResourceBlock> 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<ResourceBlock> 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<ResourceBlock> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator<ResourceBlock> 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 ResourceBlock update(ResourceBlock resourceBlock) {
100                    return getPersistence().update(resourceBlock);
101            }
102    
103            /**
104             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
105             */
106            public static ResourceBlock update(ResourceBlock resourceBlock,
107                    ServiceContext serviceContext) {
108                    return getPersistence().update(resourceBlock, serviceContext);
109            }
110    
111            /**
112            * Returns all the resource blocks where companyId = &#63; and name = &#63;.
113            *
114            * @param companyId the company ID
115            * @param name the name
116            * @return the matching resource blocks
117            */
118            public static List<ResourceBlock> findByC_N(long companyId,
119                    java.lang.String name) {
120                    return getPersistence().findByC_N(companyId, name);
121            }
122    
123            /**
124            * Returns a range of all the resource blocks where companyId = &#63; and name = &#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 ResourceBlockModelImpl}. 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 companyId the company ID
131            * @param name the name
132            * @param start the lower bound of the range of resource blocks
133            * @param end the upper bound of the range of resource blocks (not inclusive)
134            * @return the range of matching resource blocks
135            */
136            public static List<ResourceBlock> findByC_N(long companyId,
137                    java.lang.String name, int start, int end) {
138                    return getPersistence().findByC_N(companyId, name, start, end);
139            }
140    
141            /**
142            * Returns an ordered range of all the resource blocks where companyId = &#63; and name = &#63;.
143            *
144            * <p>
145            * 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 ResourceBlockModelImpl}. 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.
146            * </p>
147            *
148            * @param companyId the company ID
149            * @param name the name
150            * @param start the lower bound of the range of resource blocks
151            * @param end the upper bound of the range of resource blocks (not inclusive)
152            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
153            * @return the ordered range of matching resource blocks
154            */
155            public static List<ResourceBlock> findByC_N(long companyId,
156                    java.lang.String name, int start, int end,
157                    OrderByComparator<ResourceBlock> orderByComparator) {
158                    return getPersistence()
159                                       .findByC_N(companyId, name, start, end, orderByComparator);
160            }
161    
162            /**
163            * Returns the first resource block in the ordered set where companyId = &#63; and name = &#63;.
164            *
165            * @param companyId the company ID
166            * @param name the name
167            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
168            * @return the first matching resource block
169            * @throws NoSuchResourceBlockException if a matching resource block could not be found
170            */
171            public static ResourceBlock findByC_N_First(long companyId,
172                    java.lang.String name,
173                    OrderByComparator<ResourceBlock> orderByComparator)
174                    throws com.liferay.portal.NoSuchResourceBlockException {
175                    return getPersistence()
176                                       .findByC_N_First(companyId, name, orderByComparator);
177            }
178    
179            /**
180            * Returns the first resource block in the ordered set where companyId = &#63; and name = &#63;.
181            *
182            * @param companyId the company ID
183            * @param name the name
184            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
185            * @return the first matching resource block, or <code>null</code> if a matching resource block could not be found
186            */
187            public static ResourceBlock fetchByC_N_First(long companyId,
188                    java.lang.String name,
189                    OrderByComparator<ResourceBlock> orderByComparator) {
190                    return getPersistence()
191                                       .fetchByC_N_First(companyId, name, orderByComparator);
192            }
193    
194            /**
195            * Returns the last resource block in the ordered set where companyId = &#63; and name = &#63;.
196            *
197            * @param companyId the company ID
198            * @param name the name
199            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
200            * @return the last matching resource block
201            * @throws NoSuchResourceBlockException if a matching resource block could not be found
202            */
203            public static ResourceBlock findByC_N_Last(long companyId,
204                    java.lang.String name,
205                    OrderByComparator<ResourceBlock> orderByComparator)
206                    throws com.liferay.portal.NoSuchResourceBlockException {
207                    return getPersistence()
208                                       .findByC_N_Last(companyId, name, orderByComparator);
209            }
210    
211            /**
212            * Returns the last resource block in the ordered set where companyId = &#63; and name = &#63;.
213            *
214            * @param companyId the company ID
215            * @param name the name
216            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
217            * @return the last matching resource block, or <code>null</code> if a matching resource block could not be found
218            */
219            public static ResourceBlock fetchByC_N_Last(long companyId,
220                    java.lang.String name,
221                    OrderByComparator<ResourceBlock> orderByComparator) {
222                    return getPersistence()
223                                       .fetchByC_N_Last(companyId, name, orderByComparator);
224            }
225    
226            /**
227            * Returns the resource blocks before and after the current resource block in the ordered set where companyId = &#63; and name = &#63;.
228            *
229            * @param resourceBlockId the primary key of the current resource block
230            * @param companyId the company ID
231            * @param name the name
232            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
233            * @return the previous, current, and next resource block
234            * @throws NoSuchResourceBlockException if a resource block with the primary key could not be found
235            */
236            public static ResourceBlock[] findByC_N_PrevAndNext(long resourceBlockId,
237                    long companyId, java.lang.String name,
238                    OrderByComparator<ResourceBlock> orderByComparator)
239                    throws com.liferay.portal.NoSuchResourceBlockException {
240                    return getPersistence()
241                                       .findByC_N_PrevAndNext(resourceBlockId, companyId, name,
242                            orderByComparator);
243            }
244    
245            /**
246            * Removes all the resource blocks where companyId = &#63; and name = &#63; from the database.
247            *
248            * @param companyId the company ID
249            * @param name the name
250            */
251            public static void removeByC_N(long companyId, java.lang.String name) {
252                    getPersistence().removeByC_N(companyId, name);
253            }
254    
255            /**
256            * Returns the number of resource blocks where companyId = &#63; and name = &#63;.
257            *
258            * @param companyId the company ID
259            * @param name the name
260            * @return the number of matching resource blocks
261            */
262            public static int countByC_N(long companyId, java.lang.String name) {
263                    return getPersistence().countByC_N(companyId, name);
264            }
265    
266            /**
267            * Returns all the resource blocks where companyId = &#63; and groupId = &#63; and name = &#63;.
268            *
269            * @param companyId the company ID
270            * @param groupId the group ID
271            * @param name the name
272            * @return the matching resource blocks
273            */
274            public static List<ResourceBlock> findByC_G_N(long companyId, long groupId,
275                    java.lang.String name) {
276                    return getPersistence().findByC_G_N(companyId, groupId, name);
277            }
278    
279            /**
280            * Returns a range of all the resource blocks where companyId = &#63; and groupId = &#63; and name = &#63;.
281            *
282            * <p>
283            * 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 ResourceBlockModelImpl}. 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.
284            * </p>
285            *
286            * @param companyId the company ID
287            * @param groupId the group ID
288            * @param name the name
289            * @param start the lower bound of the range of resource blocks
290            * @param end the upper bound of the range of resource blocks (not inclusive)
291            * @return the range of matching resource blocks
292            */
293            public static List<ResourceBlock> findByC_G_N(long companyId, long groupId,
294                    java.lang.String name, int start, int end) {
295                    return getPersistence().findByC_G_N(companyId, groupId, name, start, end);
296            }
297    
298            /**
299            * Returns an ordered range of all the resource blocks where companyId = &#63; and groupId = &#63; and name = &#63;.
300            *
301            * <p>
302            * 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 ResourceBlockModelImpl}. 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.
303            * </p>
304            *
305            * @param companyId the company ID
306            * @param groupId the group ID
307            * @param name the name
308            * @param start the lower bound of the range of resource blocks
309            * @param end the upper bound of the range of resource blocks (not inclusive)
310            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
311            * @return the ordered range of matching resource blocks
312            */
313            public static List<ResourceBlock> findByC_G_N(long companyId, long groupId,
314                    java.lang.String name, int start, int end,
315                    OrderByComparator<ResourceBlock> orderByComparator) {
316                    return getPersistence()
317                                       .findByC_G_N(companyId, groupId, name, start, end,
318                            orderByComparator);
319            }
320    
321            /**
322            * Returns the first resource block in the ordered set where companyId = &#63; and groupId = &#63; and name = &#63;.
323            *
324            * @param companyId the company ID
325            * @param groupId the group ID
326            * @param name the name
327            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
328            * @return the first matching resource block
329            * @throws NoSuchResourceBlockException if a matching resource block could not be found
330            */
331            public static ResourceBlock findByC_G_N_First(long companyId, long groupId,
332                    java.lang.String name,
333                    OrderByComparator<ResourceBlock> orderByComparator)
334                    throws com.liferay.portal.NoSuchResourceBlockException {
335                    return getPersistence()
336                                       .findByC_G_N_First(companyId, groupId, name,
337                            orderByComparator);
338            }
339    
340            /**
341            * Returns the first resource block in the ordered set where companyId = &#63; and groupId = &#63; and name = &#63;.
342            *
343            * @param companyId the company ID
344            * @param groupId the group ID
345            * @param name the name
346            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
347            * @return the first matching resource block, or <code>null</code> if a matching resource block could not be found
348            */
349            public static ResourceBlock fetchByC_G_N_First(long companyId,
350                    long groupId, java.lang.String name,
351                    OrderByComparator<ResourceBlock> orderByComparator) {
352                    return getPersistence()
353                                       .fetchByC_G_N_First(companyId, groupId, name,
354                            orderByComparator);
355            }
356    
357            /**
358            * Returns the last resource block in the ordered set where companyId = &#63; and groupId = &#63; and name = &#63;.
359            *
360            * @param companyId the company ID
361            * @param groupId the group ID
362            * @param name the name
363            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
364            * @return the last matching resource block
365            * @throws NoSuchResourceBlockException if a matching resource block could not be found
366            */
367            public static ResourceBlock findByC_G_N_Last(long companyId, long groupId,
368                    java.lang.String name,
369                    OrderByComparator<ResourceBlock> orderByComparator)
370                    throws com.liferay.portal.NoSuchResourceBlockException {
371                    return getPersistence()
372                                       .findByC_G_N_Last(companyId, groupId, name, orderByComparator);
373            }
374    
375            /**
376            * Returns the last resource block in the ordered set where companyId = &#63; and groupId = &#63; and name = &#63;.
377            *
378            * @param companyId the company ID
379            * @param groupId the group ID
380            * @param name the name
381            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
382            * @return the last matching resource block, or <code>null</code> if a matching resource block could not be found
383            */
384            public static ResourceBlock fetchByC_G_N_Last(long companyId, long groupId,
385                    java.lang.String name,
386                    OrderByComparator<ResourceBlock> orderByComparator) {
387                    return getPersistence()
388                                       .fetchByC_G_N_Last(companyId, groupId, name,
389                            orderByComparator);
390            }
391    
392            /**
393            * Returns the resource blocks before and after the current resource block in the ordered set where companyId = &#63; and groupId = &#63; and name = &#63;.
394            *
395            * @param resourceBlockId the primary key of the current resource block
396            * @param companyId the company ID
397            * @param groupId the group ID
398            * @param name the name
399            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
400            * @return the previous, current, and next resource block
401            * @throws NoSuchResourceBlockException if a resource block with the primary key could not be found
402            */
403            public static ResourceBlock[] findByC_G_N_PrevAndNext(
404                    long resourceBlockId, long companyId, long groupId,
405                    java.lang.String name,
406                    OrderByComparator<ResourceBlock> orderByComparator)
407                    throws com.liferay.portal.NoSuchResourceBlockException {
408                    return getPersistence()
409                                       .findByC_G_N_PrevAndNext(resourceBlockId, companyId,
410                            groupId, name, orderByComparator);
411            }
412    
413            /**
414            * Removes all the resource blocks where companyId = &#63; and groupId = &#63; and name = &#63; from the database.
415            *
416            * @param companyId the company ID
417            * @param groupId the group ID
418            * @param name the name
419            */
420            public static void removeByC_G_N(long companyId, long groupId,
421                    java.lang.String name) {
422                    getPersistence().removeByC_G_N(companyId, groupId, name);
423            }
424    
425            /**
426            * Returns the number of resource blocks where companyId = &#63; and groupId = &#63; and name = &#63;.
427            *
428            * @param companyId the company ID
429            * @param groupId the group ID
430            * @param name the name
431            * @return the number of matching resource blocks
432            */
433            public static int countByC_G_N(long companyId, long groupId,
434                    java.lang.String name) {
435                    return getPersistence().countByC_G_N(companyId, groupId, name);
436            }
437    
438            /**
439            * Returns the resource block where companyId = &#63; and groupId = &#63; and name = &#63; and permissionsHash = &#63; or throws a {@link NoSuchResourceBlockException} if it could not be found.
440            *
441            * @param companyId the company ID
442            * @param groupId the group ID
443            * @param name the name
444            * @param permissionsHash the permissions hash
445            * @return the matching resource block
446            * @throws NoSuchResourceBlockException if a matching resource block could not be found
447            */
448            public static ResourceBlock findByC_G_N_P(long companyId, long groupId,
449                    java.lang.String name, java.lang.String permissionsHash)
450                    throws com.liferay.portal.NoSuchResourceBlockException {
451                    return getPersistence()
452                                       .findByC_G_N_P(companyId, groupId, name, permissionsHash);
453            }
454    
455            /**
456            * Returns the resource block where companyId = &#63; and groupId = &#63; and name = &#63; and permissionsHash = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
457            *
458            * @param companyId the company ID
459            * @param groupId the group ID
460            * @param name the name
461            * @param permissionsHash the permissions hash
462            * @return the matching resource block, or <code>null</code> if a matching resource block could not be found
463            */
464            public static ResourceBlock fetchByC_G_N_P(long companyId, long groupId,
465                    java.lang.String name, java.lang.String permissionsHash) {
466                    return getPersistence()
467                                       .fetchByC_G_N_P(companyId, groupId, name, permissionsHash);
468            }
469    
470            /**
471            * Returns the resource block where companyId = &#63; and groupId = &#63; and name = &#63; and permissionsHash = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
472            *
473            * @param companyId the company ID
474            * @param groupId the group ID
475            * @param name the name
476            * @param permissionsHash the permissions hash
477            * @param retrieveFromCache whether to use the finder cache
478            * @return the matching resource block, or <code>null</code> if a matching resource block could not be found
479            */
480            public static ResourceBlock fetchByC_G_N_P(long companyId, long groupId,
481                    java.lang.String name, java.lang.String permissionsHash,
482                    boolean retrieveFromCache) {
483                    return getPersistence()
484                                       .fetchByC_G_N_P(companyId, groupId, name, permissionsHash,
485                            retrieveFromCache);
486            }
487    
488            /**
489            * Removes the resource block where companyId = &#63; and groupId = &#63; and name = &#63; and permissionsHash = &#63; from the database.
490            *
491            * @param companyId the company ID
492            * @param groupId the group ID
493            * @param name the name
494            * @param permissionsHash the permissions hash
495            * @return the resource block that was removed
496            */
497            public static ResourceBlock removeByC_G_N_P(long companyId, long groupId,
498                    java.lang.String name, java.lang.String permissionsHash)
499                    throws com.liferay.portal.NoSuchResourceBlockException {
500                    return getPersistence()
501                                       .removeByC_G_N_P(companyId, groupId, name, permissionsHash);
502            }
503    
504            /**
505            * Returns the number of resource blocks where companyId = &#63; and groupId = &#63; and name = &#63; and permissionsHash = &#63;.
506            *
507            * @param companyId the company ID
508            * @param groupId the group ID
509            * @param name the name
510            * @param permissionsHash the permissions hash
511            * @return the number of matching resource blocks
512            */
513            public static int countByC_G_N_P(long companyId, long groupId,
514                    java.lang.String name, java.lang.String permissionsHash) {
515                    return getPersistence()
516                                       .countByC_G_N_P(companyId, groupId, name, permissionsHash);
517            }
518    
519            /**
520            * Caches the resource block in the entity cache if it is enabled.
521            *
522            * @param resourceBlock the resource block
523            */
524            public static void cacheResult(ResourceBlock resourceBlock) {
525                    getPersistence().cacheResult(resourceBlock);
526            }
527    
528            /**
529            * Caches the resource blocks in the entity cache if it is enabled.
530            *
531            * @param resourceBlocks the resource blocks
532            */
533            public static void cacheResult(List<ResourceBlock> resourceBlocks) {
534                    getPersistence().cacheResult(resourceBlocks);
535            }
536    
537            /**
538            * Creates a new resource block with the primary key. Does not add the resource block to the database.
539            *
540            * @param resourceBlockId the primary key for the new resource block
541            * @return the new resource block
542            */
543            public static ResourceBlock create(long resourceBlockId) {
544                    return getPersistence().create(resourceBlockId);
545            }
546    
547            /**
548            * Removes the resource block with the primary key from the database. Also notifies the appropriate model listeners.
549            *
550            * @param resourceBlockId the primary key of the resource block
551            * @return the resource block that was removed
552            * @throws NoSuchResourceBlockException if a resource block with the primary key could not be found
553            */
554            public static ResourceBlock remove(long resourceBlockId)
555                    throws com.liferay.portal.NoSuchResourceBlockException {
556                    return getPersistence().remove(resourceBlockId);
557            }
558    
559            public static ResourceBlock updateImpl(ResourceBlock resourceBlock) {
560                    return getPersistence().updateImpl(resourceBlock);
561            }
562    
563            /**
564            * Returns the resource block with the primary key or throws a {@link NoSuchResourceBlockException} if it could not be found.
565            *
566            * @param resourceBlockId the primary key of the resource block
567            * @return the resource block
568            * @throws NoSuchResourceBlockException if a resource block with the primary key could not be found
569            */
570            public static ResourceBlock findByPrimaryKey(long resourceBlockId)
571                    throws com.liferay.portal.NoSuchResourceBlockException {
572                    return getPersistence().findByPrimaryKey(resourceBlockId);
573            }
574    
575            /**
576            * Returns the resource block with the primary key or returns <code>null</code> if it could not be found.
577            *
578            * @param resourceBlockId the primary key of the resource block
579            * @return the resource block, or <code>null</code> if a resource block with the primary key could not be found
580            */
581            public static ResourceBlock fetchByPrimaryKey(long resourceBlockId) {
582                    return getPersistence().fetchByPrimaryKey(resourceBlockId);
583            }
584    
585            public static java.util.Map<java.io.Serializable, ResourceBlock> fetchByPrimaryKeys(
586                    java.util.Set<java.io.Serializable> primaryKeys) {
587                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
588            }
589    
590            /**
591            * Returns all the resource blocks.
592            *
593            * @return the resource blocks
594            */
595            public static List<ResourceBlock> findAll() {
596                    return getPersistence().findAll();
597            }
598    
599            /**
600            * Returns a range of all the resource blocks.
601            *
602            * <p>
603            * 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 ResourceBlockModelImpl}. 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.
604            * </p>
605            *
606            * @param start the lower bound of the range of resource blocks
607            * @param end the upper bound of the range of resource blocks (not inclusive)
608            * @return the range of resource blocks
609            */
610            public static List<ResourceBlock> findAll(int start, int end) {
611                    return getPersistence().findAll(start, end);
612            }
613    
614            /**
615            * Returns an ordered range of all the resource blocks.
616            *
617            * <p>
618            * 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 ResourceBlockModelImpl}. 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.
619            * </p>
620            *
621            * @param start the lower bound of the range of resource blocks
622            * @param end the upper bound of the range of resource blocks (not inclusive)
623            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
624            * @return the ordered range of resource blocks
625            */
626            public static List<ResourceBlock> findAll(int start, int end,
627                    OrderByComparator<ResourceBlock> orderByComparator) {
628                    return getPersistence().findAll(start, end, orderByComparator);
629            }
630    
631            /**
632            * Removes all the resource blocks from the database.
633            */
634            public static void removeAll() {
635                    getPersistence().removeAll();
636            }
637    
638            /**
639            * Returns the number of resource blocks.
640            *
641            * @return the number of resource blocks
642            */
643            public static int countAll() {
644                    return getPersistence().countAll();
645            }
646    
647            public static ResourceBlockPersistence getPersistence() {
648                    if (_persistence == null) {
649                            _persistence = (ResourceBlockPersistence)PortalBeanLocatorUtil.locate(ResourceBlockPersistence.class.getName());
650    
651                            ReferenceRegistry.registerReference(ResourceBlockUtil.class,
652                                    "_persistence");
653                    }
654    
655                    return _persistence;
656            }
657    
658            /**
659             * @deprecated As of 6.2.0
660             */
661            @Deprecated
662            public void setPersistence(ResourceBlockPersistence persistence) {
663            }
664    
665            private static ResourceBlockPersistence _persistence;
666    }