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 an ordered range of all the resource permissions where scope = ?. 159 * 160 * <p> 161 * 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. 162 * </p> 163 * 164 * @param scope the scope 165 * @param start the lower bound of the range of resource permissions 166 * @param end the upper bound of the range of resource permissions (not inclusive) 167 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 168 * @param retrieveFromCache whether to retrieve from the finder cache 169 * @return the ordered range of matching resource permissions 170 */ 171 public static List<ResourcePermission> findByScope(int scope, int start, 172 int end, OrderByComparator<ResourcePermission> orderByComparator, 173 boolean retrieveFromCache) { 174 return getPersistence() 175 .findByScope(scope, start, end, orderByComparator, 176 retrieveFromCache); 177 } 178 179 /** 180 * Returns the first resource permission in the ordered set where scope = ?. 181 * 182 * @param scope the scope 183 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 184 * @return the first matching resource permission 185 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 186 */ 187 public static ResourcePermission findByScope_First(int scope, 188 OrderByComparator<ResourcePermission> orderByComparator) 189 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 190 return getPersistence().findByScope_First(scope, orderByComparator); 191 } 192 193 /** 194 * Returns the first resource permission in the ordered set where scope = ?. 195 * 196 * @param scope the scope 197 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 198 * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found 199 */ 200 public static ResourcePermission fetchByScope_First(int scope, 201 OrderByComparator<ResourcePermission> orderByComparator) { 202 return getPersistence().fetchByScope_First(scope, orderByComparator); 203 } 204 205 /** 206 * Returns the last resource permission in the ordered set where scope = ?. 207 * 208 * @param scope the scope 209 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 210 * @return the last matching resource permission 211 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 212 */ 213 public static ResourcePermission findByScope_Last(int scope, 214 OrderByComparator<ResourcePermission> orderByComparator) 215 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 216 return getPersistence().findByScope_Last(scope, orderByComparator); 217 } 218 219 /** 220 * Returns the last resource permission in the ordered set where scope = ?. 221 * 222 * @param scope the scope 223 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 224 * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found 225 */ 226 public static ResourcePermission fetchByScope_Last(int scope, 227 OrderByComparator<ResourcePermission> orderByComparator) { 228 return getPersistence().fetchByScope_Last(scope, orderByComparator); 229 } 230 231 /** 232 * Returns the resource permissions before and after the current resource permission in the ordered set where scope = ?. 233 * 234 * @param resourcePermissionId the primary key of the current resource permission 235 * @param scope the scope 236 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 237 * @return the previous, current, and next resource permission 238 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 239 */ 240 public static ResourcePermission[] findByScope_PrevAndNext( 241 long resourcePermissionId, int scope, 242 OrderByComparator<ResourcePermission> orderByComparator) 243 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 244 return getPersistence() 245 .findByScope_PrevAndNext(resourcePermissionId, scope, 246 orderByComparator); 247 } 248 249 /** 250 * Returns all the resource permissions where scope = any ?. 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 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. 254 * </p> 255 * 256 * @param scopes the scopes 257 * @return the matching resource permissions 258 */ 259 public static List<ResourcePermission> findByScope(int[] scopes) { 260 return getPersistence().findByScope(scopes); 261 } 262 263 /** 264 * Returns a range of all the resource permissions where scope = any ?. 265 * 266 * <p> 267 * 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. 268 * </p> 269 * 270 * @param scopes the scopes 271 * @param start the lower bound of the range of resource permissions 272 * @param end the upper bound of the range of resource permissions (not inclusive) 273 * @return the range of matching resource permissions 274 */ 275 public static List<ResourcePermission> findByScope(int[] scopes, int start, 276 int end) { 277 return getPersistence().findByScope(scopes, start, end); 278 } 279 280 /** 281 * Returns an ordered range of all the resource permissions where scope = any ?. 282 * 283 * <p> 284 * 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. 285 * </p> 286 * 287 * @param scopes the scopes 288 * @param start the lower bound of the range of resource permissions 289 * @param end the upper bound of the range of resource permissions (not inclusive) 290 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 291 * @return the ordered range of matching resource permissions 292 */ 293 public static List<ResourcePermission> findByScope(int[] scopes, int start, 294 int end, OrderByComparator<ResourcePermission> orderByComparator) { 295 return getPersistence() 296 .findByScope(scopes, start, end, orderByComparator); 297 } 298 299 /** 300 * Returns an ordered range of all the resource permissions where scope = ?, optionally using the finder cache. 301 * 302 * <p> 303 * 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. 304 * </p> 305 * 306 * @param scope the scope 307 * @param start the lower bound of the range of resource permissions 308 * @param end the upper bound of the range of resource permissions (not inclusive) 309 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 310 * @param retrieveFromCache whether to retrieve from the finder cache 311 * @return the ordered range of matching resource permissions 312 */ 313 public static List<ResourcePermission> findByScope(int[] scopes, int start, 314 int end, OrderByComparator<ResourcePermission> orderByComparator, 315 boolean retrieveFromCache) { 316 return getPersistence() 317 .findByScope(scopes, start, end, orderByComparator, 318 retrieveFromCache); 319 } 320 321 /** 322 * Removes all the resource permissions where scope = ? from the database. 323 * 324 * @param scope the scope 325 */ 326 public static void removeByScope(int scope) { 327 getPersistence().removeByScope(scope); 328 } 329 330 /** 331 * Returns the number of resource permissions where scope = ?. 332 * 333 * @param scope the scope 334 * @return the number of matching resource permissions 335 */ 336 public static int countByScope(int scope) { 337 return getPersistence().countByScope(scope); 338 } 339 340 /** 341 * Returns the number of resource permissions where scope = any ?. 342 * 343 * @param scopes the scopes 344 * @return the number of matching resource permissions 345 */ 346 public static int countByScope(int[] scopes) { 347 return getPersistence().countByScope(scopes); 348 } 349 350 /** 351 * Returns all the resource permissions where roleId = ?. 352 * 353 * @param roleId the role ID 354 * @return the matching resource permissions 355 */ 356 public static List<ResourcePermission> findByRoleId(long roleId) { 357 return getPersistence().findByRoleId(roleId); 358 } 359 360 /** 361 * Returns a range of all the resource permissions where roleId = ?. 362 * 363 * <p> 364 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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. 365 * </p> 366 * 367 * @param roleId the role ID 368 * @param start the lower bound of the range of resource permissions 369 * @param end the upper bound of the range of resource permissions (not inclusive) 370 * @return the range of matching resource permissions 371 */ 372 public static List<ResourcePermission> findByRoleId(long roleId, int start, 373 int end) { 374 return getPersistence().findByRoleId(roleId, start, end); 375 } 376 377 /** 378 * Returns an ordered range of all the resource permissions where roleId = ?. 379 * 380 * <p> 381 * 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. 382 * </p> 383 * 384 * @param roleId the role ID 385 * @param start the lower bound of the range of resource permissions 386 * @param end the upper bound of the range of resource permissions (not inclusive) 387 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 388 * @return the ordered range of matching resource permissions 389 */ 390 public static List<ResourcePermission> findByRoleId(long roleId, int start, 391 int end, OrderByComparator<ResourcePermission> orderByComparator) { 392 return getPersistence() 393 .findByRoleId(roleId, start, end, orderByComparator); 394 } 395 396 /** 397 * Returns an ordered range of all the resource permissions where roleId = ?. 398 * 399 * <p> 400 * 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. 401 * </p> 402 * 403 * @param roleId the role ID 404 * @param start the lower bound of the range of resource permissions 405 * @param end the upper bound of the range of resource permissions (not inclusive) 406 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 407 * @param retrieveFromCache whether to retrieve from the finder cache 408 * @return the ordered range of matching resource permissions 409 */ 410 public static List<ResourcePermission> findByRoleId(long roleId, int start, 411 int end, OrderByComparator<ResourcePermission> orderByComparator, 412 boolean retrieveFromCache) { 413 return getPersistence() 414 .findByRoleId(roleId, start, end, orderByComparator, 415 retrieveFromCache); 416 } 417 418 /** 419 * Returns the first resource permission in the ordered set where roleId = ?. 420 * 421 * @param roleId the role ID 422 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 423 * @return the first matching resource permission 424 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 425 */ 426 public static ResourcePermission findByRoleId_First(long roleId, 427 OrderByComparator<ResourcePermission> orderByComparator) 428 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 429 return getPersistence().findByRoleId_First(roleId, orderByComparator); 430 } 431 432 /** 433 * Returns the first resource permission in the ordered set where roleId = ?. 434 * 435 * @param roleId the role ID 436 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 437 * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found 438 */ 439 public static ResourcePermission fetchByRoleId_First(long roleId, 440 OrderByComparator<ResourcePermission> orderByComparator) { 441 return getPersistence().fetchByRoleId_First(roleId, orderByComparator); 442 } 443 444 /** 445 * Returns the last resource permission in the ordered set where roleId = ?. 446 * 447 * @param roleId the role ID 448 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 449 * @return the last matching resource permission 450 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 451 */ 452 public static ResourcePermission findByRoleId_Last(long roleId, 453 OrderByComparator<ResourcePermission> orderByComparator) 454 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 455 return getPersistence().findByRoleId_Last(roleId, orderByComparator); 456 } 457 458 /** 459 * Returns the last resource permission in the ordered set where roleId = ?. 460 * 461 * @param roleId the role ID 462 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 463 * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found 464 */ 465 public static ResourcePermission fetchByRoleId_Last(long roleId, 466 OrderByComparator<ResourcePermission> orderByComparator) { 467 return getPersistence().fetchByRoleId_Last(roleId, orderByComparator); 468 } 469 470 /** 471 * Returns the resource permissions before and after the current resource permission in the ordered set where roleId = ?. 472 * 473 * @param resourcePermissionId the primary key of the current resource permission 474 * @param roleId the role ID 475 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 476 * @return the previous, current, and next resource permission 477 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 478 */ 479 public static ResourcePermission[] findByRoleId_PrevAndNext( 480 long resourcePermissionId, long roleId, 481 OrderByComparator<ResourcePermission> orderByComparator) 482 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 483 return getPersistence() 484 .findByRoleId_PrevAndNext(resourcePermissionId, roleId, 485 orderByComparator); 486 } 487 488 /** 489 * Removes all the resource permissions where roleId = ? from the database. 490 * 491 * @param roleId the role ID 492 */ 493 public static void removeByRoleId(long roleId) { 494 getPersistence().removeByRoleId(roleId); 495 } 496 497 /** 498 * Returns the number of resource permissions where roleId = ?. 499 * 500 * @param roleId the role ID 501 * @return the number of matching resource permissions 502 */ 503 public static int countByRoleId(long roleId) { 504 return getPersistence().countByRoleId(roleId); 505 } 506 507 /** 508 * Returns all the resource permissions where companyId = ? and primKey LIKE ?. 509 * 510 * @param companyId the company ID 511 * @param primKey the prim key 512 * @return the matching resource permissions 513 */ 514 public static List<ResourcePermission> findByC_LikeP(long companyId, 515 java.lang.String primKey) { 516 return getPersistence().findByC_LikeP(companyId, primKey); 517 } 518 519 /** 520 * Returns a range of all the resource permissions where companyId = ? and primKey LIKE ?. 521 * 522 * <p> 523 * 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. 524 * </p> 525 * 526 * @param companyId the company ID 527 * @param primKey the prim key 528 * @param start the lower bound of the range of resource permissions 529 * @param end the upper bound of the range of resource permissions (not inclusive) 530 * @return the range of matching resource permissions 531 */ 532 public static List<ResourcePermission> findByC_LikeP(long companyId, 533 java.lang.String primKey, int start, int end) { 534 return getPersistence().findByC_LikeP(companyId, primKey, start, end); 535 } 536 537 /** 538 * Returns an ordered range of all the resource permissions where companyId = ? and primKey LIKE ?. 539 * 540 * <p> 541 * 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. 542 * </p> 543 * 544 * @param companyId the company ID 545 * @param primKey the prim key 546 * @param start the lower bound of the range of resource permissions 547 * @param end the upper bound of the range of resource permissions (not inclusive) 548 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 549 * @return the ordered range of matching resource permissions 550 */ 551 public static List<ResourcePermission> findByC_LikeP(long companyId, 552 java.lang.String primKey, int start, int end, 553 OrderByComparator<ResourcePermission> orderByComparator) { 554 return getPersistence() 555 .findByC_LikeP(companyId, primKey, start, end, 556 orderByComparator); 557 } 558 559 /** 560 * Returns an ordered range of all the resource permissions where companyId = ? and primKey LIKE ?. 561 * 562 * <p> 563 * 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. 564 * </p> 565 * 566 * @param companyId the company ID 567 * @param primKey the prim key 568 * @param start the lower bound of the range of resource permissions 569 * @param end the upper bound of the range of resource permissions (not inclusive) 570 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 571 * @param retrieveFromCache whether to retrieve from the finder cache 572 * @return the ordered range of matching resource permissions 573 */ 574 public static List<ResourcePermission> findByC_LikeP(long companyId, 575 java.lang.String primKey, int start, int end, 576 OrderByComparator<ResourcePermission> orderByComparator, 577 boolean retrieveFromCache) { 578 return getPersistence() 579 .findByC_LikeP(companyId, primKey, start, end, 580 orderByComparator, retrieveFromCache); 581 } 582 583 /** 584 * Returns the first resource permission in the ordered set where companyId = ? and primKey LIKE ?. 585 * 586 * @param companyId the company ID 587 * @param primKey the prim key 588 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 589 * @return the first matching resource permission 590 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 591 */ 592 public static ResourcePermission findByC_LikeP_First(long companyId, 593 java.lang.String primKey, 594 OrderByComparator<ResourcePermission> orderByComparator) 595 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 596 return getPersistence() 597 .findByC_LikeP_First(companyId, primKey, orderByComparator); 598 } 599 600 /** 601 * Returns the first resource permission in the ordered set where companyId = ? and primKey LIKE ?. 602 * 603 * @param companyId the company ID 604 * @param primKey the prim key 605 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 606 * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found 607 */ 608 public static ResourcePermission fetchByC_LikeP_First(long companyId, 609 java.lang.String primKey, 610 OrderByComparator<ResourcePermission> orderByComparator) { 611 return getPersistence() 612 .fetchByC_LikeP_First(companyId, primKey, orderByComparator); 613 } 614 615 /** 616 * Returns the last resource permission in the ordered set where companyId = ? and primKey LIKE ?. 617 * 618 * @param companyId the company ID 619 * @param primKey the prim key 620 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 621 * @return the last matching resource permission 622 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 623 */ 624 public static ResourcePermission findByC_LikeP_Last(long companyId, 625 java.lang.String primKey, 626 OrderByComparator<ResourcePermission> orderByComparator) 627 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 628 return getPersistence() 629 .findByC_LikeP_Last(companyId, primKey, orderByComparator); 630 } 631 632 /** 633 * Returns the last resource permission in the ordered set where companyId = ? and primKey LIKE ?. 634 * 635 * @param companyId the company ID 636 * @param primKey the prim key 637 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 638 * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found 639 */ 640 public static ResourcePermission fetchByC_LikeP_Last(long companyId, 641 java.lang.String primKey, 642 OrderByComparator<ResourcePermission> orderByComparator) { 643 return getPersistence() 644 .fetchByC_LikeP_Last(companyId, primKey, orderByComparator); 645 } 646 647 /** 648 * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = ? and primKey LIKE ?. 649 * 650 * @param resourcePermissionId the primary key of the current resource permission 651 * @param companyId the company ID 652 * @param primKey the prim key 653 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 654 * @return the previous, current, and next resource permission 655 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 656 */ 657 public static ResourcePermission[] findByC_LikeP_PrevAndNext( 658 long resourcePermissionId, long companyId, java.lang.String primKey, 659 OrderByComparator<ResourcePermission> orderByComparator) 660 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 661 return getPersistence() 662 .findByC_LikeP_PrevAndNext(resourcePermissionId, companyId, 663 primKey, orderByComparator); 664 } 665 666 /** 667 * Removes all the resource permissions where companyId = ? and primKey LIKE ? from the database. 668 * 669 * @param companyId the company ID 670 * @param primKey the prim key 671 */ 672 public static void removeByC_LikeP(long companyId, java.lang.String primKey) { 673 getPersistence().removeByC_LikeP(companyId, primKey); 674 } 675 676 /** 677 * Returns the number of resource permissions where companyId = ? and primKey LIKE ?. 678 * 679 * @param companyId the company ID 680 * @param primKey the prim key 681 * @return the number of matching resource permissions 682 */ 683 public static int countByC_LikeP(long companyId, java.lang.String primKey) { 684 return getPersistence().countByC_LikeP(companyId, primKey); 685 } 686 687 /** 688 * Returns all the resource permissions where companyId = ? and name = ? and scope = ?. 689 * 690 * @param companyId the company ID 691 * @param name the name 692 * @param scope the scope 693 * @return the matching resource permissions 694 */ 695 public static List<ResourcePermission> findByC_N_S(long companyId, 696 java.lang.String name, int scope) { 697 return getPersistence().findByC_N_S(companyId, name, scope); 698 } 699 700 /** 701 * Returns a range of all the resource permissions where companyId = ? and name = ? and scope = ?. 702 * 703 * <p> 704 * 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. 705 * </p> 706 * 707 * @param companyId the company ID 708 * @param name the name 709 * @param scope the scope 710 * @param start the lower bound of the range of resource permissions 711 * @param end the upper bound of the range of resource permissions (not inclusive) 712 * @return the range of matching resource permissions 713 */ 714 public static List<ResourcePermission> findByC_N_S(long companyId, 715 java.lang.String name, int scope, int start, int end) { 716 return getPersistence().findByC_N_S(companyId, name, scope, start, end); 717 } 718 719 /** 720 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ?. 721 * 722 * <p> 723 * 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. 724 * </p> 725 * 726 * @param companyId the company ID 727 * @param name the name 728 * @param scope the scope 729 * @param start the lower bound of the range of resource permissions 730 * @param end the upper bound of the range of resource permissions (not inclusive) 731 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 732 * @return the ordered range of matching resource permissions 733 */ 734 public static List<ResourcePermission> findByC_N_S(long companyId, 735 java.lang.String name, int scope, int start, int end, 736 OrderByComparator<ResourcePermission> orderByComparator) { 737 return getPersistence() 738 .findByC_N_S(companyId, name, scope, start, end, 739 orderByComparator); 740 } 741 742 /** 743 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ?. 744 * 745 * <p> 746 * 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. 747 * </p> 748 * 749 * @param companyId the company ID 750 * @param name the name 751 * @param scope the scope 752 * @param start the lower bound of the range of resource permissions 753 * @param end the upper bound of the range of resource permissions (not inclusive) 754 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 755 * @param retrieveFromCache whether to retrieve from the finder cache 756 * @return the ordered range of matching resource permissions 757 */ 758 public static List<ResourcePermission> findByC_N_S(long companyId, 759 java.lang.String name, int scope, int start, int end, 760 OrderByComparator<ResourcePermission> orderByComparator, 761 boolean retrieveFromCache) { 762 return getPersistence() 763 .findByC_N_S(companyId, name, scope, start, end, 764 orderByComparator, retrieveFromCache); 765 } 766 767 /** 768 * Returns the first resource permission in the ordered set where companyId = ? and name = ? and scope = ?. 769 * 770 * @param companyId the company ID 771 * @param name the name 772 * @param scope the scope 773 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 774 * @return the first matching resource permission 775 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 776 */ 777 public static ResourcePermission findByC_N_S_First(long companyId, 778 java.lang.String name, int scope, 779 OrderByComparator<ResourcePermission> orderByComparator) 780 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 781 return getPersistence() 782 .findByC_N_S_First(companyId, name, scope, orderByComparator); 783 } 784 785 /** 786 * Returns the first resource permission in the ordered set where companyId = ? and name = ? and scope = ?. 787 * 788 * @param companyId the company ID 789 * @param name the name 790 * @param scope the scope 791 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 792 * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found 793 */ 794 public static ResourcePermission fetchByC_N_S_First(long companyId, 795 java.lang.String name, int scope, 796 OrderByComparator<ResourcePermission> orderByComparator) { 797 return getPersistence() 798 .fetchByC_N_S_First(companyId, name, scope, orderByComparator); 799 } 800 801 /** 802 * Returns the last resource permission in the ordered set where companyId = ? and name = ? and scope = ?. 803 * 804 * @param companyId the company ID 805 * @param name the name 806 * @param scope the scope 807 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 808 * @return the last matching resource permission 809 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 810 */ 811 public static ResourcePermission findByC_N_S_Last(long companyId, 812 java.lang.String name, int scope, 813 OrderByComparator<ResourcePermission> orderByComparator) 814 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 815 return getPersistence() 816 .findByC_N_S_Last(companyId, name, scope, orderByComparator); 817 } 818 819 /** 820 * Returns the last resource permission in the ordered set where companyId = ? and name = ? and scope = ?. 821 * 822 * @param companyId the company ID 823 * @param name the name 824 * @param scope the scope 825 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 826 * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found 827 */ 828 public static ResourcePermission fetchByC_N_S_Last(long companyId, 829 java.lang.String name, int scope, 830 OrderByComparator<ResourcePermission> orderByComparator) { 831 return getPersistence() 832 .fetchByC_N_S_Last(companyId, name, scope, orderByComparator); 833 } 834 835 /** 836 * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = ? and name = ? and scope = ?. 837 * 838 * @param resourcePermissionId the primary key of the current resource permission 839 * @param companyId the company ID 840 * @param name the name 841 * @param scope the scope 842 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 843 * @return the previous, current, and next resource permission 844 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 845 */ 846 public static ResourcePermission[] findByC_N_S_PrevAndNext( 847 long resourcePermissionId, long companyId, java.lang.String name, 848 int scope, OrderByComparator<ResourcePermission> orderByComparator) 849 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 850 return getPersistence() 851 .findByC_N_S_PrevAndNext(resourcePermissionId, companyId, 852 name, scope, orderByComparator); 853 } 854 855 /** 856 * Removes all the resource permissions where companyId = ? and name = ? and scope = ? from the database. 857 * 858 * @param companyId the company ID 859 * @param name the name 860 * @param scope the scope 861 */ 862 public static void removeByC_N_S(long companyId, java.lang.String name, 863 int scope) { 864 getPersistence().removeByC_N_S(companyId, name, scope); 865 } 866 867 /** 868 * Returns the number of resource permissions where companyId = ? and name = ? and scope = ?. 869 * 870 * @param companyId the company ID 871 * @param name the name 872 * @param scope the scope 873 * @return the number of matching resource permissions 874 */ 875 public static int countByC_N_S(long companyId, java.lang.String name, 876 int scope) { 877 return getPersistence().countByC_N_S(companyId, name, scope); 878 } 879 880 /** 881 * Returns all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ?. 882 * 883 * @param companyId the company ID 884 * @param name the name 885 * @param scope the scope 886 * @param primKey the prim key 887 * @return the matching resource permissions 888 */ 889 public static List<ResourcePermission> findByC_N_S_P(long companyId, 890 java.lang.String name, int scope, java.lang.String primKey) { 891 return getPersistence().findByC_N_S_P(companyId, name, scope, primKey); 892 } 893 894 /** 895 * Returns a range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ?. 896 * 897 * <p> 898 * 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. 899 * </p> 900 * 901 * @param companyId the company ID 902 * @param name the name 903 * @param scope the scope 904 * @param primKey the prim key 905 * @param start the lower bound of the range of resource permissions 906 * @param end the upper bound of the range of resource permissions (not inclusive) 907 * @return the range of matching resource permissions 908 */ 909 public static List<ResourcePermission> findByC_N_S_P(long companyId, 910 java.lang.String name, int scope, java.lang.String primKey, int start, 911 int end) { 912 return getPersistence() 913 .findByC_N_S_P(companyId, name, scope, primKey, start, end); 914 } 915 916 /** 917 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ?. 918 * 919 * <p> 920 * 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. 921 * </p> 922 * 923 * @param companyId the company ID 924 * @param name the name 925 * @param scope the scope 926 * @param primKey the prim key 927 * @param start the lower bound of the range of resource permissions 928 * @param end the upper bound of the range of resource permissions (not inclusive) 929 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 930 * @return the ordered range of matching resource permissions 931 */ 932 public static List<ResourcePermission> findByC_N_S_P(long companyId, 933 java.lang.String name, int scope, java.lang.String primKey, int start, 934 int end, OrderByComparator<ResourcePermission> orderByComparator) { 935 return getPersistence() 936 .findByC_N_S_P(companyId, name, scope, primKey, start, end, 937 orderByComparator); 938 } 939 940 /** 941 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ?. 942 * 943 * <p> 944 * 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. 945 * </p> 946 * 947 * @param companyId the company ID 948 * @param name the name 949 * @param scope the scope 950 * @param primKey the prim key 951 * @param start the lower bound of the range of resource permissions 952 * @param end the upper bound of the range of resource permissions (not inclusive) 953 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 954 * @param retrieveFromCache whether to retrieve from the finder cache 955 * @return the ordered range of matching resource permissions 956 */ 957 public static List<ResourcePermission> findByC_N_S_P(long companyId, 958 java.lang.String name, int scope, java.lang.String primKey, int start, 959 int end, OrderByComparator<ResourcePermission> orderByComparator, 960 boolean retrieveFromCache) { 961 return getPersistence() 962 .findByC_N_S_P(companyId, name, scope, primKey, start, end, 963 orderByComparator, retrieveFromCache); 964 } 965 966 /** 967 * Returns the first resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKey = ?. 968 * 969 * @param companyId the company ID 970 * @param name the name 971 * @param scope the scope 972 * @param primKey the prim key 973 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 974 * @return the first matching resource permission 975 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 976 */ 977 public static ResourcePermission findByC_N_S_P_First(long companyId, 978 java.lang.String name, int scope, java.lang.String primKey, 979 OrderByComparator<ResourcePermission> orderByComparator) 980 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 981 return getPersistence() 982 .findByC_N_S_P_First(companyId, name, scope, primKey, 983 orderByComparator); 984 } 985 986 /** 987 * Returns the first resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKey = ?. 988 * 989 * @param companyId the company ID 990 * @param name the name 991 * @param scope the scope 992 * @param primKey the prim key 993 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 994 * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found 995 */ 996 public static ResourcePermission fetchByC_N_S_P_First(long companyId, 997 java.lang.String name, int scope, java.lang.String primKey, 998 OrderByComparator<ResourcePermission> orderByComparator) { 999 return getPersistence() 1000 .fetchByC_N_S_P_First(companyId, name, scope, primKey, 1001 orderByComparator); 1002 } 1003 1004 /** 1005 * Returns the last resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKey = ?. 1006 * 1007 * @param companyId the company ID 1008 * @param name the name 1009 * @param scope the scope 1010 * @param primKey the prim key 1011 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1012 * @return the last matching resource permission 1013 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 1014 */ 1015 public static ResourcePermission findByC_N_S_P_Last(long companyId, 1016 java.lang.String name, int scope, java.lang.String primKey, 1017 OrderByComparator<ResourcePermission> orderByComparator) 1018 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 1019 return getPersistence() 1020 .findByC_N_S_P_Last(companyId, name, scope, primKey, 1021 orderByComparator); 1022 } 1023 1024 /** 1025 * Returns the last resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKey = ?. 1026 * 1027 * @param companyId the company ID 1028 * @param name the name 1029 * @param scope the scope 1030 * @param primKey the prim key 1031 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1032 * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found 1033 */ 1034 public static ResourcePermission fetchByC_N_S_P_Last(long companyId, 1035 java.lang.String name, int scope, java.lang.String primKey, 1036 OrderByComparator<ResourcePermission> orderByComparator) { 1037 return getPersistence() 1038 .fetchByC_N_S_P_Last(companyId, name, scope, primKey, 1039 orderByComparator); 1040 } 1041 1042 /** 1043 * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKey = ?. 1044 * 1045 * @param resourcePermissionId the primary key of the current resource permission 1046 * @param companyId the company ID 1047 * @param name the name 1048 * @param scope the scope 1049 * @param primKey the prim key 1050 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1051 * @return the previous, current, and next resource permission 1052 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 1053 */ 1054 public static ResourcePermission[] findByC_N_S_P_PrevAndNext( 1055 long resourcePermissionId, long companyId, java.lang.String name, 1056 int scope, java.lang.String primKey, 1057 OrderByComparator<ResourcePermission> orderByComparator) 1058 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 1059 return getPersistence() 1060 .findByC_N_S_P_PrevAndNext(resourcePermissionId, companyId, 1061 name, scope, primKey, orderByComparator); 1062 } 1063 1064 /** 1065 * Removes all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? from the database. 1066 * 1067 * @param companyId the company ID 1068 * @param name the name 1069 * @param scope the scope 1070 * @param primKey the prim key 1071 */ 1072 public static void removeByC_N_S_P(long companyId, java.lang.String name, 1073 int scope, java.lang.String primKey) { 1074 getPersistence().removeByC_N_S_P(companyId, name, scope, primKey); 1075 } 1076 1077 /** 1078 * Returns the number of resource permissions where companyId = ? and name = ? and scope = ? and primKey = ?. 1079 * 1080 * @param companyId the company ID 1081 * @param name the name 1082 * @param scope the scope 1083 * @param primKey the prim key 1084 * @return the number of matching resource permissions 1085 */ 1086 public static int countByC_N_S_P(long companyId, java.lang.String name, 1087 int scope, java.lang.String primKey) { 1088 return getPersistence().countByC_N_S_P(companyId, name, scope, primKey); 1089 } 1090 1091 /** 1092 * Returns all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = any ?. 1093 * 1094 * <p> 1095 * 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. 1096 * </p> 1097 * 1098 * @param companyId the company ID 1099 * @param name the name 1100 * @param scope the scope 1101 * @param primKey the prim key 1102 * @param roleIds the role IDs 1103 * @return the matching resource permissions 1104 */ 1105 public static List<ResourcePermission> findByC_N_S_P_R(long companyId, 1106 java.lang.String name, int scope, java.lang.String primKey, 1107 long[] roleIds) { 1108 return getPersistence() 1109 .findByC_N_S_P_R(companyId, name, scope, primKey, roleIds); 1110 } 1111 1112 /** 1113 * Returns a range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = any ?. 1114 * 1115 * <p> 1116 * 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. 1117 * </p> 1118 * 1119 * @param companyId the company ID 1120 * @param name the name 1121 * @param scope the scope 1122 * @param primKey the prim key 1123 * @param roleIds the role IDs 1124 * @param start the lower bound of the range of resource permissions 1125 * @param end the upper bound of the range of resource permissions (not inclusive) 1126 * @return the range of matching resource permissions 1127 */ 1128 public static List<ResourcePermission> findByC_N_S_P_R(long companyId, 1129 java.lang.String name, int scope, java.lang.String primKey, 1130 long[] roleIds, int start, int end) { 1131 return getPersistence() 1132 .findByC_N_S_P_R(companyId, name, scope, primKey, roleIds, 1133 start, end); 1134 } 1135 1136 /** 1137 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = any ?. 1138 * 1139 * <p> 1140 * 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. 1141 * </p> 1142 * 1143 * @param companyId the company ID 1144 * @param name the name 1145 * @param scope the scope 1146 * @param primKey the prim key 1147 * @param roleIds the role IDs 1148 * @param start the lower bound of the range of resource permissions 1149 * @param end the upper bound of the range of resource permissions (not inclusive) 1150 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1151 * @return the ordered range of matching resource permissions 1152 */ 1153 public static List<ResourcePermission> findByC_N_S_P_R(long companyId, 1154 java.lang.String name, int scope, java.lang.String primKey, 1155 long[] roleIds, int start, int end, 1156 OrderByComparator<ResourcePermission> orderByComparator) { 1157 return getPersistence() 1158 .findByC_N_S_P_R(companyId, name, scope, primKey, roleIds, 1159 start, end, orderByComparator); 1160 } 1161 1162 /** 1163 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = ?, optionally using the finder cache. 1164 * 1165 * <p> 1166 * 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. 1167 * </p> 1168 * 1169 * @param companyId the company ID 1170 * @param name the name 1171 * @param scope the scope 1172 * @param primKey the prim key 1173 * @param roleId the role ID 1174 * @param start the lower bound of the range of resource permissions 1175 * @param end the upper bound of the range of resource permissions (not inclusive) 1176 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1177 * @param retrieveFromCache whether to retrieve from the finder cache 1178 * @return the ordered range of matching resource permissions 1179 */ 1180 public static List<ResourcePermission> findByC_N_S_P_R(long companyId, 1181 java.lang.String name, int scope, java.lang.String primKey, 1182 long[] roleIds, int start, int end, 1183 OrderByComparator<ResourcePermission> orderByComparator, 1184 boolean retrieveFromCache) { 1185 return getPersistence() 1186 .findByC_N_S_P_R(companyId, name, scope, primKey, roleIds, 1187 start, end, orderByComparator, retrieveFromCache); 1188 } 1189 1190 /** 1191 * 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. 1192 * 1193 * @param companyId the company ID 1194 * @param name the name 1195 * @param scope the scope 1196 * @param primKey the prim key 1197 * @param roleId the role ID 1198 * @return the matching resource permission 1199 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 1200 */ 1201 public static ResourcePermission findByC_N_S_P_R(long companyId, 1202 java.lang.String name, int scope, java.lang.String primKey, long roleId) 1203 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 1204 return getPersistence() 1205 .findByC_N_S_P_R(companyId, name, scope, primKey, roleId); 1206 } 1207 1208 /** 1209 * 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. 1210 * 1211 * @param companyId the company ID 1212 * @param name the name 1213 * @param scope the scope 1214 * @param primKey the prim key 1215 * @param roleId the role ID 1216 * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found 1217 */ 1218 public static ResourcePermission fetchByC_N_S_P_R(long companyId, 1219 java.lang.String name, int scope, java.lang.String primKey, long roleId) { 1220 return getPersistence() 1221 .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId); 1222 } 1223 1224 /** 1225 * 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. 1226 * 1227 * @param companyId the company ID 1228 * @param name the name 1229 * @param scope the scope 1230 * @param primKey the prim key 1231 * @param roleId the role ID 1232 * @param retrieveFromCache whether to retrieve from the finder cache 1233 * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found 1234 */ 1235 public static ResourcePermission fetchByC_N_S_P_R(long companyId, 1236 java.lang.String name, int scope, java.lang.String primKey, 1237 long roleId, boolean retrieveFromCache) { 1238 return getPersistence() 1239 .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId, 1240 retrieveFromCache); 1241 } 1242 1243 /** 1244 * Removes the resource permission where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = ? from the database. 1245 * 1246 * @param companyId the company ID 1247 * @param name the name 1248 * @param scope the scope 1249 * @param primKey the prim key 1250 * @param roleId the role ID 1251 * @return the resource permission that was removed 1252 */ 1253 public static ResourcePermission removeByC_N_S_P_R(long companyId, 1254 java.lang.String name, int scope, java.lang.String primKey, long roleId) 1255 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 1256 return getPersistence() 1257 .removeByC_N_S_P_R(companyId, name, scope, primKey, roleId); 1258 } 1259 1260 /** 1261 * Returns the number of resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = ?. 1262 * 1263 * @param companyId the company ID 1264 * @param name the name 1265 * @param scope the scope 1266 * @param primKey the prim key 1267 * @param roleId the role ID 1268 * @return the number of matching resource permissions 1269 */ 1270 public static int countByC_N_S_P_R(long companyId, java.lang.String name, 1271 int scope, java.lang.String primKey, long roleId) { 1272 return getPersistence() 1273 .countByC_N_S_P_R(companyId, name, scope, primKey, roleId); 1274 } 1275 1276 /** 1277 * Returns the number of resource permissions where companyId = ? and name = ? and scope = ? and primKey = ? and roleId = any ?. 1278 * 1279 * @param companyId the company ID 1280 * @param name the name 1281 * @param scope the scope 1282 * @param primKey the prim key 1283 * @param roleIds the role IDs 1284 * @return the number of matching resource permissions 1285 */ 1286 public static int countByC_N_S_P_R(long companyId, java.lang.String name, 1287 int scope, java.lang.String primKey, long[] roleIds) { 1288 return getPersistence() 1289 .countByC_N_S_P_R(companyId, name, scope, primKey, roleIds); 1290 } 1291 1292 /** 1293 * Returns all the resource permissions where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ?. 1294 * 1295 * @param companyId the company ID 1296 * @param name the name 1297 * @param scope the scope 1298 * @param primKeyId the prim key ID 1299 * @param roleId the role ID 1300 * @param viewActionId the view action ID 1301 * @return the matching resource permissions 1302 */ 1303 public static List<ResourcePermission> findByC_N_S_P_R_V(long companyId, 1304 java.lang.String name, int scope, long primKeyId, long roleId, 1305 boolean viewActionId) { 1306 return getPersistence() 1307 .findByC_N_S_P_R_V(companyId, name, scope, primKeyId, 1308 roleId, viewActionId); 1309 } 1310 1311 /** 1312 * Returns a range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ?. 1313 * 1314 * <p> 1315 * 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. 1316 * </p> 1317 * 1318 * @param companyId the company ID 1319 * @param name the name 1320 * @param scope the scope 1321 * @param primKeyId the prim key ID 1322 * @param roleId the role ID 1323 * @param viewActionId the view action ID 1324 * @param start the lower bound of the range of resource permissions 1325 * @param end the upper bound of the range of resource permissions (not inclusive) 1326 * @return the range of matching resource permissions 1327 */ 1328 public static List<ResourcePermission> findByC_N_S_P_R_V(long companyId, 1329 java.lang.String name, int scope, long primKeyId, long roleId, 1330 boolean viewActionId, int start, int end) { 1331 return getPersistence() 1332 .findByC_N_S_P_R_V(companyId, name, scope, primKeyId, 1333 roleId, viewActionId, start, end); 1334 } 1335 1336 /** 1337 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ?. 1338 * 1339 * <p> 1340 * 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. 1341 * </p> 1342 * 1343 * @param companyId the company ID 1344 * @param name the name 1345 * @param scope the scope 1346 * @param primKeyId the prim key ID 1347 * @param roleId the role ID 1348 * @param viewActionId the view action ID 1349 * @param start the lower bound of the range of resource permissions 1350 * @param end the upper bound of the range of resource permissions (not inclusive) 1351 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1352 * @return the ordered range of matching resource permissions 1353 */ 1354 public static List<ResourcePermission> findByC_N_S_P_R_V(long companyId, 1355 java.lang.String name, int scope, long primKeyId, long roleId, 1356 boolean viewActionId, int start, int end, 1357 OrderByComparator<ResourcePermission> orderByComparator) { 1358 return getPersistence() 1359 .findByC_N_S_P_R_V(companyId, name, scope, primKeyId, 1360 roleId, viewActionId, start, end, orderByComparator); 1361 } 1362 1363 /** 1364 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ?. 1365 * 1366 * <p> 1367 * 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. 1368 * </p> 1369 * 1370 * @param companyId the company ID 1371 * @param name the name 1372 * @param scope the scope 1373 * @param primKeyId the prim key ID 1374 * @param roleId the role ID 1375 * @param viewActionId the view action ID 1376 * @param start the lower bound of the range of resource permissions 1377 * @param end the upper bound of the range of resource permissions (not inclusive) 1378 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1379 * @param retrieveFromCache whether to retrieve from the finder cache 1380 * @return the ordered range of matching resource permissions 1381 */ 1382 public static List<ResourcePermission> findByC_N_S_P_R_V(long companyId, 1383 java.lang.String name, int scope, long primKeyId, long roleId, 1384 boolean viewActionId, int start, int end, 1385 OrderByComparator<ResourcePermission> orderByComparator, 1386 boolean retrieveFromCache) { 1387 return getPersistence() 1388 .findByC_N_S_P_R_V(companyId, name, scope, primKeyId, 1389 roleId, viewActionId, start, end, orderByComparator, 1390 retrieveFromCache); 1391 } 1392 1393 /** 1394 * Returns the first resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ?. 1395 * 1396 * @param companyId the company ID 1397 * @param name the name 1398 * @param scope the scope 1399 * @param primKeyId the prim key ID 1400 * @param roleId the role ID 1401 * @param viewActionId the view action ID 1402 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1403 * @return the first matching resource permission 1404 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 1405 */ 1406 public static ResourcePermission findByC_N_S_P_R_V_First(long companyId, 1407 java.lang.String name, int scope, long primKeyId, long roleId, 1408 boolean viewActionId, 1409 OrderByComparator<ResourcePermission> orderByComparator) 1410 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 1411 return getPersistence() 1412 .findByC_N_S_P_R_V_First(companyId, name, scope, primKeyId, 1413 roleId, viewActionId, orderByComparator); 1414 } 1415 1416 /** 1417 * Returns the first resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ?. 1418 * 1419 * @param companyId the company ID 1420 * @param name the name 1421 * @param scope the scope 1422 * @param primKeyId the prim key ID 1423 * @param roleId the role ID 1424 * @param viewActionId the view action ID 1425 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1426 * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found 1427 */ 1428 public static ResourcePermission fetchByC_N_S_P_R_V_First(long companyId, 1429 java.lang.String name, int scope, long primKeyId, long roleId, 1430 boolean viewActionId, 1431 OrderByComparator<ResourcePermission> orderByComparator) { 1432 return getPersistence() 1433 .fetchByC_N_S_P_R_V_First(companyId, name, scope, primKeyId, 1434 roleId, viewActionId, orderByComparator); 1435 } 1436 1437 /** 1438 * Returns the last resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ?. 1439 * 1440 * @param companyId the company ID 1441 * @param name the name 1442 * @param scope the scope 1443 * @param primKeyId the prim key ID 1444 * @param roleId the role ID 1445 * @param viewActionId the view action ID 1446 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1447 * @return the last matching resource permission 1448 * @throws NoSuchResourcePermissionException if a matching resource permission could not be found 1449 */ 1450 public static ResourcePermission findByC_N_S_P_R_V_Last(long companyId, 1451 java.lang.String name, int scope, long primKeyId, long roleId, 1452 boolean viewActionId, 1453 OrderByComparator<ResourcePermission> orderByComparator) 1454 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 1455 return getPersistence() 1456 .findByC_N_S_P_R_V_Last(companyId, name, scope, primKeyId, 1457 roleId, viewActionId, orderByComparator); 1458 } 1459 1460 /** 1461 * Returns the last resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ?. 1462 * 1463 * @param companyId the company ID 1464 * @param name the name 1465 * @param scope the scope 1466 * @param primKeyId the prim key ID 1467 * @param roleId the role ID 1468 * @param viewActionId the view action ID 1469 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1470 * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found 1471 */ 1472 public static ResourcePermission fetchByC_N_S_P_R_V_Last(long companyId, 1473 java.lang.String name, int scope, long primKeyId, long roleId, 1474 boolean viewActionId, 1475 OrderByComparator<ResourcePermission> orderByComparator) { 1476 return getPersistence() 1477 .fetchByC_N_S_P_R_V_Last(companyId, name, scope, primKeyId, 1478 roleId, viewActionId, orderByComparator); 1479 } 1480 1481 /** 1482 * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ?. 1483 * 1484 * @param resourcePermissionId the primary key of the current resource permission 1485 * @param companyId the company ID 1486 * @param name the name 1487 * @param scope the scope 1488 * @param primKeyId the prim key ID 1489 * @param roleId the role ID 1490 * @param viewActionId the view action ID 1491 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1492 * @return the previous, current, and next resource permission 1493 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 1494 */ 1495 public static ResourcePermission[] findByC_N_S_P_R_V_PrevAndNext( 1496 long resourcePermissionId, long companyId, java.lang.String name, 1497 int scope, long primKeyId, long roleId, boolean viewActionId, 1498 OrderByComparator<ResourcePermission> orderByComparator) 1499 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 1500 return getPersistence() 1501 .findByC_N_S_P_R_V_PrevAndNext(resourcePermissionId, 1502 companyId, name, scope, primKeyId, roleId, viewActionId, 1503 orderByComparator); 1504 } 1505 1506 /** 1507 * Returns all the resource permissions where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = any ? and viewActionId = ?. 1508 * 1509 * <p> 1510 * 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. 1511 * </p> 1512 * 1513 * @param companyId the company ID 1514 * @param name the name 1515 * @param scope the scope 1516 * @param primKeyId the prim key ID 1517 * @param roleIds the role IDs 1518 * @param viewActionId the view action ID 1519 * @return the matching resource permissions 1520 */ 1521 public static List<ResourcePermission> findByC_N_S_P_R_V(long companyId, 1522 java.lang.String name, int scope, long primKeyId, long[] roleIds, 1523 boolean viewActionId) { 1524 return getPersistence() 1525 .findByC_N_S_P_R_V(companyId, name, scope, primKeyId, 1526 roleIds, viewActionId); 1527 } 1528 1529 /** 1530 * Returns a range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = any ? and viewActionId = ?. 1531 * 1532 * <p> 1533 * 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. 1534 * </p> 1535 * 1536 * @param companyId the company ID 1537 * @param name the name 1538 * @param scope the scope 1539 * @param primKeyId the prim key ID 1540 * @param roleIds the role IDs 1541 * @param viewActionId the view action ID 1542 * @param start the lower bound of the range of resource permissions 1543 * @param end the upper bound of the range of resource permissions (not inclusive) 1544 * @return the range of matching resource permissions 1545 */ 1546 public static List<ResourcePermission> findByC_N_S_P_R_V(long companyId, 1547 java.lang.String name, int scope, long primKeyId, long[] roleIds, 1548 boolean viewActionId, int start, int end) { 1549 return getPersistence() 1550 .findByC_N_S_P_R_V(companyId, name, scope, primKeyId, 1551 roleIds, viewActionId, start, end); 1552 } 1553 1554 /** 1555 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = any ? and viewActionId = ?. 1556 * 1557 * <p> 1558 * 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. 1559 * </p> 1560 * 1561 * @param companyId the company ID 1562 * @param name the name 1563 * @param scope the scope 1564 * @param primKeyId the prim key ID 1565 * @param roleIds the role IDs 1566 * @param viewActionId the view action ID 1567 * @param start the lower bound of the range of resource permissions 1568 * @param end the upper bound of the range of resource permissions (not inclusive) 1569 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1570 * @return the ordered range of matching resource permissions 1571 */ 1572 public static List<ResourcePermission> findByC_N_S_P_R_V(long companyId, 1573 java.lang.String name, int scope, long primKeyId, long[] roleIds, 1574 boolean viewActionId, int start, int end, 1575 OrderByComparator<ResourcePermission> orderByComparator) { 1576 return getPersistence() 1577 .findByC_N_S_P_R_V(companyId, name, scope, primKeyId, 1578 roleIds, viewActionId, start, end, orderByComparator); 1579 } 1580 1581 /** 1582 * Returns an ordered range of all the resource permissions where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ?, optionally using the finder cache. 1583 * 1584 * <p> 1585 * 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. 1586 * </p> 1587 * 1588 * @param companyId the company ID 1589 * @param name the name 1590 * @param scope the scope 1591 * @param primKeyId the prim key ID 1592 * @param roleId the role ID 1593 * @param viewActionId the view action ID 1594 * @param start the lower bound of the range of resource permissions 1595 * @param end the upper bound of the range of resource permissions (not inclusive) 1596 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1597 * @param retrieveFromCache whether to retrieve from the finder cache 1598 * @return the ordered range of matching resource permissions 1599 */ 1600 public static List<ResourcePermission> findByC_N_S_P_R_V(long companyId, 1601 java.lang.String name, int scope, long primKeyId, long[] roleIds, 1602 boolean viewActionId, int start, int end, 1603 OrderByComparator<ResourcePermission> orderByComparator, 1604 boolean retrieveFromCache) { 1605 return getPersistence() 1606 .findByC_N_S_P_R_V(companyId, name, scope, primKeyId, 1607 roleIds, viewActionId, start, end, orderByComparator, 1608 retrieveFromCache); 1609 } 1610 1611 /** 1612 * Removes all the resource permissions where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ? from the database. 1613 * 1614 * @param companyId the company ID 1615 * @param name the name 1616 * @param scope the scope 1617 * @param primKeyId the prim key ID 1618 * @param roleId the role ID 1619 * @param viewActionId the view action ID 1620 */ 1621 public static void removeByC_N_S_P_R_V(long companyId, 1622 java.lang.String name, int scope, long primKeyId, long roleId, 1623 boolean viewActionId) { 1624 getPersistence() 1625 .removeByC_N_S_P_R_V(companyId, name, scope, primKeyId, roleId, 1626 viewActionId); 1627 } 1628 1629 /** 1630 * Returns the number of resource permissions where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = ? and viewActionId = ?. 1631 * 1632 * @param companyId the company ID 1633 * @param name the name 1634 * @param scope the scope 1635 * @param primKeyId the prim key ID 1636 * @param roleId the role ID 1637 * @param viewActionId the view action ID 1638 * @return the number of matching resource permissions 1639 */ 1640 public static int countByC_N_S_P_R_V(long companyId, java.lang.String name, 1641 int scope, long primKeyId, long roleId, boolean viewActionId) { 1642 return getPersistence() 1643 .countByC_N_S_P_R_V(companyId, name, scope, primKeyId, 1644 roleId, viewActionId); 1645 } 1646 1647 /** 1648 * Returns the number of resource permissions where companyId = ? and name = ? and scope = ? and primKeyId = ? and roleId = any ? and viewActionId = ?. 1649 * 1650 * @param companyId the company ID 1651 * @param name the name 1652 * @param scope the scope 1653 * @param primKeyId the prim key ID 1654 * @param roleIds the role IDs 1655 * @param viewActionId the view action ID 1656 * @return the number of matching resource permissions 1657 */ 1658 public static int countByC_N_S_P_R_V(long companyId, java.lang.String name, 1659 int scope, long primKeyId, long[] roleIds, boolean viewActionId) { 1660 return getPersistence() 1661 .countByC_N_S_P_R_V(companyId, name, scope, primKeyId, 1662 roleIds, viewActionId); 1663 } 1664 1665 /** 1666 * Caches the resource permission in the entity cache if it is enabled. 1667 * 1668 * @param resourcePermission the resource permission 1669 */ 1670 public static void cacheResult(ResourcePermission resourcePermission) { 1671 getPersistence().cacheResult(resourcePermission); 1672 } 1673 1674 /** 1675 * Caches the resource permissions in the entity cache if it is enabled. 1676 * 1677 * @param resourcePermissions the resource permissions 1678 */ 1679 public static void cacheResult(List<ResourcePermission> resourcePermissions) { 1680 getPersistence().cacheResult(resourcePermissions); 1681 } 1682 1683 /** 1684 * Creates a new resource permission with the primary key. Does not add the resource permission to the database. 1685 * 1686 * @param resourcePermissionId the primary key for the new resource permission 1687 * @return the new resource permission 1688 */ 1689 public static ResourcePermission create(long resourcePermissionId) { 1690 return getPersistence().create(resourcePermissionId); 1691 } 1692 1693 /** 1694 * Removes the resource permission with the primary key from the database. Also notifies the appropriate model listeners. 1695 * 1696 * @param resourcePermissionId the primary key of the resource permission 1697 * @return the resource permission that was removed 1698 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 1699 */ 1700 public static ResourcePermission remove(long resourcePermissionId) 1701 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 1702 return getPersistence().remove(resourcePermissionId); 1703 } 1704 1705 public static ResourcePermission updateImpl( 1706 ResourcePermission resourcePermission) { 1707 return getPersistence().updateImpl(resourcePermission); 1708 } 1709 1710 /** 1711 * Returns the resource permission with the primary key or throws a {@link NoSuchResourcePermissionException} if it could not be found. 1712 * 1713 * @param resourcePermissionId the primary key of the resource permission 1714 * @return the resource permission 1715 * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found 1716 */ 1717 public static ResourcePermission findByPrimaryKey(long resourcePermissionId) 1718 throws com.liferay.portal.exception.NoSuchResourcePermissionException { 1719 return getPersistence().findByPrimaryKey(resourcePermissionId); 1720 } 1721 1722 /** 1723 * Returns the resource permission with the primary key or returns <code>null</code> if it could not be found. 1724 * 1725 * @param resourcePermissionId the primary key of the resource permission 1726 * @return the resource permission, or <code>null</code> if a resource permission with the primary key could not be found 1727 */ 1728 public static ResourcePermission fetchByPrimaryKey( 1729 long resourcePermissionId) { 1730 return getPersistence().fetchByPrimaryKey(resourcePermissionId); 1731 } 1732 1733 public static java.util.Map<java.io.Serializable, ResourcePermission> fetchByPrimaryKeys( 1734 java.util.Set<java.io.Serializable> primaryKeys) { 1735 return getPersistence().fetchByPrimaryKeys(primaryKeys); 1736 } 1737 1738 /** 1739 * Returns all the resource permissions. 1740 * 1741 * @return the resource permissions 1742 */ 1743 public static List<ResourcePermission> findAll() { 1744 return getPersistence().findAll(); 1745 } 1746 1747 /** 1748 * Returns a range of all the resource permissions. 1749 * 1750 * <p> 1751 * 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. 1752 * </p> 1753 * 1754 * @param start the lower bound of the range of resource permissions 1755 * @param end the upper bound of the range of resource permissions (not inclusive) 1756 * @return the range of resource permissions 1757 */ 1758 public static List<ResourcePermission> findAll(int start, int end) { 1759 return getPersistence().findAll(start, end); 1760 } 1761 1762 /** 1763 * Returns an ordered range of all the resource permissions. 1764 * 1765 * <p> 1766 * 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. 1767 * </p> 1768 * 1769 * @param start the lower bound of the range of resource permissions 1770 * @param end the upper bound of the range of resource permissions (not inclusive) 1771 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1772 * @return the ordered range of resource permissions 1773 */ 1774 public static List<ResourcePermission> findAll(int start, int end, 1775 OrderByComparator<ResourcePermission> orderByComparator) { 1776 return getPersistence().findAll(start, end, orderByComparator); 1777 } 1778 1779 /** 1780 * Returns an ordered range of all the resource permissions. 1781 * 1782 * <p> 1783 * 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. 1784 * </p> 1785 * 1786 * @param start the lower bound of the range of resource permissions 1787 * @param end the upper bound of the range of resource permissions (not inclusive) 1788 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1789 * @param retrieveFromCache whether to retrieve from the finder cache 1790 * @return the ordered range of resource permissions 1791 */ 1792 public static List<ResourcePermission> findAll(int start, int end, 1793 OrderByComparator<ResourcePermission> orderByComparator, 1794 boolean retrieveFromCache) { 1795 return getPersistence() 1796 .findAll(start, end, orderByComparator, retrieveFromCache); 1797 } 1798 1799 /** 1800 * Removes all the resource permissions from the database. 1801 */ 1802 public static void removeAll() { 1803 getPersistence().removeAll(); 1804 } 1805 1806 /** 1807 * Returns the number of resource permissions. 1808 * 1809 * @return the number of resource permissions 1810 */ 1811 public static int countAll() { 1812 return getPersistence().countAll(); 1813 } 1814 1815 public static ResourcePermissionPersistence getPersistence() { 1816 if (_persistence == null) { 1817 _persistence = (ResourcePermissionPersistence)PortalBeanLocatorUtil.locate(ResourcePermissionPersistence.class.getName()); 1818 1819 ReferenceRegistry.registerReference(ResourcePermissionUtil.class, 1820 "_persistence"); 1821 } 1822 1823 return _persistence; 1824 } 1825 1826 private static ResourcePermissionPersistence _persistence; 1827 }