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