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 static 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 all the resource block permissions where roleId = ?. 288 * 289 * @param roleId the role ID 290 * @return the matching resource block permissions 291 * @throws SystemException if a system exception occurred 292 */ 293 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByRoleId( 294 long roleId) throws com.liferay.portal.kernel.exception.SystemException { 295 return getPersistence().findByRoleId(roleId); 296 } 297 298 /** 299 * Returns a range of all the resource block permissions where roleId = ?. 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 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. 303 * </p> 304 * 305 * @param roleId the role ID 306 * @param start the lower bound of the range of resource block permissions 307 * @param end the upper bound of the range of resource block permissions (not inclusive) 308 * @return the range of matching resource block permissions 309 * @throws SystemException if a system exception occurred 310 */ 311 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByRoleId( 312 long roleId, int start, int end) 313 throws com.liferay.portal.kernel.exception.SystemException { 314 return getPersistence().findByRoleId(roleId, start, end); 315 } 316 317 /** 318 * Returns an ordered range of all the resource block permissions where roleId = ?. 319 * 320 * <p> 321 * 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. 322 * </p> 323 * 324 * @param roleId the role ID 325 * @param start the lower bound of the range of resource block permissions 326 * @param end the upper bound of the range of resource block permissions (not inclusive) 327 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 328 * @return the ordered range of matching resource block permissions 329 * @throws SystemException if a system exception occurred 330 */ 331 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByRoleId( 332 long roleId, int start, int end, 333 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 334 throws com.liferay.portal.kernel.exception.SystemException { 335 return getPersistence() 336 .findByRoleId(roleId, start, end, orderByComparator); 337 } 338 339 /** 340 * Returns the first resource block permission in the ordered set where roleId = ?. 341 * 342 * @param roleId the role ID 343 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 344 * @return the first matching resource block permission 345 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 346 * @throws SystemException if a system exception occurred 347 */ 348 public static com.liferay.portal.model.ResourceBlockPermission findByRoleId_First( 349 long roleId, 350 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 351 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 352 com.liferay.portal.kernel.exception.SystemException { 353 return getPersistence().findByRoleId_First(roleId, orderByComparator); 354 } 355 356 /** 357 * Returns the first resource block permission in the ordered set where roleId = ?. 358 * 359 * @param roleId the role ID 360 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 361 * @return the first matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 362 * @throws SystemException if a system exception occurred 363 */ 364 public static com.liferay.portal.model.ResourceBlockPermission fetchByRoleId_First( 365 long roleId, 366 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 367 throws com.liferay.portal.kernel.exception.SystemException { 368 return getPersistence().fetchByRoleId_First(roleId, orderByComparator); 369 } 370 371 /** 372 * Returns the last resource block permission in the ordered set where roleId = ?. 373 * 374 * @param roleId the role ID 375 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 376 * @return the last matching resource block permission 377 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 378 * @throws SystemException if a system exception occurred 379 */ 380 public static com.liferay.portal.model.ResourceBlockPermission findByRoleId_Last( 381 long roleId, 382 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 383 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 384 com.liferay.portal.kernel.exception.SystemException { 385 return getPersistence().findByRoleId_Last(roleId, orderByComparator); 386 } 387 388 /** 389 * Returns the last resource block permission in the ordered set where roleId = ?. 390 * 391 * @param roleId the role ID 392 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 393 * @return the last matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 394 * @throws SystemException if a system exception occurred 395 */ 396 public static com.liferay.portal.model.ResourceBlockPermission fetchByRoleId_Last( 397 long roleId, 398 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 399 throws com.liferay.portal.kernel.exception.SystemException { 400 return getPersistence().fetchByRoleId_Last(roleId, orderByComparator); 401 } 402 403 /** 404 * Returns the resource block permissions before and after the current resource block permission in the ordered set where roleId = ?. 405 * 406 * @param resourceBlockPermissionId the primary key of the current resource block permission 407 * @param roleId the role ID 408 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 409 * @return the previous, current, and next resource block permission 410 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 411 * @throws SystemException if a system exception occurred 412 */ 413 public static com.liferay.portal.model.ResourceBlockPermission[] findByRoleId_PrevAndNext( 414 long resourceBlockPermissionId, long roleId, 415 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 416 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 417 com.liferay.portal.kernel.exception.SystemException { 418 return getPersistence() 419 .findByRoleId_PrevAndNext(resourceBlockPermissionId, roleId, 420 orderByComparator); 421 } 422 423 /** 424 * Removes all the resource block permissions where roleId = ? from the database. 425 * 426 * @param roleId the role ID 427 * @throws SystemException if a system exception occurred 428 */ 429 public static void removeByRoleId(long roleId) 430 throws com.liferay.portal.kernel.exception.SystemException { 431 getPersistence().removeByRoleId(roleId); 432 } 433 434 /** 435 * Returns the number of resource block permissions where roleId = ?. 436 * 437 * @param roleId the role ID 438 * @return the number of matching resource block permissions 439 * @throws SystemException if a system exception occurred 440 */ 441 public static int countByRoleId(long roleId) 442 throws com.liferay.portal.kernel.exception.SystemException { 443 return getPersistence().countByRoleId(roleId); 444 } 445 446 /** 447 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found. 448 * 449 * @param resourceBlockId the resource block ID 450 * @param roleId the role ID 451 * @return the matching resource block permission 452 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found 453 * @throws SystemException if a system exception occurred 454 */ 455 public static com.liferay.portal.model.ResourceBlockPermission findByR_R( 456 long resourceBlockId, long roleId) 457 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 458 com.liferay.portal.kernel.exception.SystemException { 459 return getPersistence().findByR_R(resourceBlockId, roleId); 460 } 461 462 /** 463 * Returns the resource block permission where resourceBlockId = ? and roleId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 464 * 465 * @param resourceBlockId the resource block ID 466 * @param roleId the role ID 467 * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 468 * @throws SystemException if a system exception occurred 469 */ 470 public static com.liferay.portal.model.ResourceBlockPermission fetchByR_R( 471 long resourceBlockId, long roleId) 472 throws com.liferay.portal.kernel.exception.SystemException { 473 return getPersistence().fetchByR_R(resourceBlockId, roleId); 474 } 475 476 /** 477 * 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. 478 * 479 * @param resourceBlockId the resource block ID 480 * @param roleId the role ID 481 * @param retrieveFromCache whether to use the finder cache 482 * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found 483 * @throws SystemException if a system exception occurred 484 */ 485 public static com.liferay.portal.model.ResourceBlockPermission fetchByR_R( 486 long resourceBlockId, long roleId, boolean retrieveFromCache) 487 throws com.liferay.portal.kernel.exception.SystemException { 488 return getPersistence() 489 .fetchByR_R(resourceBlockId, roleId, retrieveFromCache); 490 } 491 492 /** 493 * Removes the resource block permission where resourceBlockId = ? and roleId = ? from the database. 494 * 495 * @param resourceBlockId the resource block ID 496 * @param roleId the role ID 497 * @return the resource block permission that was removed 498 * @throws SystemException if a system exception occurred 499 */ 500 public static com.liferay.portal.model.ResourceBlockPermission removeByR_R( 501 long resourceBlockId, long roleId) 502 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 503 com.liferay.portal.kernel.exception.SystemException { 504 return getPersistence().removeByR_R(resourceBlockId, roleId); 505 } 506 507 /** 508 * Returns the number of resource block permissions where resourceBlockId = ? and roleId = ?. 509 * 510 * @param resourceBlockId the resource block ID 511 * @param roleId the role ID 512 * @return the number of matching resource block permissions 513 * @throws SystemException if a system exception occurred 514 */ 515 public static int countByR_R(long resourceBlockId, long roleId) 516 throws com.liferay.portal.kernel.exception.SystemException { 517 return getPersistence().countByR_R(resourceBlockId, roleId); 518 } 519 520 /** 521 * Caches the resource block permission in the entity cache if it is enabled. 522 * 523 * @param resourceBlockPermission the resource block permission 524 */ 525 public static void cacheResult( 526 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission) { 527 getPersistence().cacheResult(resourceBlockPermission); 528 } 529 530 /** 531 * Caches the resource block permissions in the entity cache if it is enabled. 532 * 533 * @param resourceBlockPermissions the resource block permissions 534 */ 535 public static void cacheResult( 536 java.util.List<com.liferay.portal.model.ResourceBlockPermission> resourceBlockPermissions) { 537 getPersistence().cacheResult(resourceBlockPermissions); 538 } 539 540 /** 541 * Creates a new resource block permission with the primary key. Does not add the resource block permission to the database. 542 * 543 * @param resourceBlockPermissionId the primary key for the new resource block permission 544 * @return the new resource block permission 545 */ 546 public static com.liferay.portal.model.ResourceBlockPermission create( 547 long resourceBlockPermissionId) { 548 return getPersistence().create(resourceBlockPermissionId); 549 } 550 551 /** 552 * Removes the resource block permission with the primary key from the database. Also notifies the appropriate model listeners. 553 * 554 * @param resourceBlockPermissionId the primary key of the resource block permission 555 * @return the resource block permission that was removed 556 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 557 * @throws SystemException if a system exception occurred 558 */ 559 public static com.liferay.portal.model.ResourceBlockPermission remove( 560 long resourceBlockPermissionId) 561 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 562 com.liferay.portal.kernel.exception.SystemException { 563 return getPersistence().remove(resourceBlockPermissionId); 564 } 565 566 public static com.liferay.portal.model.ResourceBlockPermission updateImpl( 567 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission) 568 throws com.liferay.portal.kernel.exception.SystemException { 569 return getPersistence().updateImpl(resourceBlockPermission); 570 } 571 572 /** 573 * Returns the resource block permission with the primary key or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found. 574 * 575 * @param resourceBlockPermissionId the primary key of the resource block permission 576 * @return the resource block permission 577 * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found 578 * @throws SystemException if a system exception occurred 579 */ 580 public static com.liferay.portal.model.ResourceBlockPermission findByPrimaryKey( 581 long resourceBlockPermissionId) 582 throws com.liferay.portal.NoSuchResourceBlockPermissionException, 583 com.liferay.portal.kernel.exception.SystemException { 584 return getPersistence().findByPrimaryKey(resourceBlockPermissionId); 585 } 586 587 /** 588 * Returns the resource block permission with the primary key or returns <code>null</code> if it could not be found. 589 * 590 * @param resourceBlockPermissionId the primary key of the resource block permission 591 * @return the resource block permission, or <code>null</code> if a resource block permission with the primary key could not be found 592 * @throws SystemException if a system exception occurred 593 */ 594 public static com.liferay.portal.model.ResourceBlockPermission fetchByPrimaryKey( 595 long resourceBlockPermissionId) 596 throws com.liferay.portal.kernel.exception.SystemException { 597 return getPersistence().fetchByPrimaryKey(resourceBlockPermissionId); 598 } 599 600 /** 601 * Returns all the resource block permissions. 602 * 603 * @return the resource block permissions 604 * @throws SystemException if a system exception occurred 605 */ 606 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll() 607 throws com.liferay.portal.kernel.exception.SystemException { 608 return getPersistence().findAll(); 609 } 610 611 /** 612 * Returns a range of all the resource block permissions. 613 * 614 * <p> 615 * 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. 616 * </p> 617 * 618 * @param start the lower bound of the range of resource block permissions 619 * @param end the upper bound of the range of resource block permissions (not inclusive) 620 * @return the range of resource block permissions 621 * @throws SystemException if a system exception occurred 622 */ 623 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll( 624 int start, int end) 625 throws com.liferay.portal.kernel.exception.SystemException { 626 return getPersistence().findAll(start, end); 627 } 628 629 /** 630 * Returns an ordered range of all the resource block permissions. 631 * 632 * <p> 633 * 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. 634 * </p> 635 * 636 * @param start the lower bound of the range of resource block permissions 637 * @param end the upper bound of the range of resource block permissions (not inclusive) 638 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 639 * @return the ordered range of resource block permissions 640 * @throws SystemException if a system exception occurred 641 */ 642 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll( 643 int start, int end, 644 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 645 throws com.liferay.portal.kernel.exception.SystemException { 646 return getPersistence().findAll(start, end, orderByComparator); 647 } 648 649 /** 650 * Removes all the resource block permissions from the database. 651 * 652 * @throws SystemException if a system exception occurred 653 */ 654 public static void removeAll() 655 throws com.liferay.portal.kernel.exception.SystemException { 656 getPersistence().removeAll(); 657 } 658 659 /** 660 * Returns the number of resource block permissions. 661 * 662 * @return the number of resource block permissions 663 * @throws SystemException if a system exception occurred 664 */ 665 public static int countAll() 666 throws com.liferay.portal.kernel.exception.SystemException { 667 return getPersistence().countAll(); 668 } 669 670 public static ResourceBlockPermissionPersistence getPersistence() { 671 if (_persistence == null) { 672 _persistence = (ResourceBlockPermissionPersistence)PortalBeanLocatorUtil.locate(ResourceBlockPermissionPersistence.class.getName()); 673 674 ReferenceRegistry.registerReference(ResourceBlockPermissionUtil.class, 675 "_persistence"); 676 } 677 678 return _persistence; 679 } 680 681 /** 682 * @deprecated As of 6.2.0 683 */ 684 public void setPersistence(ResourceBlockPermissionPersistence persistence) { 685 } 686 687 private static ResourceBlockPermissionPersistence _persistence; 688 }