001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.ResourceBlockPermission; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the resource block permission service. This utility wraps {@link ResourceBlockPermissionPersistenceImpl} 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. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see ResourceBlockPermissionPersistence 036 * @see ResourceBlockPermissionPersistenceImpl 037 * @generated 038 */ 039 public class ResourceBlockPermissionUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache( 057 ResourceBlockPermission resourceBlockPermission) { 058 getPersistence().clearCache(resourceBlockPermission); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<ResourceBlockPermission> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 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<ResourceBlockPermission> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<ResourceBlockPermission> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static ResourceBlockPermission update( 101 ResourceBlockPermission resourceBlockPermission) 102 throws SystemException { 103 return getPersistence().update(resourceBlockPermission); 104 } 105 106 /** 107 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 108 */ 109 public static ResourceBlockPermission update( 110 ResourceBlockPermission resourceBlockPermission, 111 ServiceContext serviceContext) throws SystemException { 112 return getPersistence().update(resourceBlockPermission, serviceContext); 113 } 114 115 /** 116 * Returns all the resource block permissions where resourceBlockId = ?. 117 * 118 * @param resourceBlockId the resource block ID 119 * @return the matching resource block permissions 120 * @throws SystemException if a system exception occurred 121 */ 122 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId( 123 long resourceBlockId) 124 throws com.liferay.portal.kernel.exception.SystemException { 125 return getPersistence().findByResourceBlockId(resourceBlockId); 126 } 127 128 /** 129 * Returns a range of all the resource block permissions where resourceBlockId = ?. 130 * 131 * <p> 132 * 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.ResourceBlockPermissionModelImpl}. 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. 133 * </p> 134 * 135 * @param resourceBlockId the resource block ID 136 * @param start the lower bound of the range of resource block permissions 137 * @param end the upper bound of the range of resource block permissions (not inclusive) 138 * @return the range of matching resource block permissions 139 * @throws SystemException if a system exception occurred 140 */ 141 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId( 142 long resourceBlockId, int start, int end) 143 throws com.liferay.portal.kernel.exception.SystemException { 144 return getPersistence() 145 .findByResourceBlockId(resourceBlockId, start, end); 146 } 147 148 /** 149 * Returns an ordered range of all the resource block permissions where resourceBlockId = ?. 150 * 151 * <p> 152 * 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.ResourceBlockPermissionModelImpl}. 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. 153 * </p> 154 * 155 * @param resourceBlockId the resource block ID 156 * @param start the lower bound of the range of resource block permissions 157 * @param end the upper bound of the range of resource block permissions (not inclusive) 158 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 159 * @return the ordered range of matching resource block permissions 160 * @throws SystemException if a system exception occurred 161 */ 162 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId( 163 long resourceBlockId, int start, int end, 164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 165 throws com.liferay.portal.kernel.exception.SystemException { 166 return getPersistence() 167 .findByResourceBlockId(resourceBlockId, start, end, 168 orderByComparator); 169 } 170 171 /** 172 * Returns the first resource block permission in the ordered set where resourceBlockId = ?. 173 * 174 * @param resourceBlockId the resource block ID 175 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 176 * @return the first matching resource block permission 177 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 178 * @throws SystemException if a system exception occurred 179 */ 180 public static com.liferay.portal.model.ResourceBlockPermission findByResourceBlockId_First( 181 long resourceBlockId, 182 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 183 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 184 com.liferay.portal.kernel.exception.SystemException { 185 return getPersistence() 186 .findByResourceBlockId_First(resourceBlockId, 187 orderByComparator); 188 } 189 190 /** 191 * Returns the first resource block permission in the ordered set where resourceBlockId = ?. 192 * 193 * @param resourceBlockId the resource block ID 194 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 195 * @return the first matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 196 * @throws SystemException if a system exception occurred 197 */ 198 public static com.liferay.portal.model.ResourceBlockPermission fetchByResourceBlockId_First( 199 long resourceBlockId, 200 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 201 throws com.liferay.portal.kernel.exception.SystemException { 202 return getPersistence() 203 .fetchByResourceBlockId_First(resourceBlockId, 204 orderByComparator); 205 } 206 207 /** 208 * Returns the last resource block permission in the ordered set where resourceBlockId = ?. 209 * 210 * @param resourceBlockId the resource block ID 211 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 212 * @return the last matching resource block permission 213 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 214 * @throws SystemException if a system exception occurred 215 */ 216 public static com.liferay.portal.model.ResourceBlockPermission findByResourceBlockId_Last( 217 long resourceBlockId, 218 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 219 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 220 com.liferay.portal.kernel.exception.SystemException { 221 return getPersistence() 222 .findByResourceBlockId_Last(resourceBlockId, 223 orderByComparator); 224 } 225 226 /** 227 * Returns the last resource block permission in the ordered set where resourceBlockId = ?. 228 * 229 * @param resourceBlockId the resource block ID 230 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 231 * @return the last matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 232 * @throws SystemException if a system exception occurred 233 */ 234 public static com.liferay.portal.model.ResourceBlockPermission fetchByResourceBlockId_Last( 235 long resourceBlockId, 236 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 237 throws com.liferay.portal.kernel.exception.SystemException { 238 return getPersistence() 239 .fetchByResourceBlockId_Last(resourceBlockId, 240 orderByComparator); 241 } 242 243 /** 244 * Returns the resource block permissions before and after the current resource block permission in the ordered set where resourceBlockId = ?. 245 * 246 * @param resourceBlockPermissionId the primary key of the current resource block permission 247 * @param resourceBlockId the resource block ID 248 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 249 * @return the previous, current, and next resource block permission 250 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 251 * @throws SystemException if a system exception occurred 252 */ 253 public static com.liferay.portal.model.ResourceBlockPermission[] findByResourceBlockId_PrevAndNext( 254 long resourceBlockPermissionId, long resourceBlockId, 255 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 256 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 257 com.liferay.portal.kernel.exception.SystemException { 258 return getPersistence() 259 .findByResourceBlockId_PrevAndNext(resourceBlockPermissionId, 260 resourceBlockId, orderByComparator); 261 } 262 263 /** 264 * Removes all the resource block permissions where resourceBlockId = ? from the database. 265 * 266 * @param resourceBlockId the resource block ID 267 * @throws SystemException if a system exception occurred 268 */ 269 public static void removeByResourceBlockId(long resourceBlockId) 270 throws com.liferay.portal.kernel.exception.SystemException { 271 getPersistence().removeByResourceBlockId(resourceBlockId); 272 } 273 274 /** 275 * Returns the number of resource block permissions where resourceBlockId = ?. 276 * 277 * @param resourceBlockId the resource block ID 278 * @return the number of matching resource block permissions 279 * @throws SystemException if a system exception occurred 280 */ 281 public static int countByResourceBlockId(long resourceBlockId) 282 throws com.liferay.portal.kernel.exception.SystemException { 283 return getPersistence().countByResourceBlockId(resourceBlockId); 284 } 285 286 /** 287 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found. 288 * 289 * @param resourceBlockId the resource block ID 290 * @param roleId the role ID 291 * @return the matching resource block permission 292 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 293 * @throws SystemException if a system exception occurred 294 */ 295 public static com.liferay.portal.model.ResourceBlockPermission findByR_R( 296 long resourceBlockId, long roleId) 297 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 298 com.liferay.portal.kernel.exception.SystemException { 299 return getPersistence().findByR_R(resourceBlockId, roleId); 300 } 301 302 /** 303 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 304 * 305 * @param resourceBlockId the resource block ID 306 * @param roleId the role ID 307 * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 308 * @throws SystemException if a system exception occurred 309 */ 310 public static com.liferay.portal.model.ResourceBlockPermission fetchByR_R( 311 long resourceBlockId, long roleId) 312 throws com.liferay.portal.kernel.exception.SystemException { 313 return getPersistence().fetchByR_R(resourceBlockId, roleId); 314 } 315 316 /** 317 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 318 * 319 * @param resourceBlockId the resource block ID 320 * @param roleId the role ID 321 * @param retrieveFromCache whether to use the finder cache 322 * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 323 * @throws SystemException if a system exception occurred 324 */ 325 public static com.liferay.portal.model.ResourceBlockPermission fetchByR_R( 326 long resourceBlockId, long roleId, boolean retrieveFromCache) 327 throws com.liferay.portal.kernel.exception.SystemException { 328 return getPersistence() 329 .fetchByR_R(resourceBlockId, roleId, retrieveFromCache); 330 } 331 332 /** 333 * Removes the resource block permission where resourceBlockId = ? and roleId = ? from the database. 334 * 335 * @param resourceBlockId the resource block ID 336 * @param roleId the role ID 337 * @return the resource block permission that was removed 338 * @throws SystemException if a system exception occurred 339 */ 340 public static com.liferay.portal.model.ResourceBlockPermission removeByR_R( 341 long resourceBlockId, long roleId) 342 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 343 com.liferay.portal.kernel.exception.SystemException { 344 return getPersistence().removeByR_R(resourceBlockId, roleId); 345 } 346 347 /** 348 * Returns the number of resource block permissions where resourceBlockId = ? and roleId = ?. 349 * 350 * @param resourceBlockId the resource block ID 351 * @param roleId the role ID 352 * @return the number of matching resource block permissions 353 * @throws SystemException if a system exception occurred 354 */ 355 public static int countByR_R(long resourceBlockId, long roleId) 356 throws com.liferay.portal.kernel.exception.SystemException { 357 return getPersistence().countByR_R(resourceBlockId, roleId); 358 } 359 360 /** 361 * Caches the resource block permission in the entity cache if it is enabled. 362 * 363 * @param resourceBlockPermission the resource block permission 364 */ 365 public static void cacheResult( 366 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission) { 367 getPersistence().cacheResult(resourceBlockPermission); 368 } 369 370 /** 371 * Caches the resource block permissions in the entity cache if it is enabled. 372 * 373 * @param resourceBlockPermissions the resource block permissions 374 */ 375 public static void cacheResult( 376 java.util.List<com.liferay.portal.model.ResourceBlockPermission> resourceBlockPermissions) { 377 getPersistence().cacheResult(resourceBlockPermissions); 378 } 379 380 /** 381 * Creates a new resource block permission with the primary key. Does not add the resource block permission to the database. 382 * 383 * @param resourceBlockPermissionId the primary key for the new resource block permission 384 * @return the new resource block permission 385 */ 386 public static com.liferay.portal.model.ResourceBlockPermission create( 387 long resourceBlockPermissionId) { 388 return getPersistence().create(resourceBlockPermissionId); 389 } 390 391 /** 392 * Removes the resource block permission with the primary key from the database. Also notifies the appropriate model listeners. 393 * 394 * @param resourceBlockPermissionId the primary key of the resource block permission 395 * @return the resource block permission that was removed 396 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 397 * @throws SystemException if a system exception occurred 398 */ 399 public static com.liferay.portal.model.ResourceBlockPermission remove( 400 long resourceBlockPermissionId) 401 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 402 com.liferay.portal.kernel.exception.SystemException { 403 return getPersistence().remove(resourceBlockPermissionId); 404 } 405 406 public static com.liferay.portal.model.ResourceBlockPermission updateImpl( 407 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission) 408 throws com.liferay.portal.kernel.exception.SystemException { 409 return getPersistence().updateImpl(resourceBlockPermission); 410 } 411 412 /** 413 * Returns the resource block permission with the primary key or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found. 414 * 415 * @param resourceBlockPermissionId the primary key of the resource block permission 416 * @return the resource block permission 417 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 418 * @throws SystemException if a system exception occurred 419 */ 420 public static com.liferay.portal.model.ResourceBlockPermission findByPrimaryKey( 421 long resourceBlockPermissionId) 422 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 423 com.liferay.portal.kernel.exception.SystemException { 424 return getPersistence().findByPrimaryKey(resourceBlockPermissionId); 425 } 426 427 /** 428 * Returns the resource block permission with the primary key or returns <code>null</code> if it could not be found. 429 * 430 * @param resourceBlockPermissionId the primary key of the resource block permission 431 * @return the resource block permission, or <code>null</code> if a resource block permission with the primary key could not be found 432 * @throws SystemException if a system exception occurred 433 */ 434 public static com.liferay.portal.model.ResourceBlockPermission fetchByPrimaryKey( 435 long resourceBlockPermissionId) 436 throws com.liferay.portal.kernel.exception.SystemException { 437 return getPersistence().fetchByPrimaryKey(resourceBlockPermissionId); 438 } 439 440 /** 441 * Returns all the resource block permissions. 442 * 443 * @return the resource block permissions 444 * @throws SystemException if a system exception occurred 445 */ 446 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll() 447 throws com.liferay.portal.kernel.exception.SystemException { 448 return getPersistence().findAll(); 449 } 450 451 /** 452 * Returns a range of all the resource block permissions. 453 * 454 * <p> 455 * 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.ResourceBlockPermissionModelImpl}. 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. 456 * </p> 457 * 458 * @param start the lower bound of the range of resource block permissions 459 * @param end the upper bound of the range of resource block permissions (not inclusive) 460 * @return the range of resource block permissions 461 * @throws SystemException if a system exception occurred 462 */ 463 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll( 464 int start, int end) 465 throws com.liferay.portal.kernel.exception.SystemException { 466 return getPersistence().findAll(start, end); 467 } 468 469 /** 470 * Returns an ordered range of all the resource block permissions. 471 * 472 * <p> 473 * 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.ResourceBlockPermissionModelImpl}. 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. 474 * </p> 475 * 476 * @param start the lower bound of the range of resource block permissions 477 * @param end the upper bound of the range of resource block permissions (not inclusive) 478 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 479 * @return the ordered range of resource block permissions 480 * @throws SystemException if a system exception occurred 481 */ 482 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll( 483 int start, int end, 484 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 485 throws com.liferay.portal.kernel.exception.SystemException { 486 return getPersistence().findAll(start, end, orderByComparator); 487 } 488 489 /** 490 * Removes all the resource block permissions from the database. 491 * 492 * @throws SystemException if a system exception occurred 493 */ 494 public static void removeAll() 495 throws com.liferay.portal.kernel.exception.SystemException { 496 getPersistence().removeAll(); 497 } 498 499 /** 500 * Returns the number of resource block permissions. 501 * 502 * @return the number of resource block permissions 503 * @throws SystemException if a system exception occurred 504 */ 505 public static int countAll() 506 throws com.liferay.portal.kernel.exception.SystemException { 507 return getPersistence().countAll(); 508 } 509 510 public static ResourceBlockPermissionPersistence getPersistence() { 511 if (_persistence == null) { 512 _persistence = (ResourceBlockPermissionPersistence)PortalBeanLocatorUtil.locate(ResourceBlockPermissionPersistence.class.getName()); 513 514 ReferenceRegistry.registerReference(ResourceBlockPermissionUtil.class, 515 "_persistence"); 516 } 517 518 return _persistence; 519 } 520 521 /** 522 * @deprecated As of 6.2.0 523 */ 524 public void setPersistence(ResourceBlockPermissionPersistence persistence) { 525 } 526 527 private static ResourceBlockPermissionPersistence _persistence; 528 }