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