001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.Role; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the role service. This utility wraps {@link RolePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see RolePersistence 036 * @see RolePersistenceImpl 037 * @generated 038 */ 039 public class RoleUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache(Role role) { 057 getPersistence().clearCache(role); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 064 throws SystemException { 065 return getPersistence().countWithDynamicQuery(dynamicQuery); 066 } 067 068 /** 069 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 070 */ 071 public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery) 072 throws SystemException { 073 return getPersistence().findWithDynamicQuery(dynamicQuery); 074 } 075 076 /** 077 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 078 */ 079 public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery, 080 int start, int end) throws SystemException { 081 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 082 } 083 084 /** 085 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 086 */ 087 public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery, 088 int start, int end, OrderByComparator orderByComparator) 089 throws SystemException { 090 return getPersistence() 091 .findWithDynamicQuery(dynamicQuery, start, end, 092 orderByComparator); 093 } 094 095 /** 096 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 097 */ 098 public static Role update(Role role, boolean merge) 099 throws SystemException { 100 return getPersistence().update(role, merge); 101 } 102 103 /** 104 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 105 */ 106 public static Role update(Role role, boolean merge, 107 ServiceContext serviceContext) throws SystemException { 108 return getPersistence().update(role, merge, serviceContext); 109 } 110 111 /** 112 * Caches the role in the entity cache if it is enabled. 113 * 114 * @param role the role 115 */ 116 public static void cacheResult(com.liferay.portal.model.Role role) { 117 getPersistence().cacheResult(role); 118 } 119 120 /** 121 * Caches the roles in the entity cache if it is enabled. 122 * 123 * @param roles the roles 124 */ 125 public static void cacheResult( 126 java.util.List<com.liferay.portal.model.Role> roles) { 127 getPersistence().cacheResult(roles); 128 } 129 130 /** 131 * Creates a new role with the primary key. Does not add the role to the database. 132 * 133 * @param roleId the primary key for the new role 134 * @return the new role 135 */ 136 public static com.liferay.portal.model.Role create(long roleId) { 137 return getPersistence().create(roleId); 138 } 139 140 /** 141 * Removes the role with the primary key from the database. Also notifies the appropriate model listeners. 142 * 143 * @param roleId the primary key of the role 144 * @return the role that was removed 145 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 146 * @throws SystemException if a system exception occurred 147 */ 148 public static com.liferay.portal.model.Role remove(long roleId) 149 throws com.liferay.portal.NoSuchRoleException, 150 com.liferay.portal.kernel.exception.SystemException { 151 return getPersistence().remove(roleId); 152 } 153 154 public static com.liferay.portal.model.Role updateImpl( 155 com.liferay.portal.model.Role role, boolean merge) 156 throws com.liferay.portal.kernel.exception.SystemException { 157 return getPersistence().updateImpl(role, merge); 158 } 159 160 /** 161 * Returns the role with the primary key or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found. 162 * 163 * @param roleId the primary key of the role 164 * @return the role 165 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 166 * @throws SystemException if a system exception occurred 167 */ 168 public static com.liferay.portal.model.Role findByPrimaryKey(long roleId) 169 throws com.liferay.portal.NoSuchRoleException, 170 com.liferay.portal.kernel.exception.SystemException { 171 return getPersistence().findByPrimaryKey(roleId); 172 } 173 174 /** 175 * Returns the role with the primary key or returns <code>null</code> if it could not be found. 176 * 177 * @param roleId the primary key of the role 178 * @return the role, or <code>null</code> if a role with the primary key could not be found 179 * @throws SystemException if a system exception occurred 180 */ 181 public static com.liferay.portal.model.Role fetchByPrimaryKey(long roleId) 182 throws com.liferay.portal.kernel.exception.SystemException { 183 return getPersistence().fetchByPrimaryKey(roleId); 184 } 185 186 /** 187 * Returns all the roles where companyId = ?. 188 * 189 * @param companyId the company ID 190 * @return the matching roles 191 * @throws SystemException if a system exception occurred 192 */ 193 public static java.util.List<com.liferay.portal.model.Role> findByCompanyId( 194 long companyId) 195 throws com.liferay.portal.kernel.exception.SystemException { 196 return getPersistence().findByCompanyId(companyId); 197 } 198 199 /** 200 * Returns a range of all the roles where companyId = ?. 201 * 202 * <p> 203 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 204 * </p> 205 * 206 * @param companyId the company ID 207 * @param start the lower bound of the range of roles 208 * @param end the upper bound of the range of roles (not inclusive) 209 * @return the range of matching roles 210 * @throws SystemException if a system exception occurred 211 */ 212 public static java.util.List<com.liferay.portal.model.Role> findByCompanyId( 213 long companyId, int start, int end) 214 throws com.liferay.portal.kernel.exception.SystemException { 215 return getPersistence().findByCompanyId(companyId, start, end); 216 } 217 218 /** 219 * Returns an ordered range of all the roles where companyId = ?. 220 * 221 * <p> 222 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 223 * </p> 224 * 225 * @param companyId the company ID 226 * @param start the lower bound of the range of roles 227 * @param end the upper bound of the range of roles (not inclusive) 228 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 229 * @return the ordered range of matching roles 230 * @throws SystemException if a system exception occurred 231 */ 232 public static java.util.List<com.liferay.portal.model.Role> findByCompanyId( 233 long companyId, int start, int end, 234 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 235 throws com.liferay.portal.kernel.exception.SystemException { 236 return getPersistence() 237 .findByCompanyId(companyId, start, end, orderByComparator); 238 } 239 240 /** 241 * Returns the first role in the ordered set where companyId = ?. 242 * 243 * @param companyId the company ID 244 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 245 * @return the first matching role 246 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 247 * @throws SystemException if a system exception occurred 248 */ 249 public static com.liferay.portal.model.Role findByCompanyId_First( 250 long companyId, 251 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 252 throws com.liferay.portal.NoSuchRoleException, 253 com.liferay.portal.kernel.exception.SystemException { 254 return getPersistence() 255 .findByCompanyId_First(companyId, orderByComparator); 256 } 257 258 /** 259 * Returns the first role in the ordered set where companyId = ?. 260 * 261 * @param companyId the company ID 262 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 263 * @return the first matching role, or <code>null</code> if a matching role could not be found 264 * @throws SystemException if a system exception occurred 265 */ 266 public static com.liferay.portal.model.Role fetchByCompanyId_First( 267 long companyId, 268 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 269 throws com.liferay.portal.kernel.exception.SystemException { 270 return getPersistence() 271 .fetchByCompanyId_First(companyId, orderByComparator); 272 } 273 274 /** 275 * Returns the last role in the ordered set where companyId = ?. 276 * 277 * @param companyId the company ID 278 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 279 * @return the last matching role 280 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 281 * @throws SystemException if a system exception occurred 282 */ 283 public static com.liferay.portal.model.Role findByCompanyId_Last( 284 long companyId, 285 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 286 throws com.liferay.portal.NoSuchRoleException, 287 com.liferay.portal.kernel.exception.SystemException { 288 return getPersistence() 289 .findByCompanyId_Last(companyId, orderByComparator); 290 } 291 292 /** 293 * Returns the last role in the ordered set where companyId = ?. 294 * 295 * @param companyId the company ID 296 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 297 * @return the last matching role, or <code>null</code> if a matching role could not be found 298 * @throws SystemException if a system exception occurred 299 */ 300 public static com.liferay.portal.model.Role fetchByCompanyId_Last( 301 long companyId, 302 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 303 throws com.liferay.portal.kernel.exception.SystemException { 304 return getPersistence() 305 .fetchByCompanyId_Last(companyId, orderByComparator); 306 } 307 308 /** 309 * Returns the roles before and after the current role in the ordered set where companyId = ?. 310 * 311 * @param roleId the primary key of the current role 312 * @param companyId the company ID 313 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 314 * @return the previous, current, and next role 315 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 316 * @throws SystemException if a system exception occurred 317 */ 318 public static com.liferay.portal.model.Role[] findByCompanyId_PrevAndNext( 319 long roleId, long companyId, 320 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 321 throws com.liferay.portal.NoSuchRoleException, 322 com.liferay.portal.kernel.exception.SystemException { 323 return getPersistence() 324 .findByCompanyId_PrevAndNext(roleId, companyId, 325 orderByComparator); 326 } 327 328 /** 329 * Returns all the roles that the user has permission to view where companyId = ?. 330 * 331 * @param companyId the company ID 332 * @return the matching roles that the user has permission to view 333 * @throws SystemException if a system exception occurred 334 */ 335 public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId( 336 long companyId) 337 throws com.liferay.portal.kernel.exception.SystemException { 338 return getPersistence().filterFindByCompanyId(companyId); 339 } 340 341 /** 342 * Returns a range of all the roles that the user has permission to view where companyId = ?. 343 * 344 * <p> 345 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 346 * </p> 347 * 348 * @param companyId the company ID 349 * @param start the lower bound of the range of roles 350 * @param end the upper bound of the range of roles (not inclusive) 351 * @return the range of matching roles that the user has permission to view 352 * @throws SystemException if a system exception occurred 353 */ 354 public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId( 355 long companyId, int start, int end) 356 throws com.liferay.portal.kernel.exception.SystemException { 357 return getPersistence().filterFindByCompanyId(companyId, start, end); 358 } 359 360 /** 361 * Returns an ordered range of all the roles that the user has permissions to view where companyId = ?. 362 * 363 * <p> 364 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 365 * </p> 366 * 367 * @param companyId the company ID 368 * @param start the lower bound of the range of roles 369 * @param end the upper bound of the range of roles (not inclusive) 370 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 371 * @return the ordered range of matching roles that the user has permission to view 372 * @throws SystemException if a system exception occurred 373 */ 374 public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId( 375 long companyId, int start, int end, 376 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 377 throws com.liferay.portal.kernel.exception.SystemException { 378 return getPersistence() 379 .filterFindByCompanyId(companyId, start, end, 380 orderByComparator); 381 } 382 383 /** 384 * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where companyId = ?. 385 * 386 * @param roleId the primary key of the current role 387 * @param companyId the company ID 388 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 389 * @return the previous, current, and next role 390 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 391 * @throws SystemException if a system exception occurred 392 */ 393 public static com.liferay.portal.model.Role[] filterFindByCompanyId_PrevAndNext( 394 long roleId, long companyId, 395 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 396 throws com.liferay.portal.NoSuchRoleException, 397 com.liferay.portal.kernel.exception.SystemException { 398 return getPersistence() 399 .filterFindByCompanyId_PrevAndNext(roleId, companyId, 400 orderByComparator); 401 } 402 403 /** 404 * Returns all the roles where name = ?. 405 * 406 * @param name the name 407 * @return the matching roles 408 * @throws SystemException if a system exception occurred 409 */ 410 public static java.util.List<com.liferay.portal.model.Role> findByName( 411 java.lang.String name) 412 throws com.liferay.portal.kernel.exception.SystemException { 413 return getPersistence().findByName(name); 414 } 415 416 /** 417 * Returns a range of all the roles where name = ?. 418 * 419 * <p> 420 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 421 * </p> 422 * 423 * @param name the name 424 * @param start the lower bound of the range of roles 425 * @param end the upper bound of the range of roles (not inclusive) 426 * @return the range of matching roles 427 * @throws SystemException if a system exception occurred 428 */ 429 public static java.util.List<com.liferay.portal.model.Role> findByName( 430 java.lang.String name, int start, int end) 431 throws com.liferay.portal.kernel.exception.SystemException { 432 return getPersistence().findByName(name, start, end); 433 } 434 435 /** 436 * Returns an ordered range of all the roles where name = ?. 437 * 438 * <p> 439 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 440 * </p> 441 * 442 * @param name the name 443 * @param start the lower bound of the range of roles 444 * @param end the upper bound of the range of roles (not inclusive) 445 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 446 * @return the ordered range of matching roles 447 * @throws SystemException if a system exception occurred 448 */ 449 public static java.util.List<com.liferay.portal.model.Role> findByName( 450 java.lang.String name, int start, int end, 451 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 452 throws com.liferay.portal.kernel.exception.SystemException { 453 return getPersistence().findByName(name, start, end, orderByComparator); 454 } 455 456 /** 457 * Returns the first role in the ordered set where name = ?. 458 * 459 * @param name the name 460 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 461 * @return the first matching role 462 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 463 * @throws SystemException if a system exception occurred 464 */ 465 public static com.liferay.portal.model.Role findByName_First( 466 java.lang.String name, 467 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 468 throws com.liferay.portal.NoSuchRoleException, 469 com.liferay.portal.kernel.exception.SystemException { 470 return getPersistence().findByName_First(name, orderByComparator); 471 } 472 473 /** 474 * Returns the first role in the ordered set where name = ?. 475 * 476 * @param name the name 477 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 478 * @return the first matching role, or <code>null</code> if a matching role could not be found 479 * @throws SystemException if a system exception occurred 480 */ 481 public static com.liferay.portal.model.Role fetchByName_First( 482 java.lang.String name, 483 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 484 throws com.liferay.portal.kernel.exception.SystemException { 485 return getPersistence().fetchByName_First(name, orderByComparator); 486 } 487 488 /** 489 * Returns the last role in the ordered set where name = ?. 490 * 491 * @param name the name 492 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 493 * @return the last matching role 494 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 495 * @throws SystemException if a system exception occurred 496 */ 497 public static com.liferay.portal.model.Role findByName_Last( 498 java.lang.String name, 499 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 500 throws com.liferay.portal.NoSuchRoleException, 501 com.liferay.portal.kernel.exception.SystemException { 502 return getPersistence().findByName_Last(name, orderByComparator); 503 } 504 505 /** 506 * Returns the last role in the ordered set where name = ?. 507 * 508 * @param name the name 509 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 510 * @return the last matching role, or <code>null</code> if a matching role could not be found 511 * @throws SystemException if a system exception occurred 512 */ 513 public static com.liferay.portal.model.Role fetchByName_Last( 514 java.lang.String name, 515 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 516 throws com.liferay.portal.kernel.exception.SystemException { 517 return getPersistence().fetchByName_Last(name, orderByComparator); 518 } 519 520 /** 521 * Returns the roles before and after the current role in the ordered set where name = ?. 522 * 523 * @param roleId the primary key of the current role 524 * @param name the name 525 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 526 * @return the previous, current, and next role 527 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 528 * @throws SystemException if a system exception occurred 529 */ 530 public static com.liferay.portal.model.Role[] findByName_PrevAndNext( 531 long roleId, java.lang.String name, 532 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 533 throws com.liferay.portal.NoSuchRoleException, 534 com.liferay.portal.kernel.exception.SystemException { 535 return getPersistence() 536 .findByName_PrevAndNext(roleId, name, orderByComparator); 537 } 538 539 /** 540 * Returns all the roles that the user has permission to view where name = ?. 541 * 542 * @param name the name 543 * @return the matching roles that the user has permission to view 544 * @throws SystemException if a system exception occurred 545 */ 546 public static java.util.List<com.liferay.portal.model.Role> filterFindByName( 547 java.lang.String name) 548 throws com.liferay.portal.kernel.exception.SystemException { 549 return getPersistence().filterFindByName(name); 550 } 551 552 /** 553 * Returns a range of all the roles that the user has permission to view where name = ?. 554 * 555 * <p> 556 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 557 * </p> 558 * 559 * @param name the name 560 * @param start the lower bound of the range of roles 561 * @param end the upper bound of the range of roles (not inclusive) 562 * @return the range of matching roles that the user has permission to view 563 * @throws SystemException if a system exception occurred 564 */ 565 public static java.util.List<com.liferay.portal.model.Role> filterFindByName( 566 java.lang.String name, int start, int end) 567 throws com.liferay.portal.kernel.exception.SystemException { 568 return getPersistence().filterFindByName(name, start, end); 569 } 570 571 /** 572 * Returns an ordered range of all the roles that the user has permissions to view where name = ?. 573 * 574 * <p> 575 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 576 * </p> 577 * 578 * @param name the name 579 * @param start the lower bound of the range of roles 580 * @param end the upper bound of the range of roles (not inclusive) 581 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 582 * @return the ordered range of matching roles that the user has permission to view 583 * @throws SystemException if a system exception occurred 584 */ 585 public static java.util.List<com.liferay.portal.model.Role> filterFindByName( 586 java.lang.String name, int start, int end, 587 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 588 throws com.liferay.portal.kernel.exception.SystemException { 589 return getPersistence() 590 .filterFindByName(name, start, end, orderByComparator); 591 } 592 593 /** 594 * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where name = ?. 595 * 596 * @param roleId the primary key of the current role 597 * @param name the name 598 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 599 * @return the previous, current, and next role 600 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 601 * @throws SystemException if a system exception occurred 602 */ 603 public static com.liferay.portal.model.Role[] filterFindByName_PrevAndNext( 604 long roleId, java.lang.String name, 605 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 606 throws com.liferay.portal.NoSuchRoleException, 607 com.liferay.portal.kernel.exception.SystemException { 608 return getPersistence() 609 .filterFindByName_PrevAndNext(roleId, name, orderByComparator); 610 } 611 612 /** 613 * Returns all the roles where subtype = ?. 614 * 615 * @param subtype the subtype 616 * @return the matching roles 617 * @throws SystemException if a system exception occurred 618 */ 619 public static java.util.List<com.liferay.portal.model.Role> findBySubtype( 620 java.lang.String subtype) 621 throws com.liferay.portal.kernel.exception.SystemException { 622 return getPersistence().findBySubtype(subtype); 623 } 624 625 /** 626 * Returns a range of all the roles where subtype = ?. 627 * 628 * <p> 629 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 630 * </p> 631 * 632 * @param subtype the subtype 633 * @param start the lower bound of the range of roles 634 * @param end the upper bound of the range of roles (not inclusive) 635 * @return the range of matching roles 636 * @throws SystemException if a system exception occurred 637 */ 638 public static java.util.List<com.liferay.portal.model.Role> findBySubtype( 639 java.lang.String subtype, int start, int end) 640 throws com.liferay.portal.kernel.exception.SystemException { 641 return getPersistence().findBySubtype(subtype, start, end); 642 } 643 644 /** 645 * Returns an ordered range of all the roles where subtype = ?. 646 * 647 * <p> 648 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 649 * </p> 650 * 651 * @param subtype the subtype 652 * @param start the lower bound of the range of roles 653 * @param end the upper bound of the range of roles (not inclusive) 654 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 655 * @return the ordered range of matching roles 656 * @throws SystemException if a system exception occurred 657 */ 658 public static java.util.List<com.liferay.portal.model.Role> findBySubtype( 659 java.lang.String subtype, int start, int end, 660 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 661 throws com.liferay.portal.kernel.exception.SystemException { 662 return getPersistence() 663 .findBySubtype(subtype, start, end, orderByComparator); 664 } 665 666 /** 667 * Returns the first role in the ordered set where subtype = ?. 668 * 669 * @param subtype the subtype 670 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 671 * @return the first matching role 672 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 673 * @throws SystemException if a system exception occurred 674 */ 675 public static com.liferay.portal.model.Role findBySubtype_First( 676 java.lang.String subtype, 677 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 678 throws com.liferay.portal.NoSuchRoleException, 679 com.liferay.portal.kernel.exception.SystemException { 680 return getPersistence().findBySubtype_First(subtype, orderByComparator); 681 } 682 683 /** 684 * Returns the first role in the ordered set where subtype = ?. 685 * 686 * @param subtype the subtype 687 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 688 * @return the first matching role, or <code>null</code> if a matching role could not be found 689 * @throws SystemException if a system exception occurred 690 */ 691 public static com.liferay.portal.model.Role fetchBySubtype_First( 692 java.lang.String subtype, 693 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 694 throws com.liferay.portal.kernel.exception.SystemException { 695 return getPersistence().fetchBySubtype_First(subtype, orderByComparator); 696 } 697 698 /** 699 * Returns the last role in the ordered set where subtype = ?. 700 * 701 * @param subtype the subtype 702 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 703 * @return the last matching role 704 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 705 * @throws SystemException if a system exception occurred 706 */ 707 public static com.liferay.portal.model.Role findBySubtype_Last( 708 java.lang.String subtype, 709 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 710 throws com.liferay.portal.NoSuchRoleException, 711 com.liferay.portal.kernel.exception.SystemException { 712 return getPersistence().findBySubtype_Last(subtype, orderByComparator); 713 } 714 715 /** 716 * Returns the last role in the ordered set where subtype = ?. 717 * 718 * @param subtype the subtype 719 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 720 * @return the last matching role, or <code>null</code> if a matching role could not be found 721 * @throws SystemException if a system exception occurred 722 */ 723 public static com.liferay.portal.model.Role fetchBySubtype_Last( 724 java.lang.String subtype, 725 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 726 throws com.liferay.portal.kernel.exception.SystemException { 727 return getPersistence().fetchBySubtype_Last(subtype, orderByComparator); 728 } 729 730 /** 731 * Returns the roles before and after the current role in the ordered set where subtype = ?. 732 * 733 * @param roleId the primary key of the current role 734 * @param subtype the subtype 735 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 736 * @return the previous, current, and next role 737 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 738 * @throws SystemException if a system exception occurred 739 */ 740 public static com.liferay.portal.model.Role[] findBySubtype_PrevAndNext( 741 long roleId, java.lang.String subtype, 742 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 743 throws com.liferay.portal.NoSuchRoleException, 744 com.liferay.portal.kernel.exception.SystemException { 745 return getPersistence() 746 .findBySubtype_PrevAndNext(roleId, subtype, orderByComparator); 747 } 748 749 /** 750 * Returns all the roles that the user has permission to view where subtype = ?. 751 * 752 * @param subtype the subtype 753 * @return the matching roles that the user has permission to view 754 * @throws SystemException if a system exception occurred 755 */ 756 public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype( 757 java.lang.String subtype) 758 throws com.liferay.portal.kernel.exception.SystemException { 759 return getPersistence().filterFindBySubtype(subtype); 760 } 761 762 /** 763 * Returns a range of all the roles that the user has permission to view where subtype = ?. 764 * 765 * <p> 766 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 767 * </p> 768 * 769 * @param subtype the subtype 770 * @param start the lower bound of the range of roles 771 * @param end the upper bound of the range of roles (not inclusive) 772 * @return the range of matching roles that the user has permission to view 773 * @throws SystemException if a system exception occurred 774 */ 775 public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype( 776 java.lang.String subtype, int start, int end) 777 throws com.liferay.portal.kernel.exception.SystemException { 778 return getPersistence().filterFindBySubtype(subtype, start, end); 779 } 780 781 /** 782 * Returns an ordered range of all the roles that the user has permissions to view where subtype = ?. 783 * 784 * <p> 785 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 786 * </p> 787 * 788 * @param subtype the subtype 789 * @param start the lower bound of the range of roles 790 * @param end the upper bound of the range of roles (not inclusive) 791 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 792 * @return the ordered range of matching roles that the user has permission to view 793 * @throws SystemException if a system exception occurred 794 */ 795 public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype( 796 java.lang.String subtype, int start, int end, 797 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 798 throws com.liferay.portal.kernel.exception.SystemException { 799 return getPersistence() 800 .filterFindBySubtype(subtype, start, end, orderByComparator); 801 } 802 803 /** 804 * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where subtype = ?. 805 * 806 * @param roleId the primary key of the current role 807 * @param subtype the subtype 808 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 809 * @return the previous, current, and next role 810 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 811 * @throws SystemException if a system exception occurred 812 */ 813 public static com.liferay.portal.model.Role[] filterFindBySubtype_PrevAndNext( 814 long roleId, java.lang.String subtype, 815 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 816 throws com.liferay.portal.NoSuchRoleException, 817 com.liferay.portal.kernel.exception.SystemException { 818 return getPersistence() 819 .filterFindBySubtype_PrevAndNext(roleId, subtype, 820 orderByComparator); 821 } 822 823 /** 824 * Returns the role where companyId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found. 825 * 826 * @param companyId the company ID 827 * @param name the name 828 * @return the matching role 829 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 830 * @throws SystemException if a system exception occurred 831 */ 832 public static com.liferay.portal.model.Role findByC_N(long companyId, 833 java.lang.String name) 834 throws com.liferay.portal.NoSuchRoleException, 835 com.liferay.portal.kernel.exception.SystemException { 836 return getPersistence().findByC_N(companyId, name); 837 } 838 839 /** 840 * Returns the role where companyId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 841 * 842 * @param companyId the company ID 843 * @param name the name 844 * @return the matching role, or <code>null</code> if a matching role could not be found 845 * @throws SystemException if a system exception occurred 846 */ 847 public static com.liferay.portal.model.Role fetchByC_N(long companyId, 848 java.lang.String name) 849 throws com.liferay.portal.kernel.exception.SystemException { 850 return getPersistence().fetchByC_N(companyId, name); 851 } 852 853 /** 854 * Returns the role where companyId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 855 * 856 * @param companyId the company ID 857 * @param name the name 858 * @param retrieveFromCache whether to use the finder cache 859 * @return the matching role, or <code>null</code> if a matching role could not be found 860 * @throws SystemException if a system exception occurred 861 */ 862 public static com.liferay.portal.model.Role fetchByC_N(long companyId, 863 java.lang.String name, boolean retrieveFromCache) 864 throws com.liferay.portal.kernel.exception.SystemException { 865 return getPersistence().fetchByC_N(companyId, name, retrieveFromCache); 866 } 867 868 /** 869 * Returns all the roles where type = ? and subtype = ?. 870 * 871 * @param type the type 872 * @param subtype the subtype 873 * @return the matching roles 874 * @throws SystemException if a system exception occurred 875 */ 876 public static java.util.List<com.liferay.portal.model.Role> findByT_S( 877 int type, java.lang.String subtype) 878 throws com.liferay.portal.kernel.exception.SystemException { 879 return getPersistence().findByT_S(type, subtype); 880 } 881 882 /** 883 * Returns a range of all the roles where type = ? and subtype = ?. 884 * 885 * <p> 886 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 887 * </p> 888 * 889 * @param type the type 890 * @param subtype the subtype 891 * @param start the lower bound of the range of roles 892 * @param end the upper bound of the range of roles (not inclusive) 893 * @return the range of matching roles 894 * @throws SystemException if a system exception occurred 895 */ 896 public static java.util.List<com.liferay.portal.model.Role> findByT_S( 897 int type, java.lang.String subtype, int start, int end) 898 throws com.liferay.portal.kernel.exception.SystemException { 899 return getPersistence().findByT_S(type, subtype, start, end); 900 } 901 902 /** 903 * Returns an ordered range of all the roles where type = ? and subtype = ?. 904 * 905 * <p> 906 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 907 * </p> 908 * 909 * @param type the type 910 * @param subtype the subtype 911 * @param start the lower bound of the range of roles 912 * @param end the upper bound of the range of roles (not inclusive) 913 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 914 * @return the ordered range of matching roles 915 * @throws SystemException if a system exception occurred 916 */ 917 public static java.util.List<com.liferay.portal.model.Role> findByT_S( 918 int type, java.lang.String subtype, int start, int end, 919 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 920 throws com.liferay.portal.kernel.exception.SystemException { 921 return getPersistence() 922 .findByT_S(type, subtype, start, end, orderByComparator); 923 } 924 925 /** 926 * Returns the first role in the ordered set where type = ? and subtype = ?. 927 * 928 * @param type the type 929 * @param subtype the subtype 930 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 931 * @return the first matching role 932 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 933 * @throws SystemException if a system exception occurred 934 */ 935 public static com.liferay.portal.model.Role findByT_S_First(int type, 936 java.lang.String subtype, 937 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 938 throws com.liferay.portal.NoSuchRoleException, 939 com.liferay.portal.kernel.exception.SystemException { 940 return getPersistence().findByT_S_First(type, subtype, orderByComparator); 941 } 942 943 /** 944 * Returns the first role in the ordered set where type = ? and subtype = ?. 945 * 946 * @param type the type 947 * @param subtype the subtype 948 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 949 * @return the first matching role, or <code>null</code> if a matching role could not be found 950 * @throws SystemException if a system exception occurred 951 */ 952 public static com.liferay.portal.model.Role fetchByT_S_First(int type, 953 java.lang.String subtype, 954 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 955 throws com.liferay.portal.kernel.exception.SystemException { 956 return getPersistence() 957 .fetchByT_S_First(type, subtype, orderByComparator); 958 } 959 960 /** 961 * Returns the last role in the ordered set where type = ? and subtype = ?. 962 * 963 * @param type the type 964 * @param subtype the subtype 965 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 966 * @return the last matching role 967 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 968 * @throws SystemException if a system exception occurred 969 */ 970 public static com.liferay.portal.model.Role findByT_S_Last(int type, 971 java.lang.String subtype, 972 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 973 throws com.liferay.portal.NoSuchRoleException, 974 com.liferay.portal.kernel.exception.SystemException { 975 return getPersistence().findByT_S_Last(type, subtype, orderByComparator); 976 } 977 978 /** 979 * Returns the last role in the ordered set where type = ? and subtype = ?. 980 * 981 * @param type the type 982 * @param subtype the subtype 983 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 984 * @return the last matching role, or <code>null</code> if a matching role could not be found 985 * @throws SystemException if a system exception occurred 986 */ 987 public static com.liferay.portal.model.Role fetchByT_S_Last(int type, 988 java.lang.String subtype, 989 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 990 throws com.liferay.portal.kernel.exception.SystemException { 991 return getPersistence().fetchByT_S_Last(type, subtype, orderByComparator); 992 } 993 994 /** 995 * Returns the roles before and after the current role in the ordered set where type = ? and subtype = ?. 996 * 997 * @param roleId the primary key of the current role 998 * @param type the type 999 * @param subtype the subtype 1000 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1001 * @return the previous, current, and next role 1002 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 1003 * @throws SystemException if a system exception occurred 1004 */ 1005 public static com.liferay.portal.model.Role[] findByT_S_PrevAndNext( 1006 long roleId, int type, java.lang.String subtype, 1007 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1008 throws com.liferay.portal.NoSuchRoleException, 1009 com.liferay.portal.kernel.exception.SystemException { 1010 return getPersistence() 1011 .findByT_S_PrevAndNext(roleId, type, subtype, 1012 orderByComparator); 1013 } 1014 1015 /** 1016 * Returns all the roles that the user has permission to view where type = ? and subtype = ?. 1017 * 1018 * @param type the type 1019 * @param subtype the subtype 1020 * @return the matching roles that the user has permission to view 1021 * @throws SystemException if a system exception occurred 1022 */ 1023 public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S( 1024 int type, java.lang.String subtype) 1025 throws com.liferay.portal.kernel.exception.SystemException { 1026 return getPersistence().filterFindByT_S(type, subtype); 1027 } 1028 1029 /** 1030 * Returns a range of all the roles that the user has permission to view where type = ? and subtype = ?. 1031 * 1032 * <p> 1033 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 1034 * </p> 1035 * 1036 * @param type the type 1037 * @param subtype the subtype 1038 * @param start the lower bound of the range of roles 1039 * @param end the upper bound of the range of roles (not inclusive) 1040 * @return the range of matching roles that the user has permission to view 1041 * @throws SystemException if a system exception occurred 1042 */ 1043 public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S( 1044 int type, java.lang.String subtype, int start, int end) 1045 throws com.liferay.portal.kernel.exception.SystemException { 1046 return getPersistence().filterFindByT_S(type, subtype, start, end); 1047 } 1048 1049 /** 1050 * Returns an ordered range of all the roles that the user has permissions to view where type = ? and subtype = ?. 1051 * 1052 * <p> 1053 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 1054 * </p> 1055 * 1056 * @param type the type 1057 * @param subtype the subtype 1058 * @param start the lower bound of the range of roles 1059 * @param end the upper bound of the range of roles (not inclusive) 1060 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1061 * @return the ordered range of matching roles that the user has permission to view 1062 * @throws SystemException if a system exception occurred 1063 */ 1064 public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S( 1065 int type, java.lang.String subtype, int start, int end, 1066 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1067 throws com.liferay.portal.kernel.exception.SystemException { 1068 return getPersistence() 1069 .filterFindByT_S(type, subtype, start, end, orderByComparator); 1070 } 1071 1072 /** 1073 * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where type = ? and subtype = ?. 1074 * 1075 * @param roleId the primary key of the current role 1076 * @param type the type 1077 * @param subtype the subtype 1078 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1079 * @return the previous, current, and next role 1080 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 1081 * @throws SystemException if a system exception occurred 1082 */ 1083 public static com.liferay.portal.model.Role[] filterFindByT_S_PrevAndNext( 1084 long roleId, int type, java.lang.String subtype, 1085 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1086 throws com.liferay.portal.NoSuchRoleException, 1087 com.liferay.portal.kernel.exception.SystemException { 1088 return getPersistence() 1089 .filterFindByT_S_PrevAndNext(roleId, type, subtype, 1090 orderByComparator); 1091 } 1092 1093 /** 1094 * Returns the role where companyId = ? and classNameId = ? and classPK = ? or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found. 1095 * 1096 * @param companyId the company ID 1097 * @param classNameId the class name ID 1098 * @param classPK the class p k 1099 * @return the matching role 1100 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 1101 * @throws SystemException if a system exception occurred 1102 */ 1103 public static com.liferay.portal.model.Role findByC_C_C(long companyId, 1104 long classNameId, long classPK) 1105 throws com.liferay.portal.NoSuchRoleException, 1106 com.liferay.portal.kernel.exception.SystemException { 1107 return getPersistence().findByC_C_C(companyId, classNameId, classPK); 1108 } 1109 1110 /** 1111 * Returns the role where companyId = ? and classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 1112 * 1113 * @param companyId the company ID 1114 * @param classNameId the class name ID 1115 * @param classPK the class p k 1116 * @return the matching role, or <code>null</code> if a matching role could not be found 1117 * @throws SystemException if a system exception occurred 1118 */ 1119 public static com.liferay.portal.model.Role fetchByC_C_C(long companyId, 1120 long classNameId, long classPK) 1121 throws com.liferay.portal.kernel.exception.SystemException { 1122 return getPersistence().fetchByC_C_C(companyId, classNameId, classPK); 1123 } 1124 1125 /** 1126 * Returns the role where companyId = ? and classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 1127 * 1128 * @param companyId the company ID 1129 * @param classNameId the class name ID 1130 * @param classPK the class p k 1131 * @param retrieveFromCache whether to use the finder cache 1132 * @return the matching role, or <code>null</code> if a matching role could not be found 1133 * @throws SystemException if a system exception occurred 1134 */ 1135 public static com.liferay.portal.model.Role fetchByC_C_C(long companyId, 1136 long classNameId, long classPK, boolean retrieveFromCache) 1137 throws com.liferay.portal.kernel.exception.SystemException { 1138 return getPersistence() 1139 .fetchByC_C_C(companyId, classNameId, classPK, 1140 retrieveFromCache); 1141 } 1142 1143 /** 1144 * Returns all the roles. 1145 * 1146 * @return the roles 1147 * @throws SystemException if a system exception occurred 1148 */ 1149 public static java.util.List<com.liferay.portal.model.Role> findAll() 1150 throws com.liferay.portal.kernel.exception.SystemException { 1151 return getPersistence().findAll(); 1152 } 1153 1154 /** 1155 * Returns a range of all the roles. 1156 * 1157 * <p> 1158 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 1159 * </p> 1160 * 1161 * @param start the lower bound of the range of roles 1162 * @param end the upper bound of the range of roles (not inclusive) 1163 * @return the range of roles 1164 * @throws SystemException if a system exception occurred 1165 */ 1166 public static java.util.List<com.liferay.portal.model.Role> findAll( 1167 int start, int end) 1168 throws com.liferay.portal.kernel.exception.SystemException { 1169 return getPersistence().findAll(start, end); 1170 } 1171 1172 /** 1173 * Returns an ordered range of all the roles. 1174 * 1175 * <p> 1176 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 1177 * </p> 1178 * 1179 * @param start the lower bound of the range of roles 1180 * @param end the upper bound of the range of roles (not inclusive) 1181 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1182 * @return the ordered range of roles 1183 * @throws SystemException if a system exception occurred 1184 */ 1185 public static java.util.List<com.liferay.portal.model.Role> findAll( 1186 int start, int end, 1187 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1188 throws com.liferay.portal.kernel.exception.SystemException { 1189 return getPersistence().findAll(start, end, orderByComparator); 1190 } 1191 1192 /** 1193 * Removes all the roles where companyId = ? from the database. 1194 * 1195 * @param companyId the company ID 1196 * @throws SystemException if a system exception occurred 1197 */ 1198 public static void removeByCompanyId(long companyId) 1199 throws com.liferay.portal.kernel.exception.SystemException { 1200 getPersistence().removeByCompanyId(companyId); 1201 } 1202 1203 /** 1204 * Removes all the roles where name = ? from the database. 1205 * 1206 * @param name the name 1207 * @throws SystemException if a system exception occurred 1208 */ 1209 public static void removeByName(java.lang.String name) 1210 throws com.liferay.portal.kernel.exception.SystemException { 1211 getPersistence().removeByName(name); 1212 } 1213 1214 /** 1215 * Removes all the roles where subtype = ? from the database. 1216 * 1217 * @param subtype the subtype 1218 * @throws SystemException if a system exception occurred 1219 */ 1220 public static void removeBySubtype(java.lang.String subtype) 1221 throws com.liferay.portal.kernel.exception.SystemException { 1222 getPersistence().removeBySubtype(subtype); 1223 } 1224 1225 /** 1226 * Removes the role where companyId = ? and name = ? from the database. 1227 * 1228 * @param companyId the company ID 1229 * @param name the name 1230 * @return the role that was removed 1231 * @throws SystemException if a system exception occurred 1232 */ 1233 public static com.liferay.portal.model.Role removeByC_N(long companyId, 1234 java.lang.String name) 1235 throws com.liferay.portal.NoSuchRoleException, 1236 com.liferay.portal.kernel.exception.SystemException { 1237 return getPersistence().removeByC_N(companyId, name); 1238 } 1239 1240 /** 1241 * Removes all the roles where type = ? and subtype = ? from the database. 1242 * 1243 * @param type the type 1244 * @param subtype the subtype 1245 * @throws SystemException if a system exception occurred 1246 */ 1247 public static void removeByT_S(int type, java.lang.String subtype) 1248 throws com.liferay.portal.kernel.exception.SystemException { 1249 getPersistence().removeByT_S(type, subtype); 1250 } 1251 1252 /** 1253 * Removes the role where companyId = ? and classNameId = ? and classPK = ? from the database. 1254 * 1255 * @param companyId the company ID 1256 * @param classNameId the class name ID 1257 * @param classPK the class p k 1258 * @return the role that was removed 1259 * @throws SystemException if a system exception occurred 1260 */ 1261 public static com.liferay.portal.model.Role removeByC_C_C(long companyId, 1262 long classNameId, long classPK) 1263 throws com.liferay.portal.NoSuchRoleException, 1264 com.liferay.portal.kernel.exception.SystemException { 1265 return getPersistence().removeByC_C_C(companyId, classNameId, classPK); 1266 } 1267 1268 /** 1269 * Removes all the roles from the database. 1270 * 1271 * @throws SystemException if a system exception occurred 1272 */ 1273 public static void removeAll() 1274 throws com.liferay.portal.kernel.exception.SystemException { 1275 getPersistence().removeAll(); 1276 } 1277 1278 /** 1279 * Returns the number of roles where companyId = ?. 1280 * 1281 * @param companyId the company ID 1282 * @return the number of matching roles 1283 * @throws SystemException if a system exception occurred 1284 */ 1285 public static int countByCompanyId(long companyId) 1286 throws com.liferay.portal.kernel.exception.SystemException { 1287 return getPersistence().countByCompanyId(companyId); 1288 } 1289 1290 /** 1291 * Returns the number of roles that the user has permission to view where companyId = ?. 1292 * 1293 * @param companyId the company ID 1294 * @return the number of matching roles that the user has permission to view 1295 * @throws SystemException if a system exception occurred 1296 */ 1297 public static int filterCountByCompanyId(long companyId) 1298 throws com.liferay.portal.kernel.exception.SystemException { 1299 return getPersistence().filterCountByCompanyId(companyId); 1300 } 1301 1302 /** 1303 * Returns the number of roles where name = ?. 1304 * 1305 * @param name the name 1306 * @return the number of matching roles 1307 * @throws SystemException if a system exception occurred 1308 */ 1309 public static int countByName(java.lang.String name) 1310 throws com.liferay.portal.kernel.exception.SystemException { 1311 return getPersistence().countByName(name); 1312 } 1313 1314 /** 1315 * Returns the number of roles that the user has permission to view where name = ?. 1316 * 1317 * @param name the name 1318 * @return the number of matching roles that the user has permission to view 1319 * @throws SystemException if a system exception occurred 1320 */ 1321 public static int filterCountByName(java.lang.String name) 1322 throws com.liferay.portal.kernel.exception.SystemException { 1323 return getPersistence().filterCountByName(name); 1324 } 1325 1326 /** 1327 * Returns the number of roles where subtype = ?. 1328 * 1329 * @param subtype the subtype 1330 * @return the number of matching roles 1331 * @throws SystemException if a system exception occurred 1332 */ 1333 public static int countBySubtype(java.lang.String subtype) 1334 throws com.liferay.portal.kernel.exception.SystemException { 1335 return getPersistence().countBySubtype(subtype); 1336 } 1337 1338 /** 1339 * Returns the number of roles that the user has permission to view where subtype = ?. 1340 * 1341 * @param subtype the subtype 1342 * @return the number of matching roles that the user has permission to view 1343 * @throws SystemException if a system exception occurred 1344 */ 1345 public static int filterCountBySubtype(java.lang.String subtype) 1346 throws com.liferay.portal.kernel.exception.SystemException { 1347 return getPersistence().filterCountBySubtype(subtype); 1348 } 1349 1350 /** 1351 * Returns the number of roles where companyId = ? and name = ?. 1352 * 1353 * @param companyId the company ID 1354 * @param name the name 1355 * @return the number of matching roles 1356 * @throws SystemException if a system exception occurred 1357 */ 1358 public static int countByC_N(long companyId, java.lang.String name) 1359 throws com.liferay.portal.kernel.exception.SystemException { 1360 return getPersistence().countByC_N(companyId, name); 1361 } 1362 1363 /** 1364 * Returns the number of roles where type = ? and subtype = ?. 1365 * 1366 * @param type the type 1367 * @param subtype the subtype 1368 * @return the number of matching roles 1369 * @throws SystemException if a system exception occurred 1370 */ 1371 public static int countByT_S(int type, java.lang.String subtype) 1372 throws com.liferay.portal.kernel.exception.SystemException { 1373 return getPersistence().countByT_S(type, subtype); 1374 } 1375 1376 /** 1377 * Returns the number of roles that the user has permission to view where type = ? and subtype = ?. 1378 * 1379 * @param type the type 1380 * @param subtype the subtype 1381 * @return the number of matching roles that the user has permission to view 1382 * @throws SystemException if a system exception occurred 1383 */ 1384 public static int filterCountByT_S(int type, java.lang.String subtype) 1385 throws com.liferay.portal.kernel.exception.SystemException { 1386 return getPersistence().filterCountByT_S(type, subtype); 1387 } 1388 1389 /** 1390 * Returns the number of roles where companyId = ? and classNameId = ? and classPK = ?. 1391 * 1392 * @param companyId the company ID 1393 * @param classNameId the class name ID 1394 * @param classPK the class p k 1395 * @return the number of matching roles 1396 * @throws SystemException if a system exception occurred 1397 */ 1398 public static int countByC_C_C(long companyId, long classNameId, 1399 long classPK) 1400 throws com.liferay.portal.kernel.exception.SystemException { 1401 return getPersistence().countByC_C_C(companyId, classNameId, classPK); 1402 } 1403 1404 /** 1405 * Returns the number of roles. 1406 * 1407 * @return the number of roles 1408 * @throws SystemException if a system exception occurred 1409 */ 1410 public static int countAll() 1411 throws com.liferay.portal.kernel.exception.SystemException { 1412 return getPersistence().countAll(); 1413 } 1414 1415 /** 1416 * Returns all the groups associated with the role. 1417 * 1418 * @param pk the primary key of the role 1419 * @return the groups associated with the role 1420 * @throws SystemException if a system exception occurred 1421 */ 1422 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1423 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1424 return getPersistence().getGroups(pk); 1425 } 1426 1427 /** 1428 * Returns a range of all the groups associated with the role. 1429 * 1430 * <p> 1431 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 1432 * </p> 1433 * 1434 * @param pk the primary key of the role 1435 * @param start the lower bound of the range of roles 1436 * @param end the upper bound of the range of roles (not inclusive) 1437 * @return the range of groups associated with the role 1438 * @throws SystemException if a system exception occurred 1439 */ 1440 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1441 long pk, int start, int end) 1442 throws com.liferay.portal.kernel.exception.SystemException { 1443 return getPersistence().getGroups(pk, start, end); 1444 } 1445 1446 /** 1447 * Returns an ordered range of all the groups associated with the role. 1448 * 1449 * <p> 1450 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 1451 * </p> 1452 * 1453 * @param pk the primary key of the role 1454 * @param start the lower bound of the range of roles 1455 * @param end the upper bound of the range of roles (not inclusive) 1456 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1457 * @return the ordered range of groups associated with the role 1458 * @throws SystemException if a system exception occurred 1459 */ 1460 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1461 long pk, int start, int end, 1462 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1463 throws com.liferay.portal.kernel.exception.SystemException { 1464 return getPersistence().getGroups(pk, start, end, orderByComparator); 1465 } 1466 1467 /** 1468 * Returns the number of groups associated with the role. 1469 * 1470 * @param pk the primary key of the role 1471 * @return the number of groups associated with the role 1472 * @throws SystemException if a system exception occurred 1473 */ 1474 public static int getGroupsSize(long pk) 1475 throws com.liferay.portal.kernel.exception.SystemException { 1476 return getPersistence().getGroupsSize(pk); 1477 } 1478 1479 /** 1480 * Returns <code>true</code> if the group is associated with the role. 1481 * 1482 * @param pk the primary key of the role 1483 * @param groupPK the primary key of the group 1484 * @return <code>true</code> if the group is associated with the role; <code>false</code> otherwise 1485 * @throws SystemException if a system exception occurred 1486 */ 1487 public static boolean containsGroup(long pk, long groupPK) 1488 throws com.liferay.portal.kernel.exception.SystemException { 1489 return getPersistence().containsGroup(pk, groupPK); 1490 } 1491 1492 /** 1493 * Returns <code>true</code> if the role has any groups associated with it. 1494 * 1495 * @param pk the primary key of the role to check for associations with groups 1496 * @return <code>true</code> if the role has any groups associated with it; <code>false</code> otherwise 1497 * @throws SystemException if a system exception occurred 1498 */ 1499 public static boolean containsGroups(long pk) 1500 throws com.liferay.portal.kernel.exception.SystemException { 1501 return getPersistence().containsGroups(pk); 1502 } 1503 1504 /** 1505 * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1506 * 1507 * @param pk the primary key of the role 1508 * @param groupPK the primary key of the group 1509 * @throws SystemException if a system exception occurred 1510 */ 1511 public static void addGroup(long pk, long groupPK) 1512 throws com.liferay.portal.kernel.exception.SystemException { 1513 getPersistence().addGroup(pk, groupPK); 1514 } 1515 1516 /** 1517 * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1518 * 1519 * @param pk the primary key of the role 1520 * @param group the group 1521 * @throws SystemException if a system exception occurred 1522 */ 1523 public static void addGroup(long pk, com.liferay.portal.model.Group group) 1524 throws com.liferay.portal.kernel.exception.SystemException { 1525 getPersistence().addGroup(pk, group); 1526 } 1527 1528 /** 1529 * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1530 * 1531 * @param pk the primary key of the role 1532 * @param groupPKs the primary keys of the groups 1533 * @throws SystemException if a system exception occurred 1534 */ 1535 public static void addGroups(long pk, long[] groupPKs) 1536 throws com.liferay.portal.kernel.exception.SystemException { 1537 getPersistence().addGroups(pk, groupPKs); 1538 } 1539 1540 /** 1541 * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1542 * 1543 * @param pk the primary key of the role 1544 * @param groups the groups 1545 * @throws SystemException if a system exception occurred 1546 */ 1547 public static void addGroups(long pk, 1548 java.util.List<com.liferay.portal.model.Group> groups) 1549 throws com.liferay.portal.kernel.exception.SystemException { 1550 getPersistence().addGroups(pk, groups); 1551 } 1552 1553 /** 1554 * Clears all associations between the role and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1555 * 1556 * @param pk the primary key of the role to clear the associated groups from 1557 * @throws SystemException if a system exception occurred 1558 */ 1559 public static void clearGroups(long pk) 1560 throws com.liferay.portal.kernel.exception.SystemException { 1561 getPersistence().clearGroups(pk); 1562 } 1563 1564 /** 1565 * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1566 * 1567 * @param pk the primary key of the role 1568 * @param groupPK the primary key of the group 1569 * @throws SystemException if a system exception occurred 1570 */ 1571 public static void removeGroup(long pk, long groupPK) 1572 throws com.liferay.portal.kernel.exception.SystemException { 1573 getPersistence().removeGroup(pk, groupPK); 1574 } 1575 1576 /** 1577 * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1578 * 1579 * @param pk the primary key of the role 1580 * @param group the group 1581 * @throws SystemException if a system exception occurred 1582 */ 1583 public static void removeGroup(long pk, com.liferay.portal.model.Group group) 1584 throws com.liferay.portal.kernel.exception.SystemException { 1585 getPersistence().removeGroup(pk, group); 1586 } 1587 1588 /** 1589 * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1590 * 1591 * @param pk the primary key of the role 1592 * @param groupPKs the primary keys of the groups 1593 * @throws SystemException if a system exception occurred 1594 */ 1595 public static void removeGroups(long pk, long[] groupPKs) 1596 throws com.liferay.portal.kernel.exception.SystemException { 1597 getPersistence().removeGroups(pk, groupPKs); 1598 } 1599 1600 /** 1601 * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1602 * 1603 * @param pk the primary key of the role 1604 * @param groups the groups 1605 * @throws SystemException if a system exception occurred 1606 */ 1607 public static void removeGroups(long pk, 1608 java.util.List<com.liferay.portal.model.Group> groups) 1609 throws com.liferay.portal.kernel.exception.SystemException { 1610 getPersistence().removeGroups(pk, groups); 1611 } 1612 1613 /** 1614 * Sets the groups associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1615 * 1616 * @param pk the primary key of the role 1617 * @param groupPKs the primary keys of the groups to be associated with the role 1618 * @throws SystemException if a system exception occurred 1619 */ 1620 public static void setGroups(long pk, long[] groupPKs) 1621 throws com.liferay.portal.kernel.exception.SystemException { 1622 getPersistence().setGroups(pk, groupPKs); 1623 } 1624 1625 /** 1626 * Sets the groups associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1627 * 1628 * @param pk the primary key of the role 1629 * @param groups the groups to be associated with the role 1630 * @throws SystemException if a system exception occurred 1631 */ 1632 public static void setGroups(long pk, 1633 java.util.List<com.liferay.portal.model.Group> groups) 1634 throws com.liferay.portal.kernel.exception.SystemException { 1635 getPersistence().setGroups(pk, groups); 1636 } 1637 1638 /** 1639 * Returns all the permissions associated with the role. 1640 * 1641 * @param pk the primary key of the role 1642 * @return the permissions associated with the role 1643 * @throws SystemException if a system exception occurred 1644 */ 1645 public static java.util.List<com.liferay.portal.model.Permission> getPermissions( 1646 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1647 return getPersistence().getPermissions(pk); 1648 } 1649 1650 /** 1651 * Returns a range of all the permissions associated with the role. 1652 * 1653 * <p> 1654 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 1655 * </p> 1656 * 1657 * @param pk the primary key of the role 1658 * @param start the lower bound of the range of roles 1659 * @param end the upper bound of the range of roles (not inclusive) 1660 * @return the range of permissions associated with the role 1661 * @throws SystemException if a system exception occurred 1662 */ 1663 public static java.util.List<com.liferay.portal.model.Permission> getPermissions( 1664 long pk, int start, int end) 1665 throws com.liferay.portal.kernel.exception.SystemException { 1666 return getPersistence().getPermissions(pk, start, end); 1667 } 1668 1669 /** 1670 * Returns an ordered range of all the permissions associated with the role. 1671 * 1672 * <p> 1673 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 1674 * </p> 1675 * 1676 * @param pk the primary key of the role 1677 * @param start the lower bound of the range of roles 1678 * @param end the upper bound of the range of roles (not inclusive) 1679 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1680 * @return the ordered range of permissions associated with the role 1681 * @throws SystemException if a system exception occurred 1682 */ 1683 public static java.util.List<com.liferay.portal.model.Permission> getPermissions( 1684 long pk, int start, int end, 1685 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1686 throws com.liferay.portal.kernel.exception.SystemException { 1687 return getPersistence().getPermissions(pk, start, end, orderByComparator); 1688 } 1689 1690 /** 1691 * Returns the number of permissions associated with the role. 1692 * 1693 * @param pk the primary key of the role 1694 * @return the number of permissions associated with the role 1695 * @throws SystemException if a system exception occurred 1696 */ 1697 public static int getPermissionsSize(long pk) 1698 throws com.liferay.portal.kernel.exception.SystemException { 1699 return getPersistence().getPermissionsSize(pk); 1700 } 1701 1702 /** 1703 * Returns <code>true</code> if the permission is associated with the role. 1704 * 1705 * @param pk the primary key of the role 1706 * @param permissionPK the primary key of the permission 1707 * @return <code>true</code> if the permission is associated with the role; <code>false</code> otherwise 1708 * @throws SystemException if a system exception occurred 1709 */ 1710 public static boolean containsPermission(long pk, long permissionPK) 1711 throws com.liferay.portal.kernel.exception.SystemException { 1712 return getPersistence().containsPermission(pk, permissionPK); 1713 } 1714 1715 /** 1716 * Returns <code>true</code> if the role has any permissions associated with it. 1717 * 1718 * @param pk the primary key of the role to check for associations with permissions 1719 * @return <code>true</code> if the role has any permissions associated with it; <code>false</code> otherwise 1720 * @throws SystemException if a system exception occurred 1721 */ 1722 public static boolean containsPermissions(long pk) 1723 throws com.liferay.portal.kernel.exception.SystemException { 1724 return getPersistence().containsPermissions(pk); 1725 } 1726 1727 /** 1728 * Adds an association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1729 * 1730 * @param pk the primary key of the role 1731 * @param permissionPK the primary key of the permission 1732 * @throws SystemException if a system exception occurred 1733 */ 1734 public static void addPermission(long pk, long permissionPK) 1735 throws com.liferay.portal.kernel.exception.SystemException { 1736 getPersistence().addPermission(pk, permissionPK); 1737 } 1738 1739 /** 1740 * Adds an association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1741 * 1742 * @param pk the primary key of the role 1743 * @param permission the permission 1744 * @throws SystemException if a system exception occurred 1745 */ 1746 public static void addPermission(long pk, 1747 com.liferay.portal.model.Permission permission) 1748 throws com.liferay.portal.kernel.exception.SystemException { 1749 getPersistence().addPermission(pk, permission); 1750 } 1751 1752 /** 1753 * Adds an association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1754 * 1755 * @param pk the primary key of the role 1756 * @param permissionPKs the primary keys of the permissions 1757 * @throws SystemException if a system exception occurred 1758 */ 1759 public static void addPermissions(long pk, long[] permissionPKs) 1760 throws com.liferay.portal.kernel.exception.SystemException { 1761 getPersistence().addPermissions(pk, permissionPKs); 1762 } 1763 1764 /** 1765 * Adds an association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1766 * 1767 * @param pk the primary key of the role 1768 * @param permissions the permissions 1769 * @throws SystemException if a system exception occurred 1770 */ 1771 public static void addPermissions(long pk, 1772 java.util.List<com.liferay.portal.model.Permission> permissions) 1773 throws com.liferay.portal.kernel.exception.SystemException { 1774 getPersistence().addPermissions(pk, permissions); 1775 } 1776 1777 /** 1778 * Clears all associations between the role and its permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1779 * 1780 * @param pk the primary key of the role to clear the associated permissions from 1781 * @throws SystemException if a system exception occurred 1782 */ 1783 public static void clearPermissions(long pk) 1784 throws com.liferay.portal.kernel.exception.SystemException { 1785 getPersistence().clearPermissions(pk); 1786 } 1787 1788 /** 1789 * Removes the association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1790 * 1791 * @param pk the primary key of the role 1792 * @param permissionPK the primary key of the permission 1793 * @throws SystemException if a system exception occurred 1794 */ 1795 public static void removePermission(long pk, long permissionPK) 1796 throws com.liferay.portal.kernel.exception.SystemException { 1797 getPersistence().removePermission(pk, permissionPK); 1798 } 1799 1800 /** 1801 * Removes the association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1802 * 1803 * @param pk the primary key of the role 1804 * @param permission the permission 1805 * @throws SystemException if a system exception occurred 1806 */ 1807 public static void removePermission(long pk, 1808 com.liferay.portal.model.Permission permission) 1809 throws com.liferay.portal.kernel.exception.SystemException { 1810 getPersistence().removePermission(pk, permission); 1811 } 1812 1813 /** 1814 * Removes the association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1815 * 1816 * @param pk the primary key of the role 1817 * @param permissionPKs the primary keys of the permissions 1818 * @throws SystemException if a system exception occurred 1819 */ 1820 public static void removePermissions(long pk, long[] permissionPKs) 1821 throws com.liferay.portal.kernel.exception.SystemException { 1822 getPersistence().removePermissions(pk, permissionPKs); 1823 } 1824 1825 /** 1826 * Removes the association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1827 * 1828 * @param pk the primary key of the role 1829 * @param permissions the permissions 1830 * @throws SystemException if a system exception occurred 1831 */ 1832 public static void removePermissions(long pk, 1833 java.util.List<com.liferay.portal.model.Permission> permissions) 1834 throws com.liferay.portal.kernel.exception.SystemException { 1835 getPersistence().removePermissions(pk, permissions); 1836 } 1837 1838 /** 1839 * Sets the permissions associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1840 * 1841 * @param pk the primary key of the role 1842 * @param permissionPKs the primary keys of the permissions to be associated with the role 1843 * @throws SystemException if a system exception occurred 1844 */ 1845 public static void setPermissions(long pk, long[] permissionPKs) 1846 throws com.liferay.portal.kernel.exception.SystemException { 1847 getPersistence().setPermissions(pk, permissionPKs); 1848 } 1849 1850 /** 1851 * Sets the permissions associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1852 * 1853 * @param pk the primary key of the role 1854 * @param permissions the permissions to be associated with the role 1855 * @throws SystemException if a system exception occurred 1856 */ 1857 public static void setPermissions(long pk, 1858 java.util.List<com.liferay.portal.model.Permission> permissions) 1859 throws com.liferay.portal.kernel.exception.SystemException { 1860 getPersistence().setPermissions(pk, permissions); 1861 } 1862 1863 /** 1864 * Returns all the users associated with the role. 1865 * 1866 * @param pk the primary key of the role 1867 * @return the users associated with the role 1868 * @throws SystemException if a system exception occurred 1869 */ 1870 public static java.util.List<com.liferay.portal.model.User> getUsers( 1871 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1872 return getPersistence().getUsers(pk); 1873 } 1874 1875 /** 1876 * Returns a range of all the users associated with the role. 1877 * 1878 * <p> 1879 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 1880 * </p> 1881 * 1882 * @param pk the primary key of the role 1883 * @param start the lower bound of the range of roles 1884 * @param end the upper bound of the range of roles (not inclusive) 1885 * @return the range of users associated with the role 1886 * @throws SystemException if a system exception occurred 1887 */ 1888 public static java.util.List<com.liferay.portal.model.User> getUsers( 1889 long pk, int start, int end) 1890 throws com.liferay.portal.kernel.exception.SystemException { 1891 return getPersistence().getUsers(pk, start, end); 1892 } 1893 1894 /** 1895 * Returns an ordered range of all the users associated with the role. 1896 * 1897 * <p> 1898 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 1899 * </p> 1900 * 1901 * @param pk the primary key of the role 1902 * @param start the lower bound of the range of roles 1903 * @param end the upper bound of the range of roles (not inclusive) 1904 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1905 * @return the ordered range of users associated with the role 1906 * @throws SystemException if a system exception occurred 1907 */ 1908 public static java.util.List<com.liferay.portal.model.User> getUsers( 1909 long pk, int start, int end, 1910 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1911 throws com.liferay.portal.kernel.exception.SystemException { 1912 return getPersistence().getUsers(pk, start, end, orderByComparator); 1913 } 1914 1915 /** 1916 * Returns the number of users associated with the role. 1917 * 1918 * @param pk the primary key of the role 1919 * @return the number of users associated with the role 1920 * @throws SystemException if a system exception occurred 1921 */ 1922 public static int getUsersSize(long pk) 1923 throws com.liferay.portal.kernel.exception.SystemException { 1924 return getPersistence().getUsersSize(pk); 1925 } 1926 1927 /** 1928 * Returns <code>true</code> if the user is associated with the role. 1929 * 1930 * @param pk the primary key of the role 1931 * @param userPK the primary key of the user 1932 * @return <code>true</code> if the user is associated with the role; <code>false</code> otherwise 1933 * @throws SystemException if a system exception occurred 1934 */ 1935 public static boolean containsUser(long pk, long userPK) 1936 throws com.liferay.portal.kernel.exception.SystemException { 1937 return getPersistence().containsUser(pk, userPK); 1938 } 1939 1940 /** 1941 * Returns <code>true</code> if the role has any users associated with it. 1942 * 1943 * @param pk the primary key of the role to check for associations with users 1944 * @return <code>true</code> if the role has any users associated with it; <code>false</code> otherwise 1945 * @throws SystemException if a system exception occurred 1946 */ 1947 public static boolean containsUsers(long pk) 1948 throws com.liferay.portal.kernel.exception.SystemException { 1949 return getPersistence().containsUsers(pk); 1950 } 1951 1952 /** 1953 * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1954 * 1955 * @param pk the primary key of the role 1956 * @param userPK the primary key of the user 1957 * @throws SystemException if a system exception occurred 1958 */ 1959 public static void addUser(long pk, long userPK) 1960 throws com.liferay.portal.kernel.exception.SystemException { 1961 getPersistence().addUser(pk, userPK); 1962 } 1963 1964 /** 1965 * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1966 * 1967 * @param pk the primary key of the role 1968 * @param user the user 1969 * @throws SystemException if a system exception occurred 1970 */ 1971 public static void addUser(long pk, com.liferay.portal.model.User user) 1972 throws com.liferay.portal.kernel.exception.SystemException { 1973 getPersistence().addUser(pk, user); 1974 } 1975 1976 /** 1977 * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1978 * 1979 * @param pk the primary key of the role 1980 * @param userPKs the primary keys of the users 1981 * @throws SystemException if a system exception occurred 1982 */ 1983 public static void addUsers(long pk, long[] userPKs) 1984 throws com.liferay.portal.kernel.exception.SystemException { 1985 getPersistence().addUsers(pk, userPKs); 1986 } 1987 1988 /** 1989 * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1990 * 1991 * @param pk the primary key of the role 1992 * @param users the users 1993 * @throws SystemException if a system exception occurred 1994 */ 1995 public static void addUsers(long pk, 1996 java.util.List<com.liferay.portal.model.User> users) 1997 throws com.liferay.portal.kernel.exception.SystemException { 1998 getPersistence().addUsers(pk, users); 1999 } 2000 2001 /** 2002 * Clears all associations between the role and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2003 * 2004 * @param pk the primary key of the role to clear the associated users from 2005 * @throws SystemException if a system exception occurred 2006 */ 2007 public static void clearUsers(long pk) 2008 throws com.liferay.portal.kernel.exception.SystemException { 2009 getPersistence().clearUsers(pk); 2010 } 2011 2012 /** 2013 * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2014 * 2015 * @param pk the primary key of the role 2016 * @param userPK the primary key of the user 2017 * @throws SystemException if a system exception occurred 2018 */ 2019 public static void removeUser(long pk, long userPK) 2020 throws com.liferay.portal.kernel.exception.SystemException { 2021 getPersistence().removeUser(pk, userPK); 2022 } 2023 2024 /** 2025 * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2026 * 2027 * @param pk the primary key of the role 2028 * @param user the user 2029 * @throws SystemException if a system exception occurred 2030 */ 2031 public static void removeUser(long pk, com.liferay.portal.model.User user) 2032 throws com.liferay.portal.kernel.exception.SystemException { 2033 getPersistence().removeUser(pk, user); 2034 } 2035 2036 /** 2037 * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2038 * 2039 * @param pk the primary key of the role 2040 * @param userPKs the primary keys of the users 2041 * @throws SystemException if a system exception occurred 2042 */ 2043 public static void removeUsers(long pk, long[] userPKs) 2044 throws com.liferay.portal.kernel.exception.SystemException { 2045 getPersistence().removeUsers(pk, userPKs); 2046 } 2047 2048 /** 2049 * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2050 * 2051 * @param pk the primary key of the role 2052 * @param users the users 2053 * @throws SystemException if a system exception occurred 2054 */ 2055 public static void removeUsers(long pk, 2056 java.util.List<com.liferay.portal.model.User> users) 2057 throws com.liferay.portal.kernel.exception.SystemException { 2058 getPersistence().removeUsers(pk, users); 2059 } 2060 2061 /** 2062 * Sets the users associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2063 * 2064 * @param pk the primary key of the role 2065 * @param userPKs the primary keys of the users to be associated with the role 2066 * @throws SystemException if a system exception occurred 2067 */ 2068 public static void setUsers(long pk, long[] userPKs) 2069 throws com.liferay.portal.kernel.exception.SystemException { 2070 getPersistence().setUsers(pk, userPKs); 2071 } 2072 2073 /** 2074 * Sets the users associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2075 * 2076 * @param pk the primary key of the role 2077 * @param users the users to be associated with the role 2078 * @throws SystemException if a system exception occurred 2079 */ 2080 public static void setUsers(long pk, 2081 java.util.List<com.liferay.portal.model.User> users) 2082 throws com.liferay.portal.kernel.exception.SystemException { 2083 getPersistence().setUsers(pk, users); 2084 } 2085 2086 public static RolePersistence getPersistence() { 2087 if (_persistence == null) { 2088 _persistence = (RolePersistence)PortalBeanLocatorUtil.locate(RolePersistence.class.getName()); 2089 2090 ReferenceRegistry.registerReference(RoleUtil.class, "_persistence"); 2091 } 2092 2093 return _persistence; 2094 } 2095 2096 /** 2097 * @deprecated 2098 */ 2099 public void setPersistence(RolePersistence persistence) { 2100 } 2101 2102 private static RolePersistence _persistence; 2103 }