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