001 /** 002 * Copyright (c) 2000-2010 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.model.Role; 018 019 /** 020 * The persistence interface for the role service. 021 * 022 * <p> 023 * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface. 024 * </p> 025 * 026 * @author Brian Wing Shun Chan 027 * @see RolePersistenceImpl 028 * @see RoleUtil 029 * @generated 030 */ 031 public interface RolePersistence extends BasePersistence<Role> { 032 /** 033 * Caches the role in the entity cache if it is enabled. 034 * 035 * @param role the role to cache 036 */ 037 public void cacheResult(com.liferay.portal.model.Role role); 038 039 /** 040 * Caches the roles in the entity cache if it is enabled. 041 * 042 * @param roles the roles to cache 043 */ 044 public void cacheResult(java.util.List<com.liferay.portal.model.Role> roles); 045 046 /** 047 * Creates a new role with the primary key. 048 * 049 * @param roleId the primary key for the new role 050 * @return the new role 051 */ 052 public com.liferay.portal.model.Role create(long roleId); 053 054 /** 055 * Removes the role with the primary key from the database. Also notifies the appropriate model listeners. 056 * 057 * @param roleId the primary key of the role to remove 058 * @return the role that was removed 059 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 060 * @throws SystemException if a system exception occurred 061 */ 062 public com.liferay.portal.model.Role remove(long roleId) 063 throws com.liferay.portal.NoSuchRoleException, 064 com.liferay.portal.kernel.exception.SystemException; 065 066 public com.liferay.portal.model.Role updateImpl( 067 com.liferay.portal.model.Role role, boolean merge) 068 throws com.liferay.portal.kernel.exception.SystemException; 069 070 /** 071 * Finds the role with the primary key or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found. 072 * 073 * @param roleId the primary key of the role to find 074 * @return the role 075 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 076 * @throws SystemException if a system exception occurred 077 */ 078 public com.liferay.portal.model.Role findByPrimaryKey(long roleId) 079 throws com.liferay.portal.NoSuchRoleException, 080 com.liferay.portal.kernel.exception.SystemException; 081 082 /** 083 * Finds the role with the primary key or returns <code>null</code> if it could not be found. 084 * 085 * @param roleId the primary key of the role to find 086 * @return the role, or <code>null</code> if a role with the primary key could not be found 087 * @throws SystemException if a system exception occurred 088 */ 089 public com.liferay.portal.model.Role fetchByPrimaryKey(long roleId) 090 throws com.liferay.portal.kernel.exception.SystemException; 091 092 /** 093 * Finds all the roles where companyId = ?. 094 * 095 * @param companyId the company id to search with 096 * @return the matching roles 097 * @throws SystemException if a system exception occurred 098 */ 099 public java.util.List<com.liferay.portal.model.Role> findByCompanyId( 100 long companyId) 101 throws com.liferay.portal.kernel.exception.SystemException; 102 103 /** 104 * Finds a range of all the roles where companyId = ?. 105 * 106 * <p> 107 * 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. 108 * </p> 109 * 110 * @param companyId the company id to search with 111 * @param start the lower bound of the range of roles to return 112 * @param end the upper bound of the range of roles to return (not inclusive) 113 * @return the range of matching roles 114 * @throws SystemException if a system exception occurred 115 */ 116 public java.util.List<com.liferay.portal.model.Role> findByCompanyId( 117 long companyId, int start, int end) 118 throws com.liferay.portal.kernel.exception.SystemException; 119 120 /** 121 * Finds an ordered range of all the roles where companyId = ?. 122 * 123 * <p> 124 * 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. 125 * </p> 126 * 127 * @param companyId the company id to search with 128 * @param start the lower bound of the range of roles to return 129 * @param end the upper bound of the range of roles to return (not inclusive) 130 * @param orderByComparator the comparator to order the results by 131 * @return the ordered range of matching roles 132 * @throws SystemException if a system exception occurred 133 */ 134 public java.util.List<com.liferay.portal.model.Role> findByCompanyId( 135 long companyId, int start, int end, 136 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 137 throws com.liferay.portal.kernel.exception.SystemException; 138 139 /** 140 * Finds the first role in the ordered set where companyId = ?. 141 * 142 * <p> 143 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 144 * </p> 145 * 146 * @param companyId the company id to search with 147 * @param orderByComparator the comparator to order the set by 148 * @return the first matching role 149 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 public com.liferay.portal.model.Role findByCompanyId_First(long companyId, 153 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 154 throws com.liferay.portal.NoSuchRoleException, 155 com.liferay.portal.kernel.exception.SystemException; 156 157 /** 158 * Finds the last role in the ordered set where companyId = ?. 159 * 160 * <p> 161 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 162 * </p> 163 * 164 * @param companyId the company id to search with 165 * @param orderByComparator the comparator to order the set by 166 * @return the last matching role 167 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 168 * @throws SystemException if a system exception occurred 169 */ 170 public com.liferay.portal.model.Role findByCompanyId_Last(long companyId, 171 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 172 throws com.liferay.portal.NoSuchRoleException, 173 com.liferay.portal.kernel.exception.SystemException; 174 175 /** 176 * Finds the roles before and after the current role in the ordered set where companyId = ?. 177 * 178 * <p> 179 * 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. 180 * </p> 181 * 182 * @param roleId the primary key of the current role 183 * @param companyId the company id to search with 184 * @param orderByComparator the comparator to order the set by 185 * @return the previous, current, and next role 186 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 187 * @throws SystemException if a system exception occurred 188 */ 189 public com.liferay.portal.model.Role[] findByCompanyId_PrevAndNext( 190 long roleId, long companyId, 191 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 192 throws com.liferay.portal.NoSuchRoleException, 193 com.liferay.portal.kernel.exception.SystemException; 194 195 /** 196 * Finds all the roles where subtype = ?. 197 * 198 * @param subtype the subtype to search with 199 * @return the matching roles 200 * @throws SystemException if a system exception occurred 201 */ 202 public java.util.List<com.liferay.portal.model.Role> findBySubtype( 203 java.lang.String subtype) 204 throws com.liferay.portal.kernel.exception.SystemException; 205 206 /** 207 * Finds a range of all the roles where subtype = ?. 208 * 209 * <p> 210 * 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. 211 * </p> 212 * 213 * @param subtype the subtype to search with 214 * @param start the lower bound of the range of roles to return 215 * @param end the upper bound of the range of roles to return (not inclusive) 216 * @return the range of matching roles 217 * @throws SystemException if a system exception occurred 218 */ 219 public java.util.List<com.liferay.portal.model.Role> findBySubtype( 220 java.lang.String subtype, int start, int end) 221 throws com.liferay.portal.kernel.exception.SystemException; 222 223 /** 224 * Finds an ordered range of all the roles where subtype = ?. 225 * 226 * <p> 227 * 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. 228 * </p> 229 * 230 * @param subtype the subtype to search with 231 * @param start the lower bound of the range of roles to return 232 * @param end the upper bound of the range of roles to return (not inclusive) 233 * @param orderByComparator the comparator to order the results by 234 * @return the ordered range of matching roles 235 * @throws SystemException if a system exception occurred 236 */ 237 public java.util.List<com.liferay.portal.model.Role> findBySubtype( 238 java.lang.String subtype, int start, int end, 239 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 240 throws com.liferay.portal.kernel.exception.SystemException; 241 242 /** 243 * Finds the first role in the ordered set where subtype = ?. 244 * 245 * <p> 246 * 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. 247 * </p> 248 * 249 * @param subtype the subtype to search with 250 * @param orderByComparator the comparator to order the set by 251 * @return the first matching role 252 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 253 * @throws SystemException if a system exception occurred 254 */ 255 public com.liferay.portal.model.Role findBySubtype_First( 256 java.lang.String subtype, 257 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 258 throws com.liferay.portal.NoSuchRoleException, 259 com.liferay.portal.kernel.exception.SystemException; 260 261 /** 262 * Finds the last role in the ordered set where subtype = ?. 263 * 264 * <p> 265 * 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. 266 * </p> 267 * 268 * @param subtype the subtype to search with 269 * @param orderByComparator the comparator to order the set by 270 * @return the last matching role 271 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 272 * @throws SystemException if a system exception occurred 273 */ 274 public com.liferay.portal.model.Role findBySubtype_Last( 275 java.lang.String subtype, 276 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 277 throws com.liferay.portal.NoSuchRoleException, 278 com.liferay.portal.kernel.exception.SystemException; 279 280 /** 281 * Finds the roles before and after the current role in the ordered set where subtype = ?. 282 * 283 * <p> 284 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 285 * </p> 286 * 287 * @param roleId the primary key of the current role 288 * @param subtype the subtype to search with 289 * @param orderByComparator the comparator to order the set by 290 * @return the previous, current, and next role 291 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 292 * @throws SystemException if a system exception occurred 293 */ 294 public com.liferay.portal.model.Role[] findBySubtype_PrevAndNext( 295 long roleId, java.lang.String subtype, 296 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 297 throws com.liferay.portal.NoSuchRoleException, 298 com.liferay.portal.kernel.exception.SystemException; 299 300 /** 301 * Finds the role where companyId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found. 302 * 303 * @param companyId the company id to search with 304 * @param name the name to search with 305 * @return the matching role 306 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 307 * @throws SystemException if a system exception occurred 308 */ 309 public com.liferay.portal.model.Role findByC_N(long companyId, 310 java.lang.String name) 311 throws com.liferay.portal.NoSuchRoleException, 312 com.liferay.portal.kernel.exception.SystemException; 313 314 /** 315 * Finds the role where companyId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 316 * 317 * @param companyId the company id to search with 318 * @param name the name to search with 319 * @return the matching role, or <code>null</code> if a matching role could not be found 320 * @throws SystemException if a system exception occurred 321 */ 322 public com.liferay.portal.model.Role fetchByC_N(long companyId, 323 java.lang.String name) 324 throws com.liferay.portal.kernel.exception.SystemException; 325 326 /** 327 * Finds the role where companyId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 328 * 329 * @param companyId the company id to search with 330 * @param name the name to search with 331 * @return the matching role, or <code>null</code> if a matching role could not be found 332 * @throws SystemException if a system exception occurred 333 */ 334 public com.liferay.portal.model.Role fetchByC_N(long companyId, 335 java.lang.String name, boolean retrieveFromCache) 336 throws com.liferay.portal.kernel.exception.SystemException; 337 338 /** 339 * Finds all the roles where type = ? and subtype = ?. 340 * 341 * @param type the type to search with 342 * @param subtype the subtype to search with 343 * @return the matching roles 344 * @throws SystemException if a system exception occurred 345 */ 346 public java.util.List<com.liferay.portal.model.Role> findByT_S(int type, 347 java.lang.String subtype) 348 throws com.liferay.portal.kernel.exception.SystemException; 349 350 /** 351 * Finds a range of all the roles where type = ? and subtype = ?. 352 * 353 * <p> 354 * 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. 355 * </p> 356 * 357 * @param type the type to search with 358 * @param subtype the subtype to search with 359 * @param start the lower bound of the range of roles to return 360 * @param end the upper bound of the range of roles to return (not inclusive) 361 * @return the range of matching roles 362 * @throws SystemException if a system exception occurred 363 */ 364 public java.util.List<com.liferay.portal.model.Role> findByT_S(int type, 365 java.lang.String subtype, int start, int end) 366 throws com.liferay.portal.kernel.exception.SystemException; 367 368 /** 369 * Finds an ordered range of all the roles where type = ? and subtype = ?. 370 * 371 * <p> 372 * 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. 373 * </p> 374 * 375 * @param type the type to search with 376 * @param subtype the subtype to search with 377 * @param start the lower bound of the range of roles to return 378 * @param end the upper bound of the range of roles to return (not inclusive) 379 * @param orderByComparator the comparator to order the results by 380 * @return the ordered range of matching roles 381 * @throws SystemException if a system exception occurred 382 */ 383 public java.util.List<com.liferay.portal.model.Role> findByT_S(int type, 384 java.lang.String subtype, int start, int end, 385 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 386 throws com.liferay.portal.kernel.exception.SystemException; 387 388 /** 389 * Finds the first role in the ordered set where type = ? and subtype = ?. 390 * 391 * <p> 392 * 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. 393 * </p> 394 * 395 * @param type the type to search with 396 * @param subtype the subtype to search with 397 * @param orderByComparator the comparator to order the set by 398 * @return the first matching role 399 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 400 * @throws SystemException if a system exception occurred 401 */ 402 public com.liferay.portal.model.Role findByT_S_First(int type, 403 java.lang.String subtype, 404 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 405 throws com.liferay.portal.NoSuchRoleException, 406 com.liferay.portal.kernel.exception.SystemException; 407 408 /** 409 * Finds the last role in the ordered set where type = ? and subtype = ?. 410 * 411 * <p> 412 * 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. 413 * </p> 414 * 415 * @param type the type to search with 416 * @param subtype the subtype to search with 417 * @param orderByComparator the comparator to order the set by 418 * @return the last matching role 419 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 420 * @throws SystemException if a system exception occurred 421 */ 422 public com.liferay.portal.model.Role findByT_S_Last(int type, 423 java.lang.String subtype, 424 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 425 throws com.liferay.portal.NoSuchRoleException, 426 com.liferay.portal.kernel.exception.SystemException; 427 428 /** 429 * Finds the roles before and after the current role in the ordered set where type = ? and subtype = ?. 430 * 431 * <p> 432 * 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. 433 * </p> 434 * 435 * @param roleId the primary key of the current role 436 * @param type the type to search with 437 * @param subtype the subtype to search with 438 * @param orderByComparator the comparator to order the set by 439 * @return the previous, current, and next role 440 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 441 * @throws SystemException if a system exception occurred 442 */ 443 public com.liferay.portal.model.Role[] findByT_S_PrevAndNext(long roleId, 444 int type, java.lang.String subtype, 445 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 446 throws com.liferay.portal.NoSuchRoleException, 447 com.liferay.portal.kernel.exception.SystemException; 448 449 /** 450 * Finds the role where companyId = ? and classNameId = ? and classPK = ? or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found. 451 * 452 * @param companyId the company id to search with 453 * @param classNameId the class name id to search with 454 * @param classPK the class p k to search with 455 * @return the matching role 456 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 457 * @throws SystemException if a system exception occurred 458 */ 459 public com.liferay.portal.model.Role findByC_C_C(long companyId, 460 long classNameId, long classPK) 461 throws com.liferay.portal.NoSuchRoleException, 462 com.liferay.portal.kernel.exception.SystemException; 463 464 /** 465 * Finds the role where companyId = ? and classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 466 * 467 * @param companyId the company id to search with 468 * @param classNameId the class name id to search with 469 * @param classPK the class p k to search with 470 * @return the matching role, or <code>null</code> if a matching role could not be found 471 * @throws SystemException if a system exception occurred 472 */ 473 public com.liferay.portal.model.Role fetchByC_C_C(long companyId, 474 long classNameId, long classPK) 475 throws com.liferay.portal.kernel.exception.SystemException; 476 477 /** 478 * Finds the role where companyId = ? and classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 479 * 480 * @param companyId the company id to search with 481 * @param classNameId the class name id to search with 482 * @param classPK the class p k to search with 483 * @return the matching role, or <code>null</code> if a matching role could not be found 484 * @throws SystemException if a system exception occurred 485 */ 486 public com.liferay.portal.model.Role fetchByC_C_C(long companyId, 487 long classNameId, long classPK, boolean retrieveFromCache) 488 throws com.liferay.portal.kernel.exception.SystemException; 489 490 /** 491 * Finds all the roles. 492 * 493 * @return the roles 494 * @throws SystemException if a system exception occurred 495 */ 496 public java.util.List<com.liferay.portal.model.Role> findAll() 497 throws com.liferay.portal.kernel.exception.SystemException; 498 499 /** 500 * Finds a range of all the roles. 501 * 502 * <p> 503 * 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. 504 * </p> 505 * 506 * @param start the lower bound of the range of roles to return 507 * @param end the upper bound of the range of roles to return (not inclusive) 508 * @return the range of roles 509 * @throws SystemException if a system exception occurred 510 */ 511 public java.util.List<com.liferay.portal.model.Role> findAll(int start, 512 int end) throws com.liferay.portal.kernel.exception.SystemException; 513 514 /** 515 * Finds an ordered range of all the roles. 516 * 517 * <p> 518 * 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. 519 * </p> 520 * 521 * @param start the lower bound of the range of roles to return 522 * @param end the upper bound of the range of roles to return (not inclusive) 523 * @param orderByComparator the comparator to order the results by 524 * @return the ordered range of roles 525 * @throws SystemException if a system exception occurred 526 */ 527 public java.util.List<com.liferay.portal.model.Role> findAll(int start, 528 int end, 529 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 530 throws com.liferay.portal.kernel.exception.SystemException; 531 532 /** 533 * Removes all the roles where companyId = ? from the database. 534 * 535 * @param companyId the company id to search with 536 * @throws SystemException if a system exception occurred 537 */ 538 public void removeByCompanyId(long companyId) 539 throws com.liferay.portal.kernel.exception.SystemException; 540 541 /** 542 * Removes all the roles where subtype = ? from the database. 543 * 544 * @param subtype the subtype to search with 545 * @throws SystemException if a system exception occurred 546 */ 547 public void removeBySubtype(java.lang.String subtype) 548 throws com.liferay.portal.kernel.exception.SystemException; 549 550 /** 551 * Removes the role where companyId = ? and name = ? from the database. 552 * 553 * @param companyId the company id to search with 554 * @param name the name to search with 555 * @throws SystemException if a system exception occurred 556 */ 557 public void removeByC_N(long companyId, java.lang.String name) 558 throws com.liferay.portal.NoSuchRoleException, 559 com.liferay.portal.kernel.exception.SystemException; 560 561 /** 562 * Removes all the roles where type = ? and subtype = ? from the database. 563 * 564 * @param type the type to search with 565 * @param subtype the subtype to search with 566 * @throws SystemException if a system exception occurred 567 */ 568 public void removeByT_S(int type, java.lang.String subtype) 569 throws com.liferay.portal.kernel.exception.SystemException; 570 571 /** 572 * Removes the role where companyId = ? and classNameId = ? and classPK = ? from the database. 573 * 574 * @param companyId the company id to search with 575 * @param classNameId the class name id to search with 576 * @param classPK the class p k to search with 577 * @throws SystemException if a system exception occurred 578 */ 579 public void removeByC_C_C(long companyId, long classNameId, long classPK) 580 throws com.liferay.portal.NoSuchRoleException, 581 com.liferay.portal.kernel.exception.SystemException; 582 583 /** 584 * Removes all the roles from the database. 585 * 586 * @throws SystemException if a system exception occurred 587 */ 588 public void removeAll() 589 throws com.liferay.portal.kernel.exception.SystemException; 590 591 /** 592 * Counts all the roles where companyId = ?. 593 * 594 * @param companyId the company id to search with 595 * @return the number of matching roles 596 * @throws SystemException if a system exception occurred 597 */ 598 public int countByCompanyId(long companyId) 599 throws com.liferay.portal.kernel.exception.SystemException; 600 601 /** 602 * Counts all the roles where subtype = ?. 603 * 604 * @param subtype the subtype to search with 605 * @return the number of matching roles 606 * @throws SystemException if a system exception occurred 607 */ 608 public int countBySubtype(java.lang.String subtype) 609 throws com.liferay.portal.kernel.exception.SystemException; 610 611 /** 612 * Counts all the roles where companyId = ? and name = ?. 613 * 614 * @param companyId the company id to search with 615 * @param name the name to search with 616 * @return the number of matching roles 617 * @throws SystemException if a system exception occurred 618 */ 619 public int countByC_N(long companyId, java.lang.String name) 620 throws com.liferay.portal.kernel.exception.SystemException; 621 622 /** 623 * Counts all the roles where type = ? and subtype = ?. 624 * 625 * @param type the type to search with 626 * @param subtype the subtype to search with 627 * @return the number of matching roles 628 * @throws SystemException if a system exception occurred 629 */ 630 public int countByT_S(int type, java.lang.String subtype) 631 throws com.liferay.portal.kernel.exception.SystemException; 632 633 /** 634 * Counts all the roles where companyId = ? and classNameId = ? and classPK = ?. 635 * 636 * @param companyId the company id to search with 637 * @param classNameId the class name id to search with 638 * @param classPK the class p k to search with 639 * @return the number of matching roles 640 * @throws SystemException if a system exception occurred 641 */ 642 public int countByC_C_C(long companyId, long classNameId, long classPK) 643 throws com.liferay.portal.kernel.exception.SystemException; 644 645 /** 646 * Counts all the roles. 647 * 648 * @return the number of roles 649 * @throws SystemException if a system exception occurred 650 */ 651 public int countAll() 652 throws com.liferay.portal.kernel.exception.SystemException; 653 654 /** 655 * Gets all the groups associated with the role. 656 * 657 * @param pk the primary key of the role to get the associated groups for 658 * @return the groups associated with the role 659 * @throws SystemException if a system exception occurred 660 */ 661 public java.util.List<com.liferay.portal.model.Group> getGroups(long pk) 662 throws com.liferay.portal.kernel.exception.SystemException; 663 664 /** 665 * Gets a range of all the groups associated with the role. 666 * 667 * <p> 668 * 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. 669 * </p> 670 * 671 * @param pk the primary key of the role to get the associated groups for 672 * @param start the lower bound of the range of roles to return 673 * @param end the upper bound of the range of roles to return (not inclusive) 674 * @return the range of groups associated with the role 675 * @throws SystemException if a system exception occurred 676 */ 677 public java.util.List<com.liferay.portal.model.Group> getGroups(long pk, 678 int start, int end) 679 throws com.liferay.portal.kernel.exception.SystemException; 680 681 /** 682 * Gets an ordered range of all the groups associated with the role. 683 * 684 * <p> 685 * 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. 686 * </p> 687 * 688 * @param pk the primary key of the role to get the associated groups for 689 * @param start the lower bound of the range of roles to return 690 * @param end the upper bound of the range of roles to return (not inclusive) 691 * @param orderByComparator the comparator to order the results by 692 * @return the ordered range of groups associated with the role 693 * @throws SystemException if a system exception occurred 694 */ 695 public java.util.List<com.liferay.portal.model.Group> getGroups(long pk, 696 int start, int end, 697 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 698 throws com.liferay.portal.kernel.exception.SystemException; 699 700 /** 701 * Gets the number of groups associated with the role. 702 * 703 * @param pk the primary key of the role to get the number of associated groups for 704 * @return the number of groups associated with the role 705 * @throws SystemException if a system exception occurred 706 */ 707 public int getGroupsSize(long pk) 708 throws com.liferay.portal.kernel.exception.SystemException; 709 710 /** 711 * Determines whether the group is associated with the role. 712 * 713 * @param pk the primary key of the role 714 * @param groupPK the primary key of the group 715 * @return whether the group is associated with the role 716 * @throws SystemException if a system exception occurred 717 */ 718 public boolean containsGroup(long pk, long groupPK) 719 throws com.liferay.portal.kernel.exception.SystemException; 720 721 /** 722 * Determines whether the role has any groups associated with it. 723 * 724 * @param pk the primary key of the role to check for associations with groups 725 * @return whether the role has any groups associated with it 726 * @throws SystemException if a system exception occurred 727 */ 728 public boolean containsGroups(long pk) 729 throws com.liferay.portal.kernel.exception.SystemException; 730 731 /** 732 * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 733 * 734 * @param pk the primary key of the role 735 * @param groupPK the primary key of the group 736 * @throws SystemException if a system exception occurred 737 */ 738 public void addGroup(long pk, long groupPK) 739 throws com.liferay.portal.kernel.exception.SystemException; 740 741 /** 742 * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 743 * 744 * @param pk the primary key of the role 745 * @param group the group 746 * @throws SystemException if a system exception occurred 747 */ 748 public void addGroup(long pk, com.liferay.portal.model.Group group) 749 throws com.liferay.portal.kernel.exception.SystemException; 750 751 /** 752 * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 753 * 754 * @param pk the primary key of the role 755 * @param groupPKs the primary keys of the groups 756 * @throws SystemException if a system exception occurred 757 */ 758 public void addGroups(long pk, long[] groupPKs) 759 throws com.liferay.portal.kernel.exception.SystemException; 760 761 /** 762 * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 763 * 764 * @param pk the primary key of the role 765 * @param groups the groups 766 * @throws SystemException if a system exception occurred 767 */ 768 public void addGroups(long pk, 769 java.util.List<com.liferay.portal.model.Group> groups) 770 throws com.liferay.portal.kernel.exception.SystemException; 771 772 /** 773 * Clears all associations between the role and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 774 * 775 * @param pk the primary key of the role to clear the associated groups from 776 * @throws SystemException if a system exception occurred 777 */ 778 public void clearGroups(long pk) 779 throws com.liferay.portal.kernel.exception.SystemException; 780 781 /** 782 * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 783 * 784 * @param pk the primary key of the role 785 * @param groupPK the primary key of the group 786 * @throws SystemException if a system exception occurred 787 */ 788 public void removeGroup(long pk, long groupPK) 789 throws com.liferay.portal.kernel.exception.SystemException; 790 791 /** 792 * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 793 * 794 * @param pk the primary key of the role 795 * @param group the group 796 * @throws SystemException if a system exception occurred 797 */ 798 public void removeGroup(long pk, com.liferay.portal.model.Group group) 799 throws com.liferay.portal.kernel.exception.SystemException; 800 801 /** 802 * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 803 * 804 * @param pk the primary key of the role 805 * @param groupPKs the primary keys of the groups 806 * @throws SystemException if a system exception occurred 807 */ 808 public void removeGroups(long pk, long[] groupPKs) 809 throws com.liferay.portal.kernel.exception.SystemException; 810 811 /** 812 * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 813 * 814 * @param pk the primary key of the role 815 * @param groups the groups 816 * @throws SystemException if a system exception occurred 817 */ 818 public void removeGroups(long pk, 819 java.util.List<com.liferay.portal.model.Group> groups) 820 throws com.liferay.portal.kernel.exception.SystemException; 821 822 /** 823 * 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. 824 * 825 * @param pk the primary key of the role to set the associations for 826 * @param groupPKs the primary keys of the groups to be associated with the role 827 * @throws SystemException if a system exception occurred 828 */ 829 public void setGroups(long pk, long[] groupPKs) 830 throws com.liferay.portal.kernel.exception.SystemException; 831 832 /** 833 * 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. 834 * 835 * @param pk the primary key of the role to set the associations for 836 * @param groups the groups to be associated with the role 837 * @throws SystemException if a system exception occurred 838 */ 839 public void setGroups(long pk, 840 java.util.List<com.liferay.portal.model.Group> groups) 841 throws com.liferay.portal.kernel.exception.SystemException; 842 843 /** 844 * Gets all the permissions associated with the role. 845 * 846 * @param pk the primary key of the role to get the associated permissions for 847 * @return the permissions associated with the role 848 * @throws SystemException if a system exception occurred 849 */ 850 public java.util.List<com.liferay.portal.model.Permission> getPermissions( 851 long pk) throws com.liferay.portal.kernel.exception.SystemException; 852 853 /** 854 * Gets a range of all the permissions associated with the role. 855 * 856 * <p> 857 * 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. 858 * </p> 859 * 860 * @param pk the primary key of the role to get the associated permissions for 861 * @param start the lower bound of the range of roles to return 862 * @param end the upper bound of the range of roles to return (not inclusive) 863 * @return the range of permissions associated with the role 864 * @throws SystemException if a system exception occurred 865 */ 866 public java.util.List<com.liferay.portal.model.Permission> getPermissions( 867 long pk, int start, int end) 868 throws com.liferay.portal.kernel.exception.SystemException; 869 870 /** 871 * Gets an ordered range of all the permissions associated with the role. 872 * 873 * <p> 874 * 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. 875 * </p> 876 * 877 * @param pk the primary key of the role to get the associated permissions for 878 * @param start the lower bound of the range of roles to return 879 * @param end the upper bound of the range of roles to return (not inclusive) 880 * @param orderByComparator the comparator to order the results by 881 * @return the ordered range of permissions associated with the role 882 * @throws SystemException if a system exception occurred 883 */ 884 public java.util.List<com.liferay.portal.model.Permission> getPermissions( 885 long pk, int start, int end, 886 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 887 throws com.liferay.portal.kernel.exception.SystemException; 888 889 /** 890 * Gets the number of permissions associated with the role. 891 * 892 * @param pk the primary key of the role to get the number of associated permissions for 893 * @return the number of permissions associated with the role 894 * @throws SystemException if a system exception occurred 895 */ 896 public int getPermissionsSize(long pk) 897 throws com.liferay.portal.kernel.exception.SystemException; 898 899 /** 900 * Determines whether the permission is associated with the role. 901 * 902 * @param pk the primary key of the role 903 * @param permissionPK the primary key of the permission 904 * @return whether the permission is associated with the role 905 * @throws SystemException if a system exception occurred 906 */ 907 public boolean containsPermission(long pk, long permissionPK) 908 throws com.liferay.portal.kernel.exception.SystemException; 909 910 /** 911 * Determines whether the role has any permissions associated with it. 912 * 913 * @param pk the primary key of the role to check for associations with permissions 914 * @return whether the role has any permissions associated with it 915 * @throws SystemException if a system exception occurred 916 */ 917 public boolean containsPermissions(long pk) 918 throws com.liferay.portal.kernel.exception.SystemException; 919 920 /** 921 * Adds an association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 922 * 923 * @param pk the primary key of the role 924 * @param permissionPK the primary key of the permission 925 * @throws SystemException if a system exception occurred 926 */ 927 public void addPermission(long pk, long permissionPK) 928 throws com.liferay.portal.kernel.exception.SystemException; 929 930 /** 931 * Adds an association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 932 * 933 * @param pk the primary key of the role 934 * @param permission the permission 935 * @throws SystemException if a system exception occurred 936 */ 937 public void addPermission(long pk, 938 com.liferay.portal.model.Permission permission) 939 throws com.liferay.portal.kernel.exception.SystemException; 940 941 /** 942 * Adds an association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 943 * 944 * @param pk the primary key of the role 945 * @param permissionPKs the primary keys of the permissions 946 * @throws SystemException if a system exception occurred 947 */ 948 public void addPermissions(long pk, long[] permissionPKs) 949 throws com.liferay.portal.kernel.exception.SystemException; 950 951 /** 952 * Adds an association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 953 * 954 * @param pk the primary key of the role 955 * @param permissions the permissions 956 * @throws SystemException if a system exception occurred 957 */ 958 public void addPermissions(long pk, 959 java.util.List<com.liferay.portal.model.Permission> permissions) 960 throws com.liferay.portal.kernel.exception.SystemException; 961 962 /** 963 * Clears all associations between the role and its permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 964 * 965 * @param pk the primary key of the role to clear the associated permissions from 966 * @throws SystemException if a system exception occurred 967 */ 968 public void clearPermissions(long pk) 969 throws com.liferay.portal.kernel.exception.SystemException; 970 971 /** 972 * Removes the association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 973 * 974 * @param pk the primary key of the role 975 * @param permissionPK the primary key of the permission 976 * @throws SystemException if a system exception occurred 977 */ 978 public void removePermission(long pk, long permissionPK) 979 throws com.liferay.portal.kernel.exception.SystemException; 980 981 /** 982 * Removes the association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 983 * 984 * @param pk the primary key of the role 985 * @param permission the permission 986 * @throws SystemException if a system exception occurred 987 */ 988 public void removePermission(long pk, 989 com.liferay.portal.model.Permission permission) 990 throws com.liferay.portal.kernel.exception.SystemException; 991 992 /** 993 * Removes the association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 994 * 995 * @param pk the primary key of the role 996 * @param permissionPKs the primary keys of the permissions 997 * @throws SystemException if a system exception occurred 998 */ 999 public void removePermissions(long pk, long[] permissionPKs) 1000 throws com.liferay.portal.kernel.exception.SystemException; 1001 1002 /** 1003 * Removes the association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1004 * 1005 * @param pk the primary key of the role 1006 * @param permissions the permissions 1007 * @throws SystemException if a system exception occurred 1008 */ 1009 public void removePermissions(long pk, 1010 java.util.List<com.liferay.portal.model.Permission> permissions) 1011 throws com.liferay.portal.kernel.exception.SystemException; 1012 1013 /** 1014 * 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. 1015 * 1016 * @param pk the primary key of the role to set the associations for 1017 * @param permissionPKs the primary keys of the permissions to be associated with the role 1018 * @throws SystemException if a system exception occurred 1019 */ 1020 public void setPermissions(long pk, long[] permissionPKs) 1021 throws com.liferay.portal.kernel.exception.SystemException; 1022 1023 /** 1024 * 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. 1025 * 1026 * @param pk the primary key of the role to set the associations for 1027 * @param permissions the permissions to be associated with the role 1028 * @throws SystemException if a system exception occurred 1029 */ 1030 public void setPermissions(long pk, 1031 java.util.List<com.liferay.portal.model.Permission> permissions) 1032 throws com.liferay.portal.kernel.exception.SystemException; 1033 1034 /** 1035 * Gets all the users associated with the role. 1036 * 1037 * @param pk the primary key of the role to get the associated users for 1038 * @return the users associated with the role 1039 * @throws SystemException if a system exception occurred 1040 */ 1041 public java.util.List<com.liferay.portal.model.User> getUsers(long pk) 1042 throws com.liferay.portal.kernel.exception.SystemException; 1043 1044 /** 1045 * Gets a range of all the users associated with the role. 1046 * 1047 * <p> 1048 * 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. 1049 * </p> 1050 * 1051 * @param pk the primary key of the role to get the associated users for 1052 * @param start the lower bound of the range of roles to return 1053 * @param end the upper bound of the range of roles to return (not inclusive) 1054 * @return the range of users associated with the role 1055 * @throws SystemException if a system exception occurred 1056 */ 1057 public java.util.List<com.liferay.portal.model.User> getUsers(long pk, 1058 int start, int end) 1059 throws com.liferay.portal.kernel.exception.SystemException; 1060 1061 /** 1062 * Gets an ordered range of all the users associated with the role. 1063 * 1064 * <p> 1065 * 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. 1066 * </p> 1067 * 1068 * @param pk the primary key of the role to get the associated users for 1069 * @param start the lower bound of the range of roles to return 1070 * @param end the upper bound of the range of roles to return (not inclusive) 1071 * @param orderByComparator the comparator to order the results by 1072 * @return the ordered range of users associated with the role 1073 * @throws SystemException if a system exception occurred 1074 */ 1075 public java.util.List<com.liferay.portal.model.User> getUsers(long pk, 1076 int start, int end, 1077 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1078 throws com.liferay.portal.kernel.exception.SystemException; 1079 1080 /** 1081 * Gets the number of users associated with the role. 1082 * 1083 * @param pk the primary key of the role to get the number of associated users for 1084 * @return the number of users associated with the role 1085 * @throws SystemException if a system exception occurred 1086 */ 1087 public int getUsersSize(long pk) 1088 throws com.liferay.portal.kernel.exception.SystemException; 1089 1090 /** 1091 * Determines whether the user is associated with the role. 1092 * 1093 * @param pk the primary key of the role 1094 * @param userPK the primary key of the user 1095 * @return whether the user is associated with the role 1096 * @throws SystemException if a system exception occurred 1097 */ 1098 public boolean containsUser(long pk, long userPK) 1099 throws com.liferay.portal.kernel.exception.SystemException; 1100 1101 /** 1102 * Determines whether the role has any users associated with it. 1103 * 1104 * @param pk the primary key of the role to check for associations with users 1105 * @return whether the role has any users associated with it 1106 * @throws SystemException if a system exception occurred 1107 */ 1108 public boolean containsUsers(long pk) 1109 throws com.liferay.portal.kernel.exception.SystemException; 1110 1111 /** 1112 * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1113 * 1114 * @param pk the primary key of the role 1115 * @param userPK the primary key of the user 1116 * @throws SystemException if a system exception occurred 1117 */ 1118 public void addUser(long pk, long userPK) 1119 throws com.liferay.portal.kernel.exception.SystemException; 1120 1121 /** 1122 * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1123 * 1124 * @param pk the primary key of the role 1125 * @param user the user 1126 * @throws SystemException if a system exception occurred 1127 */ 1128 public void addUser(long pk, com.liferay.portal.model.User user) 1129 throws com.liferay.portal.kernel.exception.SystemException; 1130 1131 /** 1132 * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1133 * 1134 * @param pk the primary key of the role 1135 * @param userPKs the primary keys of the users 1136 * @throws SystemException if a system exception occurred 1137 */ 1138 public void addUsers(long pk, long[] userPKs) 1139 throws com.liferay.portal.kernel.exception.SystemException; 1140 1141 /** 1142 * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1143 * 1144 * @param pk the primary key of the role 1145 * @param users the users 1146 * @throws SystemException if a system exception occurred 1147 */ 1148 public void addUsers(long pk, 1149 java.util.List<com.liferay.portal.model.User> users) 1150 throws com.liferay.portal.kernel.exception.SystemException; 1151 1152 /** 1153 * Clears all associations between the role and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1154 * 1155 * @param pk the primary key of the role to clear the associated users from 1156 * @throws SystemException if a system exception occurred 1157 */ 1158 public void clearUsers(long pk) 1159 throws com.liferay.portal.kernel.exception.SystemException; 1160 1161 /** 1162 * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1163 * 1164 * @param pk the primary key of the role 1165 * @param userPK the primary key of the user 1166 * @throws SystemException if a system exception occurred 1167 */ 1168 public void removeUser(long pk, long userPK) 1169 throws com.liferay.portal.kernel.exception.SystemException; 1170 1171 /** 1172 * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1173 * 1174 * @param pk the primary key of the role 1175 * @param user the user 1176 * @throws SystemException if a system exception occurred 1177 */ 1178 public void removeUser(long pk, com.liferay.portal.model.User user) 1179 throws com.liferay.portal.kernel.exception.SystemException; 1180 1181 /** 1182 * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1183 * 1184 * @param pk the primary key of the role 1185 * @param userPKs the primary keys of the users 1186 * @throws SystemException if a system exception occurred 1187 */ 1188 public void removeUsers(long pk, long[] userPKs) 1189 throws com.liferay.portal.kernel.exception.SystemException; 1190 1191 /** 1192 * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1193 * 1194 * @param pk the primary key of the role 1195 * @param users the users 1196 * @throws SystemException if a system exception occurred 1197 */ 1198 public void removeUsers(long pk, 1199 java.util.List<com.liferay.portal.model.User> users) 1200 throws com.liferay.portal.kernel.exception.SystemException; 1201 1202 /** 1203 * 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. 1204 * 1205 * @param pk the primary key of the role to set the associations for 1206 * @param userPKs the primary keys of the users to be associated with the role 1207 * @throws SystemException if a system exception occurred 1208 */ 1209 public void setUsers(long pk, long[] userPKs) 1210 throws com.liferay.portal.kernel.exception.SystemException; 1211 1212 /** 1213 * 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. 1214 * 1215 * @param pk the primary key of the role to set the associations for 1216 * @param users the users to be associated with the role 1217 * @throws SystemException if a system exception occurred 1218 */ 1219 public void setUsers(long pk, 1220 java.util.List<com.liferay.portal.model.User> users) 1221 throws com.liferay.portal.kernel.exception.SystemException; 1222 }