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