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