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.ResourcePermission; 024 import com.liferay.portal.service.ServiceContext; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the resource permission service. This utility wraps {@link com.liferay.portal.service.persistence.impl.ResourcePermissionPersistenceImpl} 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 ResourcePermissionPersistence 037 * @see com.liferay.portal.service.persistence.impl.ResourcePermissionPersistenceImpl 038 * @generated 039 */ 040 @ProviderType 041 public class ResourcePermissionUtil { 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(ResourcePermission resourcePermission) { 059 getPersistence().clearCache(resourcePermission); 060 } 061 062 /** 063 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 064 */ 065 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<ResourcePermission> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<ResourcePermission> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) { 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<ResourcePermission> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator<ResourcePermission> orderByComparator) { 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) 098 */ 099 public static ResourcePermission update( 100 ResourcePermission resourcePermission) { 101 return getPersistence().update(resourcePermission); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static ResourcePermission update( 108 ResourcePermission resourcePermission, ServiceContext serviceContext) { 109 return getPersistence().update(resourcePermission, serviceContext); 110 } 111 112 /** 113 * Returns all the resource permissions where scope = ?. 114 * 115 * @param scope the scope 116 * @return the matching resource permissions 117 */ 118 public static List<ResourcePermission> findByScope(int scope) { 119 return getPersistence().findByScope(scope); 120 } 121 122 /** 123 * Returns a range of all the resource permissions where scope = ?. 124 * 125 * <p> 126 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 127 * </p> 128 * 129 * @param scope the scope 130 * @param start the lower bound of the range of resource permissions 131 * @param end the upper bound of the range of resource permissions (not inclusive) 132 * @return the range of matching resource permissions 133 */ 134 public static List<ResourcePermission> findByScope(int scope, int start, 135 int end) { 136 return getPersistence().findByScope(scope, start, end); 137 } 138 139 /** 140 * Returns an ordered range of all the resource permissions where scope = ?. 141 * 142 * <p> 143 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 144 * </p> 145 * 146 * @param scope the scope 147 * @param start the lower bound of the range of resource permissions 148 * @param end the upper bound of the range of resource permissions (not inclusive) 149 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 150 * @return the ordered range of matching resource permissions 151 */ 152 public static List<ResourcePermission> findByScope(int scope, int start, 153 int end, OrderByComparator<ResourcePermission> orderByComparator) { 154 return getPersistence().findByScope(scope, start, end, orderByComparator); 155 } 156 157 /** 158 * Returns the first resource permission in the ordered set where scope = ?. 159 * 160 * @param scope the scope 161 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 162 * @return the first matching resource permission 163 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 164 */ 165 public static ResourcePermission findByScope_First(int scope, 166 OrderByComparator<ResourcePermission> orderByComparator) 167 throws com.liferay.portal.NoSuchResourcePermissionException { 168 return getPersistence().findByScope_First(scope, orderByComparator); 169 } 170 171 /** 172 * Returns the first resource permission in the ordered set where scope = ?. 173 * 174 * @param scope the scope 175 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 176 * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found 177 */ 178 public static ResourcePermission fetchByScope_First(int scope, 179 OrderByComparator<ResourcePermission> orderByComparator) { 180 return getPersistence().fetchByScope_First(scope, orderByComparator); 181 } 182 183 /** 184 * Returns the last resource permission in the ordered set where scope = ?. 185 * 186 * @param scope the scope 187 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 188 * @return the last matching resource permission 189 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 190 */ 191 public static ResourcePermission findByScope_Last(int scope, 192 OrderByComparator<ResourcePermission> orderByComparator) 193 throws com.liferay.portal.NoSuchResourcePermissionException { 194 return getPersistence().findByScope_Last(scope, orderByComparator); 195 } 196 197 /** 198 * Returns the last resource permission in the ordered set where scope = ?. 199 * 200 * @param scope the scope 201 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 202 * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found 203 */ 204 public static ResourcePermission fetchByScope_Last(int scope, 205 OrderByComparator<ResourcePermission> orderByComparator) { 206 return getPersistence().fetchByScope_Last(scope, orderByComparator); 207 } 208 209 /** 210 * Returns the resource permissions before and after the current resource permission in the ordered set where scope = ?. 211 * 212 * @param resourcePermissionId the primary key of the current resource permission 213 * @param scope the scope 214 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 215 * @return the previous, current, and next resource permission 216 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 217 */ 218 public static ResourcePermission[] findByScope_PrevAndNext( 219 long resourcePermissionId, int scope, 220 OrderByComparator<ResourcePermission> orderByComparator) 221 throws com.liferay.portal.NoSuchResourcePermissionException { 222 return getPersistence() 223 .findByScope_PrevAndNext(resourcePermissionId, scope, 224 orderByComparator); 225 } 226 227 /** 228 * Returns all the resource permissions where scope = any ?. 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 232 * </p> 233 * 234 * @param scopes the scopes 235 * @return the matching resource permissions 236 */ 237 public static List<ResourcePermission> findByScope(int[] scopes) { 238 return getPersistence().findByScope(scopes); 239 } 240 241 /** 242 * Returns a range of all the resource permissions where scope = any ?. 243 * 244 * <p> 245 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 246 * </p> 247 * 248 * @param scopes the scopes 249 * @param start the lower bound of the range of resource permissions 250 * @param end the upper bound of the range of resource permissions (not inclusive) 251 * @return the range of matching resource permissions 252 */ 253 public static List<ResourcePermission> findByScope(int[] scopes, int start, 254 int end) { 255 return getPersistence().findByScope(scopes, start, end); 256 } 257 258 /** 259 * Returns an ordered range of all the resource permissions where scope = any ?. 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 263 * </p> 264 * 265 * @param scopes the scopes 266 * @param start the lower bound of the range of resource permissions 267 * @param end the upper bound of the range of resource permissions (not inclusive) 268 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 269 * @return the ordered range of matching resource permissions 270 */ 271 public static List<ResourcePermission> findByScope(int[] scopes, int start, 272 int end, OrderByComparator<ResourcePermission> orderByComparator) { 273 return getPersistence() 274 .findByScope(scopes, start, end, orderByComparator); 275 } 276 277 /** 278 * Removes all the resource permissions where scope = ? from the database. 279 * 280 * @param scope the scope 281 */ 282 public static void removeByScope(int scope) { 283 getPersistence().removeByScope(scope); 284 } 285 286 /** 287 * Returns the number of resource permissions where scope = ?. 288 * 289 * @param scope the scope 290 * @return the number of matching resource permissions 291 */ 292 public static int countByScope(int scope) { 293 return getPersistence().countByScope(scope); 294 } 295 296 /** 297 * Returns the number of resource permissions where scope = any ?. 298 * 299 * @param scopes the scopes 300 * @return the number of matching resource permissions 301 */ 302 public static int countByScope(int[] scopes) { 303 return getPersistence().countByScope(scopes); 304 } 305 306 /** 307 * Returns all the resource permissions where roleId = ?. 308 * 309 * @param roleId the role ID 310 * @return the matching resource permissions 311 */ 312 public static List<ResourcePermission> findByRoleId(long roleId) { 313 return getPersistence().findByRoleId(roleId); 314 } 315 316 /** 317 * Returns a range of all the resource permissions where roleId = ?. 318 * 319 * <p> 320 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 321 * </p> 322 * 323 * @param roleId the role ID 324 * @param start the lower bound of the range of resource permissions 325 * @param end the upper bound of the range of resource permissions (not inclusive) 326 * @return the range of matching resource permissions 327 */ 328 public static List<ResourcePermission> findByRoleId(long roleId, int start, 329 int end) { 330 return getPersistence().findByRoleId(roleId, start, end); 331 } 332 333 /** 334 * Returns an ordered range of all the resource permissions where roleId = ?. 335 * 336 * <p> 337 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 338 * </p> 339 * 340 * @param roleId the role ID 341 * @param start the lower bound of the range of resource permissions 342 * @param end the upper bound of the range of resource permissions (not inclusive) 343 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 344 * @return the ordered range of matching resource permissions 345 */ 346 public static List<ResourcePermission> findByRoleId(long roleId, int start, 347 int end, OrderByComparator<ResourcePermission> orderByComparator) { 348 return getPersistence() 349 .findByRoleId(roleId, start, end, orderByComparator); 350 } 351 352 /** 353 * Returns the first resource permission in the ordered set where roleId = ?. 354 * 355 * @param roleId the role ID 356 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 357 * @return the first matching resource permission 358 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 359 */ 360 public static ResourcePermission findByRoleId_First(long roleId, 361 OrderByComparator<ResourcePermission> orderByComparator) 362 throws com.liferay.portal.NoSuchResourcePermissionException { 363 return getPersistence().findByRoleId_First(roleId, orderByComparator); 364 } 365 366 /** 367 * Returns the first resource permission in the ordered set where roleId = ?. 368 * 369 * @param roleId the role ID 370 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 371 * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found 372 */ 373 public static ResourcePermission fetchByRoleId_First(long roleId, 374 OrderByComparator<ResourcePermission> orderByComparator) { 375 return getPersistence().fetchByRoleId_First(roleId, orderByComparator); 376 } 377 378 /** 379 * Returns the last resource permission in the ordered set where roleId = ?. 380 * 381 * @param roleId the role ID 382 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 383 * @return the last matching resource permission 384 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 385 */ 386 public static ResourcePermission findByRoleId_Last(long roleId, 387 OrderByComparator<ResourcePermission> orderByComparator) 388 throws com.liferay.portal.NoSuchResourcePermissionException { 389 return getPersistence().findByRoleId_Last(roleId, orderByComparator); 390 } 391 392 /** 393 * Returns the last resource permission in the ordered set where roleId = ?. 394 * 395 * @param roleId the role ID 396 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 397 * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found 398 */ 399 public static ResourcePermission fetchByRoleId_Last(long roleId, 400 OrderByComparator<ResourcePermission> orderByComparator) { 401 return getPersistence().fetchByRoleId_Last(roleId, orderByComparator); 402 } 403 404 /** 405 * Returns the resource permissions before and after the current resource permission in the ordered set where roleId = ?. 406 * 407 * @param resourcePermissionId the primary key of the current resource permission 408 * @param roleId the role ID 409 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 410 * @return the previous, current, and next resource permission 411 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 412 */ 413 public static ResourcePermission[] findByRoleId_PrevAndNext( 414 long resourcePermissionId, long roleId, 415 OrderByComparator<ResourcePermission> orderByComparator) 416 throws com.liferay.portal.NoSuchResourcePermissionException { 417 return getPersistence() 418 .findByRoleId_PrevAndNext(resourcePermissionId, roleId, 419 orderByComparator); 420 } 421 422 /** 423 * Removes all the resource permissions where roleId = ? from the database. 424 * 425 * @param roleId the role ID 426 */ 427 public static void removeByRoleId(long roleId) { 428 getPersistence().removeByRoleId(roleId); 429 } 430 431 /** 432 * Returns the number of resource permissions where roleId = ?. 433 * 434 * @param roleId the role ID 435 * @return the number of matching resource permissions 436 */ 437 public static int countByRoleId(long roleId) { 438 return getPersistence().countByRoleId(roleId); 439 } 440 441 /** 442 * Returns all the resource permissions where companyId = ? and primKey LIKE ?. 443 * 444 * @param companyId the company ID 445 * @param primKey the prim key 446 * @return the matching resource permissions 447 */ 448 public static List<ResourcePermission> findByC_LikeP(long companyId, 449 java.lang.String primKey) { 450 return getPersistence().findByC_LikeP(companyId, primKey); 451 } 452 453 /** 454 * Returns a range of all the resource permissions where companyId = ? and primKey LIKE ?. 455 * 456 * <p> 457 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 458 * </p> 459 * 460 * @param companyId the company ID 461 * @param primKey the prim key 462 * @param start the lower bound of the range of resource permissions 463 * @param end the upper bound of the range of resource permissions (not inclusive) 464 * @return the range of matching resource permissions 465 */ 466 public static List<ResourcePermission> findByC_LikeP(long companyId, 467 java.lang.String primKey, int start, int end) { 468 return getPersistence().findByC_LikeP(companyId, primKey, start, end); 469 } 470 471 /** 472 * Returns an ordered range of all the resource permissions where companyId = ? and primKey LIKE ?. 473 * 474 * <p> 475 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 476 * </p> 477 * 478 * @param companyId the company ID 479 * @param primKey the prim key 480 * @param start the lower bound of the range of resource permissions 481 * @param end the upper bound of the range of resource permissions (not inclusive) 482 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 483 * @return the ordered range of matching resource permissions 484 */ 485 public static List<ResourcePermission> findByC_LikeP(long companyId, 486 java.lang.String primKey, int start, int end, 487 OrderByComparator<ResourcePermission> orderByComparator) { 488 return getPersistence() 489 .findByC_LikeP(companyId, primKey, start, end, 490 orderByComparator); 491 } 492 493 /** 494 * Returns the first resource permission in the ordered set where companyId = ? and primKey LIKE ?. 495 * 496 * @param companyId the company ID 497 * @param primKey the prim key 498 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 499 * @return the first matching resource permission 500 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 501 */ 502 public static ResourcePermission findByC_LikeP_First(long companyId, 503 java.lang.String primKey, 504 OrderByComparator<ResourcePermission> orderByComparator) 505 throws com.liferay.portal.NoSuchResourcePermissionException { 506 return getPersistence() 507 .findByC_LikeP_First(companyId, primKey, orderByComparator); 508 } 509 510 /** 511 * Returns the first resource permission in the ordered set where companyId = ? and primKey LIKE ?. 512 * 513 * @param companyId the company ID 514 * @param primKey the prim key 515 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 516 * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found 517 */ 518 public static ResourcePermission fetchByC_LikeP_First(long companyId, 519 java.lang.String primKey, 520 OrderByComparator<ResourcePermission> orderByComparator) { 521 return getPersistence() 522 .fetchByC_LikeP_First(companyId, primKey, orderByComparator); 523 } 524 525 /** 526 * Returns the last resource permission in the ordered set where companyId = ? and primKey LIKE ?. 527 * 528 * @param companyId the company ID 529 * @param primKey the prim key 530 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 531 * @return the last matching resource permission 532 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 533 */ 534 public static ResourcePermission findByC_LikeP_Last(long companyId, 535 java.lang.String primKey, 536 OrderByComparator<ResourcePermission> orderByComparator) 537 throws com.liferay.portal.NoSuchResourcePermissionException { 538 return getPersistence() 539 .findByC_LikeP_Last(companyId, primKey, orderByComparator); 540 } 541 542 /** 543 * Returns the last resource permission in the ordered set where companyId = ? and primKey LIKE ?. 544 * 545 * @param companyId the company ID 546 * @param primKey the prim key 547 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 548 * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found 549 */ 550 public static ResourcePermission fetchByC_LikeP_Last(long companyId, 551 java.lang.String primKey, 552 OrderByComparator<ResourcePermission> orderByComparator) { 553 return getPersistence() 554 .fetchByC_LikeP_Last(companyId, primKey, orderByComparator); 555 } 556 557 /** 558 * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = ? and primKey LIKE ?. 559 * 560 * @param resourcePermissionId the primary key of the current resource permission 561 * @param companyId the company ID 562 * @param primKey the prim key 563 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 564 * @return the previous, current, and next resource permission 565 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 566 */ 567 public static ResourcePermission[] findByC_LikeP_PrevAndNext( 568 long resourcePermissionId, long companyId, java.lang.String primKey, 569 OrderByComparator<ResourcePermission> orderByComparator) 570 throws com.liferay.portal.NoSuchResourcePermissionException { 571 return getPersistence() 572 .findByC_LikeP_PrevAndNext(resourcePermissionId, companyId, 573 primKey, orderByComparator); 574 } 575 576 /** 577 * Removes all the resource permissions where companyId = ? and primKey LIKE ? from the database. 578 * 579 * @param companyId the company ID 580 * @param primKey the prim key 581 */ 582 public static void removeByC_LikeP(long companyId, java.lang.String primKey) { 583 getPersistence().removeByC_LikeP(companyId, primKey); 584 } 585 586 /** 587 * Returns the number of resource permissions where companyId = ? and primKey LIKE ?. 588 * 589 * @param companyId the company ID 590 * @param primKey the prim key 591 * @return the number of matching resource permissions 592 */ 593 public static int countByC_LikeP(long companyId, java.lang.String primKey) { 594 return getPersistence().countByC_LikeP(companyId, primKey); 595 } 596 597 /** 598 * Returns all the resource permissions where companyId = ? and name = ? and scope = ?. 599 * 600 * @param companyId the company ID 601 * @param name the name 602 * @param scope the scope 603 * @return the matching resource permissions 604 */ 605 public static List<ResourcePermission> findByC_N_S(long companyId, 606 java.lang.String name, int scope) { 607 return getPersistence().findByC_N_S(companyId, name, scope); 608 } 609 610 /** 611 * Returns a range of all the resource permissions where companyId = ? and name = ? and scope = ?. 612 * 613 * <p> 614 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 615 * </p> 616 * 617 * @param companyId the company ID 618 * @param name the name 619 * @param scope the scope 620 * @param start the lower bound of the range of resource permissions 621 * @param end the upper bound of the range of resource permissions (not inclusive) 622 * @return the range of matching resource permissions 623 */ 624 public static List<ResourcePermission> findByC_N_S(long companyId, 625 java.lang.String name, int scope, int start, int end) { 626 return getPersistence().findByC_N_S(companyId, name, scope, start, end); 627 } 628 629 /** 630 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ?. 631 * 632 * <p> 633 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 634 * </p> 635 * 636 * @param companyId the company ID 637 * @param name the name 638 * @param scope the scope 639 * @param start the lower bound of the range of resource permissions 640 * @param end the upper bound of the range of resource permissions (not inclusive) 641 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 642 * @return the ordered range of matching resource permissions 643 */ 644 public static List<ResourcePermission> findByC_N_S(long companyId, 645 java.lang.String name, int scope, int start, int end, 646 OrderByComparator<ResourcePermission> orderByComparator) { 647 return getPersistence() 648 .findByC_N_S(companyId, name, scope, start, end, 649 orderByComparator); 650 } 651 652 /** 653 * Returns the first resource permission in the ordered set where companyId = ? and name = ? and scope = ?. 654 * 655 * @param companyId the company ID 656 * @param name the name 657 * @param scope the scope 658 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 659 * @return the first matching resource permission 660 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 661 */ 662 public static ResourcePermission findByC_N_S_First(long companyId, 663 java.lang.String name, int scope, 664 OrderByComparator<ResourcePermission> orderByComparator) 665 throws com.liferay.portal.NoSuchResourcePermissionException { 666 return getPersistence() 667 .findByC_N_S_First(companyId, name, scope, orderByComparator); 668 } 669 670 /** 671 * Returns the first resource permission in the ordered set where companyId = ? and name = ? and scope = ?. 672 * 673 * @param companyId the company ID 674 * @param name the name 675 * @param scope the scope 676 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 677 * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found 678 */ 679 public static ResourcePermission fetchByC_N_S_First(long companyId, 680 java.lang.String name, int scope, 681 OrderByComparator<ResourcePermission> orderByComparator) { 682 return getPersistence() 683 .fetchByC_N_S_First(companyId, name, scope, orderByComparator); 684 } 685 686 /** 687 * Returns the last resource permission in the ordered set where companyId = ? and name = ? and scope = ?. 688 * 689 * @param companyId the company ID 690 * @param name the name 691 * @param scope the scope 692 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 693 * @return the last matching resource permission 694 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 695 */ 696 public static ResourcePermission findByC_N_S_Last(long companyId, 697 java.lang.String name, int scope, 698 OrderByComparator<ResourcePermission> orderByComparator) 699 throws com.liferay.portal.NoSuchResourcePermissionException { 700 return getPersistence() 701 .findByC_N_S_Last(companyId, name, scope, orderByComparator); 702 } 703 704 /** 705 * Returns the last resource permission in the ordered set where companyId = ? and name = ? and scope = ?. 706 * 707 * @param companyId the company ID 708 * @param name the name 709 * @param scope the scope 710 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 711 * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found 712 */ 713 public static ResourcePermission fetchByC_N_S_Last(long companyId, 714 java.lang.String name, int scope, 715 OrderByComparator<ResourcePermission> orderByComparator) { 716 return getPersistence() 717 .fetchByC_N_S_Last(companyId, name, scope, orderByComparator); 718 } 719 720 /** 721 * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = ? and name = ? and scope = ?. 722 * 723 * @param resourcePermissionId the primary key of the current resource permission 724 * @param companyId the company ID 725 * @param name the name 726 * @param scope the scope 727 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 728 * @return the previous, current, and next resource permission 729 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 730 */ 731 public static ResourcePermission[] findByC_N_S_PrevAndNext( 732 long resourcePermissionId, long companyId, java.lang.String name, 733 int scope, OrderByComparator<ResourcePermission> orderByComparator) 734 throws com.liferay.portal.NoSuchResourcePermissionException { 735 return getPersistence() 736 .findByC_N_S_PrevAndNext(resourcePermissionId, companyId, 737 name, scope, orderByComparator); 738 } 739 740 /** 741 * Removes all the resource permissions where companyId = ? and name = ? and scope = ? from the database. 742 * 743 * @param companyId the company ID 744 * @param name the name 745 * @param scope the scope 746 */ 747 public static void removeByC_N_S(long companyId, java.lang.String name, 748 int scope) { 749 getPersistence().removeByC_N_S(companyId, name, scope); 750 } 751 752 /** 753 * Returns the number of resource permissions where companyId = ? and name = ? and scope = ?. 754 * 755 * @param companyId the company ID 756 * @param name the name 757 * @param scope the scope 758 * @return the number of matching resource permissions 759 */ 760 public static int countByC_N_S(long companyId, java.lang.String name, 761 int scope) { 762 return getPersistence().countByC_N_S(companyId, name, scope); 763 } 764 765 /** 766 * Returns all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ?. 767 * 768 * @param companyId the company ID 769 * @param name the name 770 * @param scope the scope 771 * @param primKey the prim key 772 * @return the matching resource permissions 773 */ 774 public static List<ResourcePermission> findByC_N_S_P(long companyId, 775 java.lang.String name, int scope, java.lang.String primKey) { 776 return getPersistence().findByC_N_S_P(companyId, name, scope, primKey); 777 } 778 779 /** 780 * Returns a range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ?. 781 * 782 * <p> 783 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 784 * </p> 785 * 786 * @param companyId the company ID 787 * @param name the name 788 * @param scope the scope 789 * @param primKey the prim key 790 * @param start the lower bound of the range of resource permissions 791 * @param end the upper bound of the range of resource permissions (not inclusive) 792 * @return the range of matching resource permissions 793 */ 794 public static List<ResourcePermission> findByC_N_S_P(long companyId, 795 java.lang.String name, int scope, java.lang.String primKey, int start, 796 int end) { 797 return getPersistence() 798 .findByC_N_S_P(companyId, name, scope, primKey, start, end); 799 } 800 801 /** 802 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ?. 803 * 804 * <p> 805 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 806 * </p> 807 * 808 * @param companyId the company ID 809 * @param name the name 810 * @param scope the scope 811 * @param primKey the prim key 812 * @param start the lower bound of the range of resource permissions 813 * @param end the upper bound of the range of resource permissions (not inclusive) 814 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 815 * @return the ordered range of matching resource permissions 816 */ 817 public static List<ResourcePermission> findByC_N_S_P(long companyId, 818 java.lang.String name, int scope, java.lang.String primKey, int start, 819 int end, OrderByComparator<ResourcePermission> orderByComparator) { 820 return getPersistence() 821 .findByC_N_S_P(companyId, name, scope, primKey, start, end, 822 orderByComparator); 823 } 824 825 /** 826 * Returns the first resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKey = ?. 827 * 828 * @param companyId the company ID 829 * @param name the name 830 * @param scope the scope 831 * @param primKey the prim key 832 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 833 * @return the first matching resource permission 834 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 835 */ 836 public static ResourcePermission findByC_N_S_P_First(long companyId, 837 java.lang.String name, int scope, java.lang.String primKey, 838 OrderByComparator<ResourcePermission> orderByComparator) 839 throws com.liferay.portal.NoSuchResourcePermissionException { 840 return getPersistence() 841 .findByC_N_S_P_First(companyId, name, scope, primKey, 842 orderByComparator); 843 } 844 845 /** 846 * Returns the first resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKey = ?. 847 * 848 * @param companyId the company ID 849 * @param name the name 850 * @param scope the scope 851 * @param primKey the prim key 852 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 853 * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found 854 */ 855 public static ResourcePermission fetchByC_N_S_P_First(long companyId, 856 java.lang.String name, int scope, java.lang.String primKey, 857 OrderByComparator<ResourcePermission> orderByComparator) { 858 return getPersistence() 859 .fetchByC_N_S_P_First(companyId, name, scope, primKey, 860 orderByComparator); 861 } 862 863 /** 864 * Returns the last resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKey = ?. 865 * 866 * @param companyId the company ID 867 * @param name the name 868 * @param scope the scope 869 * @param primKey the prim key 870 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 871 * @return the last matching resource permission 872 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 873 */ 874 public static ResourcePermission findByC_N_S_P_Last(long companyId, 875 java.lang.String name, int scope, java.lang.String primKey, 876 OrderByComparator<ResourcePermission> orderByComparator) 877 throws com.liferay.portal.NoSuchResourcePermissionException { 878 return getPersistence() 879 .findByC_N_S_P_Last(companyId, name, scope, primKey, 880 orderByComparator); 881 } 882 883 /** 884 * Returns the last resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKey = ?. 885 * 886 * @param companyId the company ID 887 * @param name the name 888 * @param scope the scope 889 * @param primKey the prim key 890 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 891 * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found 892 */ 893 public static ResourcePermission fetchByC_N_S_P_Last(long companyId, 894 java.lang.String name, int scope, java.lang.String primKey, 895 OrderByComparator<ResourcePermission> orderByComparator) { 896 return getPersistence() 897 .fetchByC_N_S_P_Last(companyId, name, scope, primKey, 898 orderByComparator); 899 } 900 901 /** 902 * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKey = ?. 903 * 904 * @param resourcePermissionId the primary key of the current resource permission 905 * @param companyId the company ID 906 * @param name the name 907 * @param scope the scope 908 * @param primKey the prim key 909 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 910 * @return the previous, current, and next resource permission 911 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 912 */ 913 public static ResourcePermission[] findByC_N_S_P_PrevAndNext( 914 long resourcePermissionId, long companyId, java.lang.String name, 915 int scope, java.lang.String primKey, 916 OrderByComparator<ResourcePermission> orderByComparator) 917 throws com.liferay.portal.NoSuchResourcePermissionException { 918 return getPersistence() 919 .findByC_N_S_P_PrevAndNext(resourcePermissionId, companyId, 920 name, scope, primKey, orderByComparator); 921 } 922 923 /** 924 * Removes all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? from the database. 925 * 926 * @param companyId the company ID 927 * @param name the name 928 * @param scope the scope 929 * @param primKey the prim key 930 */ 931 public static void removeByC_N_S_P(long companyId, java.lang.String name, 932 int scope, java.lang.String primKey) { 933 getPersistence().removeByC_N_S_P(companyId, name, scope, primKey); 934 } 935 936 /** 937 * Returns the number of resource permissions where companyId = ? and name = ? and scope = ? and primKey = ?. 938 * 939 * @param companyId the company ID 940 * @param name the name 941 * @param scope the scope 942 * @param primKey the prim key 943 * @return the number of matching resource permissions 944 */ 945 public static int countByC_N_S_P(long companyId, java.lang.String name, 946 int scope, java.lang.String primKey) { 947 return getPersistence().countByC_N_S_P(companyId, name, scope, primKey); 948 } 949 950 /** 951 * Returns all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = any ?. 952 * 953 * <p> 954 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 955 * </p> 956 * 957 * @param companyId the company ID 958 * @param name the name 959 * @param scope the scope 960 * @param primKey the prim key 961 * @param roleIds the role IDs 962 * @return the matching resource permissions 963 */ 964 public static List<ResourcePermission> findByC_N_S_P_R(long companyId, 965 java.lang.String name, int scope, java.lang.String primKey, 966 long[] roleIds) { 967 return getPersistence() 968 .findByC_N_S_P_R(companyId, name, scope, primKey, roleIds); 969 } 970 971 /** 972 * Returns a range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = any ?. 973 * 974 * <p> 975 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 976 * </p> 977 * 978 * @param companyId the company ID 979 * @param name the name 980 * @param scope the scope 981 * @param primKey the prim key 982 * @param roleIds the role IDs 983 * @param start the lower bound of the range of resource permissions 984 * @param end the upper bound of the range of resource permissions (not inclusive) 985 * @return the range of matching resource permissions 986 */ 987 public static List<ResourcePermission> findByC_N_S_P_R(long companyId, 988 java.lang.String name, int scope, java.lang.String primKey, 989 long[] roleIds, int start, int end) { 990 return getPersistence() 991 .findByC_N_S_P_R(companyId, name, scope, primKey, roleIds, 992 start, end); 993 } 994 995 /** 996 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = any ?. 997 * 998 * <p> 999 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 1000 * </p> 1001 * 1002 * @param companyId the company ID 1003 * @param name the name 1004 * @param scope the scope 1005 * @param primKey the prim key 1006 * @param roleIds the role IDs 1007 * @param start the lower bound of the range of resource permissions 1008 * @param end the upper bound of the range of resource permissions (not inclusive) 1009 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1010 * @return the ordered range of matching resource permissions 1011 */ 1012 public static List<ResourcePermission> findByC_N_S_P_R(long companyId, 1013 java.lang.String name, int scope, java.lang.String primKey, 1014 long[] roleIds, int start, int end, 1015 OrderByComparator<ResourcePermission> orderByComparator) { 1016 return getPersistence() 1017 .findByC_N_S_P_R(companyId, name, scope, primKey, roleIds, 1018 start, end, orderByComparator); 1019 } 1020 1021 /** 1022 * Returns the resource permission where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = ? or throws a {@link NoSuchResourcePermissionException} if it could not be found. 1023 * 1024 * @param companyId the company ID 1025 * @param name the name 1026 * @param scope the scope 1027 * @param primKey the prim key 1028 * @param roleId the role ID 1029 * @return the matching resource permission 1030 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 1031 */ 1032 public static ResourcePermission findByC_N_S_P_R(long companyId, 1033 java.lang.String name, int scope, java.lang.String primKey, long roleId) 1034 throws com.liferay.portal.NoSuchResourcePermissionException { 1035 return getPersistence() 1036 .findByC_N_S_P_R(companyId, name, scope, primKey, roleId); 1037 } 1038 1039 /** 1040 * Returns the resource permission where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 1041 * 1042 * @param companyId the company ID 1043 * @param name the name 1044 * @param scope the scope 1045 * @param primKey the prim key 1046 * @param roleId the role ID 1047 * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found 1048 */ 1049 public static ResourcePermission fetchByC_N_S_P_R(long companyId, 1050 java.lang.String name, int scope, java.lang.String primKey, long roleId) { 1051 return getPersistence() 1052 .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId); 1053 } 1054 1055 /** 1056 * Returns the resource permission where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 1057 * 1058 * @param companyId the company ID 1059 * @param name the name 1060 * @param scope the scope 1061 * @param primKey the prim key 1062 * @param roleId the role ID 1063 * @param retrieveFromCache whether to use the finder cache 1064 * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found 1065 */ 1066 public static ResourcePermission fetchByC_N_S_P_R(long companyId, 1067 java.lang.String name, int scope, java.lang.String primKey, 1068 long roleId, boolean retrieveFromCache) { 1069 return getPersistence() 1070 .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId, 1071 retrieveFromCache); 1072 } 1073 1074 /** 1075 * Removes the resource permission where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = ? from the database. 1076 * 1077 * @param companyId the company ID 1078 * @param name the name 1079 * @param scope the scope 1080 * @param primKey the prim key 1081 * @param roleId the role ID 1082 * @return the resource permission that was removed 1083 */ 1084 public static ResourcePermission removeByC_N_S_P_R(long companyId, 1085 java.lang.String name, int scope, java.lang.String primKey, long roleId) 1086 throws com.liferay.portal.NoSuchResourcePermissionException { 1087 return getPersistence() 1088 .removeByC_N_S_P_R(companyId, name, scope, primKey, roleId); 1089 } 1090 1091 /** 1092 * Returns the number of resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = ?. 1093 * 1094 * @param companyId the company ID 1095 * @param name the name 1096 * @param scope the scope 1097 * @param primKey the prim key 1098 * @param roleId the role ID 1099 * @return the number of matching resource permissions 1100 */ 1101 public static int countByC_N_S_P_R(long companyId, java.lang.String name, 1102 int scope, java.lang.String primKey, long roleId) { 1103 return getPersistence() 1104 .countByC_N_S_P_R(companyId, name, scope, primKey, roleId); 1105 } 1106 1107 /** 1108 * Returns the number of resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = any ?. 1109 * 1110 * @param companyId the company ID 1111 * @param name the name 1112 * @param scope the scope 1113 * @param primKey the prim key 1114 * @param roleIds the role IDs 1115 * @return the number of matching resource permissions 1116 */ 1117 public static int countByC_N_S_P_R(long companyId, java.lang.String name, 1118 int scope, java.lang.String primKey, long[] roleIds) { 1119 return getPersistence() 1120 .countByC_N_S_P_R(companyId, name, scope, primKey, roleIds); 1121 } 1122 1123 /** 1124 * Caches the resource permission in the entity cache if it is enabled. 1125 * 1126 * @param resourcePermission the resource permission 1127 */ 1128 public static void cacheResult(ResourcePermission resourcePermission) { 1129 getPersistence().cacheResult(resourcePermission); 1130 } 1131 1132 /** 1133 * Caches the resource permissions in the entity cache if it is enabled. 1134 * 1135 * @param resourcePermissions the resource permissions 1136 */ 1137 public static void cacheResult(List<ResourcePermission> resourcePermissions) { 1138 getPersistence().cacheResult(resourcePermissions); 1139 } 1140 1141 /** 1142 * Creates a new resource permission with the primary key. Does not add the resource permission to the database. 1143 * 1144 * @param resourcePermissionId the primary key for the new resource permission 1145 * @return the new resource permission 1146 */ 1147 public static ResourcePermission create(long resourcePermissionId) { 1148 return getPersistence().create(resourcePermissionId); 1149 } 1150 1151 /** 1152 * Removes the resource permission with the primary key from the database. Also notifies the appropriate model listeners. 1153 * 1154 * @param resourcePermissionId the primary key of the resource permission 1155 * @return the resource permission that was removed 1156 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 1157 */ 1158 public static ResourcePermission remove(long resourcePermissionId) 1159 throws com.liferay.portal.NoSuchResourcePermissionException { 1160 return getPersistence().remove(resourcePermissionId); 1161 } 1162 1163 public static ResourcePermission updateImpl( 1164 ResourcePermission resourcePermission) { 1165 return getPersistence().updateImpl(resourcePermission); 1166 } 1167 1168 /** 1169 * Returns the resource permission with the primary key or throws a {@link NoSuchResourcePermissionException} if it could not be found. 1170 * 1171 * @param resourcePermissionId the primary key of the resource permission 1172 * @return the resource permission 1173 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 1174 */ 1175 public static ResourcePermission findByPrimaryKey(long resourcePermissionId) 1176 throws com.liferay.portal.NoSuchResourcePermissionException { 1177 return getPersistence().findByPrimaryKey(resourcePermissionId); 1178 } 1179 1180 /** 1181 * Returns the resource permission with the primary key or returns <code>null</code> if it could not be found. 1182 * 1183 * @param resourcePermissionId the primary key of the resource permission 1184 * @return the resource permission, or <code>null</code> if a resource permission with the primary key could not be found 1185 */ 1186 public static ResourcePermission fetchByPrimaryKey( 1187 long resourcePermissionId) { 1188 return getPersistence().fetchByPrimaryKey(resourcePermissionId); 1189 } 1190 1191 public static java.util.Map<java.io.Serializable, ResourcePermission> fetchByPrimaryKeys( 1192 java.util.Set<java.io.Serializable> primaryKeys) { 1193 return getPersistence().fetchByPrimaryKeys(primaryKeys); 1194 } 1195 1196 /** 1197 * Returns all the resource permissions. 1198 * 1199 * @return the resource permissions 1200 */ 1201 public static List<ResourcePermission> findAll() { 1202 return getPersistence().findAll(); 1203 } 1204 1205 /** 1206 * Returns a range of all the resource permissions. 1207 * 1208 * <p> 1209 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 1210 * </p> 1211 * 1212 * @param start the lower bound of the range of resource permissions 1213 * @param end the upper bound of the range of resource permissions (not inclusive) 1214 * @return the range of resource permissions 1215 */ 1216 public static List<ResourcePermission> findAll(int start, int end) { 1217 return getPersistence().findAll(start, end); 1218 } 1219 1220 /** 1221 * Returns an ordered range of all the resource permissions. 1222 * 1223 * <p> 1224 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. 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. 1225 * </p> 1226 * 1227 * @param start the lower bound of the range of resource permissions 1228 * @param end the upper bound of the range of resource permissions (not inclusive) 1229 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1230 * @return the ordered range of resource permissions 1231 */ 1232 public static List<ResourcePermission> findAll(int start, int end, 1233 OrderByComparator<ResourcePermission> orderByComparator) { 1234 return getPersistence().findAll(start, end, orderByComparator); 1235 } 1236 1237 /** 1238 * Removes all the resource permissions from the database. 1239 */ 1240 public static void removeAll() { 1241 getPersistence().removeAll(); 1242 } 1243 1244 /** 1245 * Returns the number of resource permissions. 1246 * 1247 * @return the number of resource permissions 1248 */ 1249 public static int countAll() { 1250 return getPersistence().countAll(); 1251 } 1252 1253 public static ResourcePermissionPersistence getPersistence() { 1254 if (_persistence == null) { 1255 _persistence = (ResourcePermissionPersistence)PortalBeanLocatorUtil.locate(ResourcePermissionPersistence.class.getName()); 1256 1257 ReferenceRegistry.registerReference(ResourcePermissionUtil.class, 1258 "_persistence"); 1259 } 1260 1261 return _persistence; 1262 } 1263 1264 /** 1265 * @deprecated As of 6.2.0 1266 */ 1267 @Deprecated 1268 public void setPersistence(ResourcePermissionPersistence persistence) { 1269 } 1270 1271 private static ResourcePermissionPersistence _persistence; 1272 }