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