001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.Role; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the role service. This utility wraps {@link RolePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see RolePersistence 036 * @see RolePersistenceImpl 037 * @generated 038 */ 039 public class RoleUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache(Role role) { 057 getPersistence().clearCache(role); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 064 throws SystemException { 065 return getPersistence().countWithDynamicQuery(dynamicQuery); 066 } 067 068 /** 069 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 070 */ 071 public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery) 072 throws SystemException { 073 return getPersistence().findWithDynamicQuery(dynamicQuery); 074 } 075 076 /** 077 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 078 */ 079 public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery, 080 int start, int end) throws SystemException { 081 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 082 } 083 084 /** 085 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 086 */ 087 public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery, 088 int start, int end, OrderByComparator orderByComparator) 089 throws SystemException { 090 return getPersistence() 091 .findWithDynamicQuery(dynamicQuery, start, end, 092 orderByComparator); 093 } 094 095 /** 096 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 097 */ 098 public static Role update(Role role) throws SystemException { 099 return getPersistence().update(role); 100 } 101 102 /** 103 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 104 */ 105 public static Role update(Role role, ServiceContext serviceContext) 106 throws SystemException { 107 return getPersistence().update(role, serviceContext); 108 } 109 110 /** 111 * Returns all the roles where uuid = ?. 112 * 113 * @param uuid the uuid 114 * @return the matching roles 115 * @throws SystemException if a system exception occurred 116 */ 117 public static java.util.List<com.liferay.portal.model.Role> findByUuid( 118 java.lang.String uuid) 119 throws com.liferay.portal.kernel.exception.SystemException { 120 return getPersistence().findByUuid(uuid); 121 } 122 123 /** 124 * Returns a range of all the roles where uuid = ?. 125 * 126 * <p> 127 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 128 * </p> 129 * 130 * @param uuid the uuid 131 * @param start the lower bound of the range of roles 132 * @param end the upper bound of the range of roles (not inclusive) 133 * @return the range of matching roles 134 * @throws SystemException if a system exception occurred 135 */ 136 public static java.util.List<com.liferay.portal.model.Role> findByUuid( 137 java.lang.String uuid, int start, int end) 138 throws com.liferay.portal.kernel.exception.SystemException { 139 return getPersistence().findByUuid(uuid, start, end); 140 } 141 142 /** 143 * Returns an ordered range of all the roles where uuid = ?. 144 * 145 * <p> 146 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 147 * </p> 148 * 149 * @param uuid the uuid 150 * @param start the lower bound of the range of roles 151 * @param end the upper bound of the range of roles (not inclusive) 152 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 153 * @return the ordered range of matching roles 154 * @throws SystemException if a system exception occurred 155 */ 156 public static java.util.List<com.liferay.portal.model.Role> findByUuid( 157 java.lang.String uuid, int start, int end, 158 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 159 throws com.liferay.portal.kernel.exception.SystemException { 160 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 161 } 162 163 /** 164 * Returns the first role in the ordered set where uuid = ?. 165 * 166 * @param uuid the uuid 167 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 168 * @return the first matching role 169 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 170 * @throws SystemException if a system exception occurred 171 */ 172 public static com.liferay.portal.model.Role findByUuid_First( 173 java.lang.String uuid, 174 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 175 throws com.liferay.portal.NoSuchRoleException, 176 com.liferay.portal.kernel.exception.SystemException { 177 return getPersistence().findByUuid_First(uuid, orderByComparator); 178 } 179 180 /** 181 * Returns the first role in the ordered set where uuid = ?. 182 * 183 * @param uuid the uuid 184 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 185 * @return the first matching role, or <code>null</code> if a matching role could not be found 186 * @throws SystemException if a system exception occurred 187 */ 188 public static com.liferay.portal.model.Role fetchByUuid_First( 189 java.lang.String uuid, 190 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 191 throws com.liferay.portal.kernel.exception.SystemException { 192 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 193 } 194 195 /** 196 * Returns the last role in the ordered set where uuid = ?. 197 * 198 * @param uuid the uuid 199 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 200 * @return the last matching role 201 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 202 * @throws SystemException if a system exception occurred 203 */ 204 public static com.liferay.portal.model.Role findByUuid_Last( 205 java.lang.String uuid, 206 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 207 throws com.liferay.portal.NoSuchRoleException, 208 com.liferay.portal.kernel.exception.SystemException { 209 return getPersistence().findByUuid_Last(uuid, orderByComparator); 210 } 211 212 /** 213 * Returns the last role in the ordered set where uuid = ?. 214 * 215 * @param uuid the uuid 216 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 217 * @return the last matching role, or <code>null</code> if a matching role could not be found 218 * @throws SystemException if a system exception occurred 219 */ 220 public static com.liferay.portal.model.Role fetchByUuid_Last( 221 java.lang.String uuid, 222 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 223 throws com.liferay.portal.kernel.exception.SystemException { 224 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 225 } 226 227 /** 228 * Returns the roles before and after the current role in the ordered set where uuid = ?. 229 * 230 * @param roleId the primary key of the current role 231 * @param uuid the uuid 232 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 233 * @return the previous, current, and next role 234 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 235 * @throws SystemException if a system exception occurred 236 */ 237 public static com.liferay.portal.model.Role[] findByUuid_PrevAndNext( 238 long roleId, java.lang.String uuid, 239 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 240 throws com.liferay.portal.NoSuchRoleException, 241 com.liferay.portal.kernel.exception.SystemException { 242 return getPersistence() 243 .findByUuid_PrevAndNext(roleId, uuid, orderByComparator); 244 } 245 246 /** 247 * Returns all the roles that the user has permission to view where uuid = ?. 248 * 249 * @param uuid the uuid 250 * @return the matching roles that the user has permission to view 251 * @throws SystemException if a system exception occurred 252 */ 253 public static java.util.List<com.liferay.portal.model.Role> filterFindByUuid( 254 java.lang.String uuid) 255 throws com.liferay.portal.kernel.exception.SystemException { 256 return getPersistence().filterFindByUuid(uuid); 257 } 258 259 /** 260 * Returns a range of all the roles that the user has permission to view where uuid = ?. 261 * 262 * <p> 263 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 264 * </p> 265 * 266 * @param uuid the uuid 267 * @param start the lower bound of the range of roles 268 * @param end the upper bound of the range of roles (not inclusive) 269 * @return the range of matching roles that the user has permission to view 270 * @throws SystemException if a system exception occurred 271 */ 272 public static java.util.List<com.liferay.portal.model.Role> filterFindByUuid( 273 java.lang.String uuid, int start, int end) 274 throws com.liferay.portal.kernel.exception.SystemException { 275 return getPersistence().filterFindByUuid(uuid, start, end); 276 } 277 278 /** 279 * Returns an ordered range of all the roles that the user has permissions to view where uuid = ?. 280 * 281 * <p> 282 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 283 * </p> 284 * 285 * @param uuid the uuid 286 * @param start the lower bound of the range of roles 287 * @param end the upper bound of the range of roles (not inclusive) 288 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 289 * @return the ordered range of matching roles that the user has permission to view 290 * @throws SystemException if a system exception occurred 291 */ 292 public static java.util.List<com.liferay.portal.model.Role> filterFindByUuid( 293 java.lang.String uuid, int start, int end, 294 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 295 throws com.liferay.portal.kernel.exception.SystemException { 296 return getPersistence() 297 .filterFindByUuid(uuid, start, end, orderByComparator); 298 } 299 300 /** 301 * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where uuid = ?. 302 * 303 * @param roleId the primary key of the current role 304 * @param uuid the uuid 305 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 306 * @return the previous, current, and next role 307 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 308 * @throws SystemException if a system exception occurred 309 */ 310 public static com.liferay.portal.model.Role[] filterFindByUuid_PrevAndNext( 311 long roleId, java.lang.String uuid, 312 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 313 throws com.liferay.portal.NoSuchRoleException, 314 com.liferay.portal.kernel.exception.SystemException { 315 return getPersistence() 316 .filterFindByUuid_PrevAndNext(roleId, uuid, orderByComparator); 317 } 318 319 /** 320 * Removes all the roles where uuid = ? from the database. 321 * 322 * @param uuid the uuid 323 * @throws SystemException if a system exception occurred 324 */ 325 public static void removeByUuid(java.lang.String uuid) 326 throws com.liferay.portal.kernel.exception.SystemException { 327 getPersistence().removeByUuid(uuid); 328 } 329 330 /** 331 * Returns the number of roles where uuid = ?. 332 * 333 * @param uuid the uuid 334 * @return the number of matching roles 335 * @throws SystemException if a system exception occurred 336 */ 337 public static int countByUuid(java.lang.String uuid) 338 throws com.liferay.portal.kernel.exception.SystemException { 339 return getPersistence().countByUuid(uuid); 340 } 341 342 /** 343 * Returns the number of roles that the user has permission to view where uuid = ?. 344 * 345 * @param uuid the uuid 346 * @return the number of matching roles that the user has permission to view 347 * @throws SystemException if a system exception occurred 348 */ 349 public static int filterCountByUuid(java.lang.String uuid) 350 throws com.liferay.portal.kernel.exception.SystemException { 351 return getPersistence().filterCountByUuid(uuid); 352 } 353 354 /** 355 * Returns all the roles where uuid = ? and companyId = ?. 356 * 357 * @param uuid the uuid 358 * @param companyId the company ID 359 * @return the matching roles 360 * @throws SystemException if a system exception occurred 361 */ 362 public static java.util.List<com.liferay.portal.model.Role> findByUuid_C( 363 java.lang.String uuid, long companyId) 364 throws com.liferay.portal.kernel.exception.SystemException { 365 return getPersistence().findByUuid_C(uuid, companyId); 366 } 367 368 /** 369 * Returns a range of all the roles where uuid = ? and companyId = ?. 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 373 * </p> 374 * 375 * @param uuid the uuid 376 * @param companyId the company ID 377 * @param start the lower bound of the range of roles 378 * @param end the upper bound of the range of roles (not inclusive) 379 * @return the range of matching roles 380 * @throws SystemException if a system exception occurred 381 */ 382 public static java.util.List<com.liferay.portal.model.Role> findByUuid_C( 383 java.lang.String uuid, long companyId, int start, int end) 384 throws com.liferay.portal.kernel.exception.SystemException { 385 return getPersistence().findByUuid_C(uuid, companyId, start, end); 386 } 387 388 /** 389 * Returns an ordered range of all the roles where uuid = ? and companyId = ?. 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 393 * </p> 394 * 395 * @param uuid the uuid 396 * @param companyId the company ID 397 * @param start the lower bound of the range of roles 398 * @param end the upper bound of the range of roles (not inclusive) 399 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 400 * @return the ordered range of matching roles 401 * @throws SystemException if a system exception occurred 402 */ 403 public static java.util.List<com.liferay.portal.model.Role> findByUuid_C( 404 java.lang.String uuid, long companyId, int start, int end, 405 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 406 throws com.liferay.portal.kernel.exception.SystemException { 407 return getPersistence() 408 .findByUuid_C(uuid, companyId, start, end, orderByComparator); 409 } 410 411 /** 412 * Returns the first role in the ordered set where uuid = ? and companyId = ?. 413 * 414 * @param uuid the uuid 415 * @param companyId the company ID 416 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 417 * @return the first matching role 418 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 419 * @throws SystemException if a system exception occurred 420 */ 421 public static com.liferay.portal.model.Role findByUuid_C_First( 422 java.lang.String uuid, long companyId, 423 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 424 throws com.liferay.portal.NoSuchRoleException, 425 com.liferay.portal.kernel.exception.SystemException { 426 return getPersistence() 427 .findByUuid_C_First(uuid, companyId, orderByComparator); 428 } 429 430 /** 431 * Returns the first role in the ordered set where uuid = ? and companyId = ?. 432 * 433 * @param uuid the uuid 434 * @param companyId the company ID 435 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 436 * @return the first matching role, or <code>null</code> if a matching role could not be found 437 * @throws SystemException if a system exception occurred 438 */ 439 public static com.liferay.portal.model.Role fetchByUuid_C_First( 440 java.lang.String uuid, long companyId, 441 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 442 throws com.liferay.portal.kernel.exception.SystemException { 443 return getPersistence() 444 .fetchByUuid_C_First(uuid, companyId, orderByComparator); 445 } 446 447 /** 448 * Returns the last role in the ordered set where uuid = ? and companyId = ?. 449 * 450 * @param uuid the uuid 451 * @param companyId the company ID 452 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 453 * @return the last matching role 454 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 455 * @throws SystemException if a system exception occurred 456 */ 457 public static com.liferay.portal.model.Role findByUuid_C_Last( 458 java.lang.String uuid, long companyId, 459 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 460 throws com.liferay.portal.NoSuchRoleException, 461 com.liferay.portal.kernel.exception.SystemException { 462 return getPersistence() 463 .findByUuid_C_Last(uuid, companyId, orderByComparator); 464 } 465 466 /** 467 * Returns the last role in the ordered set where uuid = ? and companyId = ?. 468 * 469 * @param uuid the uuid 470 * @param companyId the company ID 471 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 472 * @return the last matching role, or <code>null</code> if a matching role could not be found 473 * @throws SystemException if a system exception occurred 474 */ 475 public static com.liferay.portal.model.Role fetchByUuid_C_Last( 476 java.lang.String uuid, long companyId, 477 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 478 throws com.liferay.portal.kernel.exception.SystemException { 479 return getPersistence() 480 .fetchByUuid_C_Last(uuid, companyId, orderByComparator); 481 } 482 483 /** 484 * Returns the roles before and after the current role in the ordered set where uuid = ? and companyId = ?. 485 * 486 * @param roleId the primary key of the current role 487 * @param uuid the uuid 488 * @param companyId the company ID 489 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 490 * @return the previous, current, and next role 491 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 492 * @throws SystemException if a system exception occurred 493 */ 494 public static com.liferay.portal.model.Role[] findByUuid_C_PrevAndNext( 495 long roleId, java.lang.String uuid, long companyId, 496 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 497 throws com.liferay.portal.NoSuchRoleException, 498 com.liferay.portal.kernel.exception.SystemException { 499 return getPersistence() 500 .findByUuid_C_PrevAndNext(roleId, uuid, companyId, 501 orderByComparator); 502 } 503 504 /** 505 * Returns all the roles that the user has permission to view where uuid = ? and companyId = ?. 506 * 507 * @param uuid the uuid 508 * @param companyId the company ID 509 * @return the matching roles that the user has permission to view 510 * @throws SystemException if a system exception occurred 511 */ 512 public static java.util.List<com.liferay.portal.model.Role> filterFindByUuid_C( 513 java.lang.String uuid, long companyId) 514 throws com.liferay.portal.kernel.exception.SystemException { 515 return getPersistence().filterFindByUuid_C(uuid, companyId); 516 } 517 518 /** 519 * Returns a range of all the roles that the user has permission to view where uuid = ? and companyId = ?. 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 523 * </p> 524 * 525 * @param uuid the uuid 526 * @param companyId the company ID 527 * @param start the lower bound of the range of roles 528 * @param end the upper bound of the range of roles (not inclusive) 529 * @return the range of matching roles that the user has permission to view 530 * @throws SystemException if a system exception occurred 531 */ 532 public static java.util.List<com.liferay.portal.model.Role> filterFindByUuid_C( 533 java.lang.String uuid, long companyId, int start, int end) 534 throws com.liferay.portal.kernel.exception.SystemException { 535 return getPersistence().filterFindByUuid_C(uuid, companyId, start, end); 536 } 537 538 /** 539 * Returns an ordered range of all the roles that the user has permissions to view where uuid = ? and companyId = ?. 540 * 541 * <p> 542 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 543 * </p> 544 * 545 * @param uuid the uuid 546 * @param companyId the company ID 547 * @param start the lower bound of the range of roles 548 * @param end the upper bound of the range of roles (not inclusive) 549 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 550 * @return the ordered range of matching roles that the user has permission to view 551 * @throws SystemException if a system exception occurred 552 */ 553 public static java.util.List<com.liferay.portal.model.Role> filterFindByUuid_C( 554 java.lang.String uuid, long companyId, int start, int end, 555 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 556 throws com.liferay.portal.kernel.exception.SystemException { 557 return getPersistence() 558 .filterFindByUuid_C(uuid, companyId, start, end, 559 orderByComparator); 560 } 561 562 /** 563 * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where uuid = ? and companyId = ?. 564 * 565 * @param roleId the primary key of the current role 566 * @param uuid the uuid 567 * @param companyId the company ID 568 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 569 * @return the previous, current, and next role 570 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 571 * @throws SystemException if a system exception occurred 572 */ 573 public static com.liferay.portal.model.Role[] filterFindByUuid_C_PrevAndNext( 574 long roleId, java.lang.String uuid, long companyId, 575 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 576 throws com.liferay.portal.NoSuchRoleException, 577 com.liferay.portal.kernel.exception.SystemException { 578 return getPersistence() 579 .filterFindByUuid_C_PrevAndNext(roleId, uuid, companyId, 580 orderByComparator); 581 } 582 583 /** 584 * Removes all the roles where uuid = ? and companyId = ? from the database. 585 * 586 * @param uuid the uuid 587 * @param companyId the company ID 588 * @throws SystemException if a system exception occurred 589 */ 590 public static void removeByUuid_C(java.lang.String uuid, long companyId) 591 throws com.liferay.portal.kernel.exception.SystemException { 592 getPersistence().removeByUuid_C(uuid, companyId); 593 } 594 595 /** 596 * Returns the number of roles where uuid = ? and companyId = ?. 597 * 598 * @param uuid the uuid 599 * @param companyId the company ID 600 * @return the number of matching roles 601 * @throws SystemException if a system exception occurred 602 */ 603 public static int countByUuid_C(java.lang.String uuid, long companyId) 604 throws com.liferay.portal.kernel.exception.SystemException { 605 return getPersistence().countByUuid_C(uuid, companyId); 606 } 607 608 /** 609 * Returns the number of roles that the user has permission to view where uuid = ? and companyId = ?. 610 * 611 * @param uuid the uuid 612 * @param companyId the company ID 613 * @return the number of matching roles that the user has permission to view 614 * @throws SystemException if a system exception occurred 615 */ 616 public static int filterCountByUuid_C(java.lang.String uuid, long companyId) 617 throws com.liferay.portal.kernel.exception.SystemException { 618 return getPersistence().filterCountByUuid_C(uuid, companyId); 619 } 620 621 /** 622 * Returns all the roles where companyId = ?. 623 * 624 * @param companyId the company ID 625 * @return the matching roles 626 * @throws SystemException if a system exception occurred 627 */ 628 public static java.util.List<com.liferay.portal.model.Role> findByCompanyId( 629 long companyId) 630 throws com.liferay.portal.kernel.exception.SystemException { 631 return getPersistence().findByCompanyId(companyId); 632 } 633 634 /** 635 * Returns a range of all the roles where companyId = ?. 636 * 637 * <p> 638 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 639 * </p> 640 * 641 * @param companyId the company ID 642 * @param start the lower bound of the range of roles 643 * @param end the upper bound of the range of roles (not inclusive) 644 * @return the range of matching roles 645 * @throws SystemException if a system exception occurred 646 */ 647 public static java.util.List<com.liferay.portal.model.Role> findByCompanyId( 648 long companyId, int start, int end) 649 throws com.liferay.portal.kernel.exception.SystemException { 650 return getPersistence().findByCompanyId(companyId, start, end); 651 } 652 653 /** 654 * Returns an ordered range of all the roles where companyId = ?. 655 * 656 * <p> 657 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 658 * </p> 659 * 660 * @param companyId the company ID 661 * @param start the lower bound of the range of roles 662 * @param end the upper bound of the range of roles (not inclusive) 663 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 664 * @return the ordered range of matching roles 665 * @throws SystemException if a system exception occurred 666 */ 667 public static java.util.List<com.liferay.portal.model.Role> findByCompanyId( 668 long companyId, int start, int end, 669 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 670 throws com.liferay.portal.kernel.exception.SystemException { 671 return getPersistence() 672 .findByCompanyId(companyId, start, end, orderByComparator); 673 } 674 675 /** 676 * Returns the first role in the ordered set where companyId = ?. 677 * 678 * @param companyId the company ID 679 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 680 * @return the first matching role 681 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 682 * @throws SystemException if a system exception occurred 683 */ 684 public static com.liferay.portal.model.Role findByCompanyId_First( 685 long companyId, 686 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 687 throws com.liferay.portal.NoSuchRoleException, 688 com.liferay.portal.kernel.exception.SystemException { 689 return getPersistence() 690 .findByCompanyId_First(companyId, orderByComparator); 691 } 692 693 /** 694 * Returns the first role in the ordered set where companyId = ?. 695 * 696 * @param companyId the company ID 697 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 698 * @return the first matching role, or <code>null</code> if a matching role could not be found 699 * @throws SystemException if a system exception occurred 700 */ 701 public static com.liferay.portal.model.Role fetchByCompanyId_First( 702 long companyId, 703 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 704 throws com.liferay.portal.kernel.exception.SystemException { 705 return getPersistence() 706 .fetchByCompanyId_First(companyId, orderByComparator); 707 } 708 709 /** 710 * Returns the last role in the ordered set where companyId = ?. 711 * 712 * @param companyId the company ID 713 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 714 * @return the last matching role 715 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 716 * @throws SystemException if a system exception occurred 717 */ 718 public static com.liferay.portal.model.Role findByCompanyId_Last( 719 long companyId, 720 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 721 throws com.liferay.portal.NoSuchRoleException, 722 com.liferay.portal.kernel.exception.SystemException { 723 return getPersistence() 724 .findByCompanyId_Last(companyId, orderByComparator); 725 } 726 727 /** 728 * Returns the last role in the ordered set where companyId = ?. 729 * 730 * @param companyId the company ID 731 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 732 * @return the last matching role, or <code>null</code> if a matching role could not be found 733 * @throws SystemException if a system exception occurred 734 */ 735 public static com.liferay.portal.model.Role fetchByCompanyId_Last( 736 long companyId, 737 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 738 throws com.liferay.portal.kernel.exception.SystemException { 739 return getPersistence() 740 .fetchByCompanyId_Last(companyId, orderByComparator); 741 } 742 743 /** 744 * Returns the roles before and after the current role in the ordered set where companyId = ?. 745 * 746 * @param roleId the primary key of the current role 747 * @param companyId the company ID 748 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 749 * @return the previous, current, and next role 750 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 751 * @throws SystemException if a system exception occurred 752 */ 753 public static com.liferay.portal.model.Role[] findByCompanyId_PrevAndNext( 754 long roleId, long companyId, 755 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 756 throws com.liferay.portal.NoSuchRoleException, 757 com.liferay.portal.kernel.exception.SystemException { 758 return getPersistence() 759 .findByCompanyId_PrevAndNext(roleId, companyId, 760 orderByComparator); 761 } 762 763 /** 764 * Returns all the roles that the user has permission to view where companyId = ?. 765 * 766 * @param companyId the company ID 767 * @return the matching roles that the user has permission to view 768 * @throws SystemException if a system exception occurred 769 */ 770 public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId( 771 long companyId) 772 throws com.liferay.portal.kernel.exception.SystemException { 773 return getPersistence().filterFindByCompanyId(companyId); 774 } 775 776 /** 777 * Returns a range of all the roles that the user has permission to view where companyId = ?. 778 * 779 * <p> 780 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 781 * </p> 782 * 783 * @param companyId the company ID 784 * @param start the lower bound of the range of roles 785 * @param end the upper bound of the range of roles (not inclusive) 786 * @return the range of matching roles that the user has permission to view 787 * @throws SystemException if a system exception occurred 788 */ 789 public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId( 790 long companyId, int start, int end) 791 throws com.liferay.portal.kernel.exception.SystemException { 792 return getPersistence().filterFindByCompanyId(companyId, start, end); 793 } 794 795 /** 796 * Returns an ordered range of all the roles that the user has permissions to view where companyId = ?. 797 * 798 * <p> 799 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 800 * </p> 801 * 802 * @param companyId the company ID 803 * @param start the lower bound of the range of roles 804 * @param end the upper bound of the range of roles (not inclusive) 805 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 806 * @return the ordered range of matching roles that the user has permission to view 807 * @throws SystemException if a system exception occurred 808 */ 809 public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId( 810 long companyId, int start, int end, 811 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 812 throws com.liferay.portal.kernel.exception.SystemException { 813 return getPersistence() 814 .filterFindByCompanyId(companyId, start, end, 815 orderByComparator); 816 } 817 818 /** 819 * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where companyId = ?. 820 * 821 * @param roleId the primary key of the current role 822 * @param companyId the company ID 823 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 824 * @return the previous, current, and next role 825 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 826 * @throws SystemException if a system exception occurred 827 */ 828 public static com.liferay.portal.model.Role[] filterFindByCompanyId_PrevAndNext( 829 long roleId, long companyId, 830 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 831 throws com.liferay.portal.NoSuchRoleException, 832 com.liferay.portal.kernel.exception.SystemException { 833 return getPersistence() 834 .filterFindByCompanyId_PrevAndNext(roleId, companyId, 835 orderByComparator); 836 } 837 838 /** 839 * Removes all the roles where companyId = ? from the database. 840 * 841 * @param companyId the company ID 842 * @throws SystemException if a system exception occurred 843 */ 844 public static void removeByCompanyId(long companyId) 845 throws com.liferay.portal.kernel.exception.SystemException { 846 getPersistence().removeByCompanyId(companyId); 847 } 848 849 /** 850 * Returns the number of roles where companyId = ?. 851 * 852 * @param companyId the company ID 853 * @return the number of matching roles 854 * @throws SystemException if a system exception occurred 855 */ 856 public static int countByCompanyId(long companyId) 857 throws com.liferay.portal.kernel.exception.SystemException { 858 return getPersistence().countByCompanyId(companyId); 859 } 860 861 /** 862 * Returns the number of roles that the user has permission to view where companyId = ?. 863 * 864 * @param companyId the company ID 865 * @return the number of matching roles that the user has permission to view 866 * @throws SystemException if a system exception occurred 867 */ 868 public static int filterCountByCompanyId(long companyId) 869 throws com.liferay.portal.kernel.exception.SystemException { 870 return getPersistence().filterCountByCompanyId(companyId); 871 } 872 873 /** 874 * Returns all the roles where name = ?. 875 * 876 * @param name the name 877 * @return the matching roles 878 * @throws SystemException if a system exception occurred 879 */ 880 public static java.util.List<com.liferay.portal.model.Role> findByName( 881 java.lang.String name) 882 throws com.liferay.portal.kernel.exception.SystemException { 883 return getPersistence().findByName(name); 884 } 885 886 /** 887 * Returns a range of all the roles where name = ?. 888 * 889 * <p> 890 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 891 * </p> 892 * 893 * @param name the name 894 * @param start the lower bound of the range of roles 895 * @param end the upper bound of the range of roles (not inclusive) 896 * @return the range of matching roles 897 * @throws SystemException if a system exception occurred 898 */ 899 public static java.util.List<com.liferay.portal.model.Role> findByName( 900 java.lang.String name, int start, int end) 901 throws com.liferay.portal.kernel.exception.SystemException { 902 return getPersistence().findByName(name, start, end); 903 } 904 905 /** 906 * Returns an ordered range of all the roles where name = ?. 907 * 908 * <p> 909 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 910 * </p> 911 * 912 * @param name the name 913 * @param start the lower bound of the range of roles 914 * @param end the upper bound of the range of roles (not inclusive) 915 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 916 * @return the ordered range of matching roles 917 * @throws SystemException if a system exception occurred 918 */ 919 public static java.util.List<com.liferay.portal.model.Role> findByName( 920 java.lang.String name, int start, int end, 921 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 922 throws com.liferay.portal.kernel.exception.SystemException { 923 return getPersistence().findByName(name, start, end, orderByComparator); 924 } 925 926 /** 927 * Returns the first role in the ordered set where name = ?. 928 * 929 * @param name the name 930 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 931 * @return the first matching role 932 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 933 * @throws SystemException if a system exception occurred 934 */ 935 public static com.liferay.portal.model.Role findByName_First( 936 java.lang.String name, 937 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 938 throws com.liferay.portal.NoSuchRoleException, 939 com.liferay.portal.kernel.exception.SystemException { 940 return getPersistence().findByName_First(name, orderByComparator); 941 } 942 943 /** 944 * Returns the first role in the ordered set where name = ?. 945 * 946 * @param name the name 947 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 948 * @return the first matching role, or <code>null</code> if a matching role could not be found 949 * @throws SystemException if a system exception occurred 950 */ 951 public static com.liferay.portal.model.Role fetchByName_First( 952 java.lang.String name, 953 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 954 throws com.liferay.portal.kernel.exception.SystemException { 955 return getPersistence().fetchByName_First(name, orderByComparator); 956 } 957 958 /** 959 * Returns the last role in the ordered set where name = ?. 960 * 961 * @param name the name 962 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 963 * @return the last matching role 964 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 965 * @throws SystemException if a system exception occurred 966 */ 967 public static com.liferay.portal.model.Role findByName_Last( 968 java.lang.String name, 969 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 970 throws com.liferay.portal.NoSuchRoleException, 971 com.liferay.portal.kernel.exception.SystemException { 972 return getPersistence().findByName_Last(name, orderByComparator); 973 } 974 975 /** 976 * Returns the last role in the ordered set where name = ?. 977 * 978 * @param name the name 979 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 980 * @return the last matching role, or <code>null</code> if a matching role could not be found 981 * @throws SystemException if a system exception occurred 982 */ 983 public static com.liferay.portal.model.Role fetchByName_Last( 984 java.lang.String name, 985 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 986 throws com.liferay.portal.kernel.exception.SystemException { 987 return getPersistence().fetchByName_Last(name, orderByComparator); 988 } 989 990 /** 991 * Returns the roles before and after the current role in the ordered set where name = ?. 992 * 993 * @param roleId the primary key of the current role 994 * @param name the name 995 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 996 * @return the previous, current, and next role 997 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 998 * @throws SystemException if a system exception occurred 999 */ 1000 public static com.liferay.portal.model.Role[] findByName_PrevAndNext( 1001 long roleId, java.lang.String name, 1002 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1003 throws com.liferay.portal.NoSuchRoleException, 1004 com.liferay.portal.kernel.exception.SystemException { 1005 return getPersistence() 1006 .findByName_PrevAndNext(roleId, name, orderByComparator); 1007 } 1008 1009 /** 1010 * Returns all the roles that the user has permission to view where name = ?. 1011 * 1012 * @param name the name 1013 * @return the matching roles that the user has permission to view 1014 * @throws SystemException if a system exception occurred 1015 */ 1016 public static java.util.List<com.liferay.portal.model.Role> filterFindByName( 1017 java.lang.String name) 1018 throws com.liferay.portal.kernel.exception.SystemException { 1019 return getPersistence().filterFindByName(name); 1020 } 1021 1022 /** 1023 * Returns a range of all the roles that the user has permission to view where name = ?. 1024 * 1025 * <p> 1026 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1027 * </p> 1028 * 1029 * @param name the name 1030 * @param start the lower bound of the range of roles 1031 * @param end the upper bound of the range of roles (not inclusive) 1032 * @return the range of matching roles that the user has permission to view 1033 * @throws SystemException if a system exception occurred 1034 */ 1035 public static java.util.List<com.liferay.portal.model.Role> filterFindByName( 1036 java.lang.String name, int start, int end) 1037 throws com.liferay.portal.kernel.exception.SystemException { 1038 return getPersistence().filterFindByName(name, start, end); 1039 } 1040 1041 /** 1042 * Returns an ordered range of all the roles that the user has permissions to view where name = ?. 1043 * 1044 * <p> 1045 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1046 * </p> 1047 * 1048 * @param name the name 1049 * @param start the lower bound of the range of roles 1050 * @param end the upper bound of the range of roles (not inclusive) 1051 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1052 * @return the ordered range of matching roles that the user has permission to view 1053 * @throws SystemException if a system exception occurred 1054 */ 1055 public static java.util.List<com.liferay.portal.model.Role> filterFindByName( 1056 java.lang.String name, int start, int end, 1057 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1058 throws com.liferay.portal.kernel.exception.SystemException { 1059 return getPersistence() 1060 .filterFindByName(name, start, end, orderByComparator); 1061 } 1062 1063 /** 1064 * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where name = ?. 1065 * 1066 * @param roleId the primary key of the current role 1067 * @param name the name 1068 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1069 * @return the previous, current, and next role 1070 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 1071 * @throws SystemException if a system exception occurred 1072 */ 1073 public static com.liferay.portal.model.Role[] filterFindByName_PrevAndNext( 1074 long roleId, java.lang.String name, 1075 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1076 throws com.liferay.portal.NoSuchRoleException, 1077 com.liferay.portal.kernel.exception.SystemException { 1078 return getPersistence() 1079 .filterFindByName_PrevAndNext(roleId, name, orderByComparator); 1080 } 1081 1082 /** 1083 * Removes all the roles where name = ? from the database. 1084 * 1085 * @param name the name 1086 * @throws SystemException if a system exception occurred 1087 */ 1088 public static void removeByName(java.lang.String name) 1089 throws com.liferay.portal.kernel.exception.SystemException { 1090 getPersistence().removeByName(name); 1091 } 1092 1093 /** 1094 * Returns the number of roles where name = ?. 1095 * 1096 * @param name the name 1097 * @return the number of matching roles 1098 * @throws SystemException if a system exception occurred 1099 */ 1100 public static int countByName(java.lang.String name) 1101 throws com.liferay.portal.kernel.exception.SystemException { 1102 return getPersistence().countByName(name); 1103 } 1104 1105 /** 1106 * Returns the number of roles that the user has permission to view where name = ?. 1107 * 1108 * @param name the name 1109 * @return the number of matching roles that the user has permission to view 1110 * @throws SystemException if a system exception occurred 1111 */ 1112 public static int filterCountByName(java.lang.String name) 1113 throws com.liferay.portal.kernel.exception.SystemException { 1114 return getPersistence().filterCountByName(name); 1115 } 1116 1117 /** 1118 * Returns all the roles where type = ?. 1119 * 1120 * @param type the type 1121 * @return the matching roles 1122 * @throws SystemException if a system exception occurred 1123 */ 1124 public static java.util.List<com.liferay.portal.model.Role> findByType( 1125 int type) throws com.liferay.portal.kernel.exception.SystemException { 1126 return getPersistence().findByType(type); 1127 } 1128 1129 /** 1130 * Returns a range of all the roles where type = ?. 1131 * 1132 * <p> 1133 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1134 * </p> 1135 * 1136 * @param type the type 1137 * @param start the lower bound of the range of roles 1138 * @param end the upper bound of the range of roles (not inclusive) 1139 * @return the range of matching roles 1140 * @throws SystemException if a system exception occurred 1141 */ 1142 public static java.util.List<com.liferay.portal.model.Role> findByType( 1143 int type, int start, int end) 1144 throws com.liferay.portal.kernel.exception.SystemException { 1145 return getPersistence().findByType(type, start, end); 1146 } 1147 1148 /** 1149 * Returns an ordered range of all the roles where type = ?. 1150 * 1151 * <p> 1152 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1153 * </p> 1154 * 1155 * @param type the type 1156 * @param start the lower bound of the range of roles 1157 * @param end the upper bound of the range of roles (not inclusive) 1158 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1159 * @return the ordered range of matching roles 1160 * @throws SystemException if a system exception occurred 1161 */ 1162 public static java.util.List<com.liferay.portal.model.Role> findByType( 1163 int type, int start, int end, 1164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1165 throws com.liferay.portal.kernel.exception.SystemException { 1166 return getPersistence().findByType(type, start, end, orderByComparator); 1167 } 1168 1169 /** 1170 * Returns the first role in the ordered set where type = ?. 1171 * 1172 * @param type the type 1173 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1174 * @return the first matching role 1175 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 1176 * @throws SystemException if a system exception occurred 1177 */ 1178 public static com.liferay.portal.model.Role findByType_First(int type, 1179 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1180 throws com.liferay.portal.NoSuchRoleException, 1181 com.liferay.portal.kernel.exception.SystemException { 1182 return getPersistence().findByType_First(type, orderByComparator); 1183 } 1184 1185 /** 1186 * Returns the first role in the ordered set where type = ?. 1187 * 1188 * @param type the type 1189 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1190 * @return the first matching role, or <code>null</code> if a matching role could not be found 1191 * @throws SystemException if a system exception occurred 1192 */ 1193 public static com.liferay.portal.model.Role fetchByType_First(int type, 1194 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1195 throws com.liferay.portal.kernel.exception.SystemException { 1196 return getPersistence().fetchByType_First(type, orderByComparator); 1197 } 1198 1199 /** 1200 * Returns the last role in the ordered set where type = ?. 1201 * 1202 * @param type the type 1203 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1204 * @return the last matching role 1205 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 1206 * @throws SystemException if a system exception occurred 1207 */ 1208 public static com.liferay.portal.model.Role findByType_Last(int type, 1209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1210 throws com.liferay.portal.NoSuchRoleException, 1211 com.liferay.portal.kernel.exception.SystemException { 1212 return getPersistence().findByType_Last(type, orderByComparator); 1213 } 1214 1215 /** 1216 * Returns the last role in the ordered set where type = ?. 1217 * 1218 * @param type the type 1219 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1220 * @return the last matching role, or <code>null</code> if a matching role could not be found 1221 * @throws SystemException if a system exception occurred 1222 */ 1223 public static com.liferay.portal.model.Role fetchByType_Last(int type, 1224 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1225 throws com.liferay.portal.kernel.exception.SystemException { 1226 return getPersistence().fetchByType_Last(type, orderByComparator); 1227 } 1228 1229 /** 1230 * Returns the roles before and after the current role in the ordered set where type = ?. 1231 * 1232 * @param roleId the primary key of the current role 1233 * @param type the type 1234 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1235 * @return the previous, current, and next role 1236 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 1237 * @throws SystemException if a system exception occurred 1238 */ 1239 public static com.liferay.portal.model.Role[] findByType_PrevAndNext( 1240 long roleId, int type, 1241 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1242 throws com.liferay.portal.NoSuchRoleException, 1243 com.liferay.portal.kernel.exception.SystemException { 1244 return getPersistence() 1245 .findByType_PrevAndNext(roleId, type, orderByComparator); 1246 } 1247 1248 /** 1249 * Returns all the roles that the user has permission to view where type = ?. 1250 * 1251 * @param type the type 1252 * @return the matching roles that the user has permission to view 1253 * @throws SystemException if a system exception occurred 1254 */ 1255 public static java.util.List<com.liferay.portal.model.Role> filterFindByType( 1256 int type) throws com.liferay.portal.kernel.exception.SystemException { 1257 return getPersistence().filterFindByType(type); 1258 } 1259 1260 /** 1261 * Returns a range of all the roles that the user has permission to view where type = ?. 1262 * 1263 * <p> 1264 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1265 * </p> 1266 * 1267 * @param type the type 1268 * @param start the lower bound of the range of roles 1269 * @param end the upper bound of the range of roles (not inclusive) 1270 * @return the range of matching roles that the user has permission to view 1271 * @throws SystemException if a system exception occurred 1272 */ 1273 public static java.util.List<com.liferay.portal.model.Role> filterFindByType( 1274 int type, int start, int end) 1275 throws com.liferay.portal.kernel.exception.SystemException { 1276 return getPersistence().filterFindByType(type, start, end); 1277 } 1278 1279 /** 1280 * Returns an ordered range of all the roles that the user has permissions to view where type = ?. 1281 * 1282 * <p> 1283 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1284 * </p> 1285 * 1286 * @param type the type 1287 * @param start the lower bound of the range of roles 1288 * @param end the upper bound of the range of roles (not inclusive) 1289 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1290 * @return the ordered range of matching roles that the user has permission to view 1291 * @throws SystemException if a system exception occurred 1292 */ 1293 public static java.util.List<com.liferay.portal.model.Role> filterFindByType( 1294 int type, int start, int end, 1295 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1296 throws com.liferay.portal.kernel.exception.SystemException { 1297 return getPersistence() 1298 .filterFindByType(type, start, end, orderByComparator); 1299 } 1300 1301 /** 1302 * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where type = ?. 1303 * 1304 * @param roleId the primary key of the current role 1305 * @param type the type 1306 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1307 * @return the previous, current, and next role 1308 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 1309 * @throws SystemException if a system exception occurred 1310 */ 1311 public static com.liferay.portal.model.Role[] filterFindByType_PrevAndNext( 1312 long roleId, int type, 1313 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1314 throws com.liferay.portal.NoSuchRoleException, 1315 com.liferay.portal.kernel.exception.SystemException { 1316 return getPersistence() 1317 .filterFindByType_PrevAndNext(roleId, type, orderByComparator); 1318 } 1319 1320 /** 1321 * Removes all the roles where type = ? from the database. 1322 * 1323 * @param type the type 1324 * @throws SystemException if a system exception occurred 1325 */ 1326 public static void removeByType(int type) 1327 throws com.liferay.portal.kernel.exception.SystemException { 1328 getPersistence().removeByType(type); 1329 } 1330 1331 /** 1332 * Returns the number of roles where type = ?. 1333 * 1334 * @param type the type 1335 * @return the number of matching roles 1336 * @throws SystemException if a system exception occurred 1337 */ 1338 public static int countByType(int type) 1339 throws com.liferay.portal.kernel.exception.SystemException { 1340 return getPersistence().countByType(type); 1341 } 1342 1343 /** 1344 * Returns the number of roles that the user has permission to view where type = ?. 1345 * 1346 * @param type the type 1347 * @return the number of matching roles that the user has permission to view 1348 * @throws SystemException if a system exception occurred 1349 */ 1350 public static int filterCountByType(int type) 1351 throws com.liferay.portal.kernel.exception.SystemException { 1352 return getPersistence().filterCountByType(type); 1353 } 1354 1355 /** 1356 * Returns all the roles where subtype = ?. 1357 * 1358 * @param subtype the subtype 1359 * @return the matching roles 1360 * @throws SystemException if a system exception occurred 1361 */ 1362 public static java.util.List<com.liferay.portal.model.Role> findBySubtype( 1363 java.lang.String subtype) 1364 throws com.liferay.portal.kernel.exception.SystemException { 1365 return getPersistence().findBySubtype(subtype); 1366 } 1367 1368 /** 1369 * Returns a range of all the roles where subtype = ?. 1370 * 1371 * <p> 1372 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1373 * </p> 1374 * 1375 * @param subtype the subtype 1376 * @param start the lower bound of the range of roles 1377 * @param end the upper bound of the range of roles (not inclusive) 1378 * @return the range of matching roles 1379 * @throws SystemException if a system exception occurred 1380 */ 1381 public static java.util.List<com.liferay.portal.model.Role> findBySubtype( 1382 java.lang.String subtype, int start, int end) 1383 throws com.liferay.portal.kernel.exception.SystemException { 1384 return getPersistence().findBySubtype(subtype, start, end); 1385 } 1386 1387 /** 1388 * Returns an ordered range of all the roles where subtype = ?. 1389 * 1390 * <p> 1391 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1392 * </p> 1393 * 1394 * @param subtype the subtype 1395 * @param start the lower bound of the range of roles 1396 * @param end the upper bound of the range of roles (not inclusive) 1397 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1398 * @return the ordered range of matching roles 1399 * @throws SystemException if a system exception occurred 1400 */ 1401 public static java.util.List<com.liferay.portal.model.Role> findBySubtype( 1402 java.lang.String subtype, int start, int end, 1403 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1404 throws com.liferay.portal.kernel.exception.SystemException { 1405 return getPersistence() 1406 .findBySubtype(subtype, start, end, orderByComparator); 1407 } 1408 1409 /** 1410 * Returns the first role in the ordered set where subtype = ?. 1411 * 1412 * @param subtype the subtype 1413 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1414 * @return the first matching role 1415 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 1416 * @throws SystemException if a system exception occurred 1417 */ 1418 public static com.liferay.portal.model.Role findBySubtype_First( 1419 java.lang.String subtype, 1420 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1421 throws com.liferay.portal.NoSuchRoleException, 1422 com.liferay.portal.kernel.exception.SystemException { 1423 return getPersistence().findBySubtype_First(subtype, orderByComparator); 1424 } 1425 1426 /** 1427 * Returns the first role in the ordered set where subtype = ?. 1428 * 1429 * @param subtype the subtype 1430 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1431 * @return the first matching role, or <code>null</code> if a matching role could not be found 1432 * @throws SystemException if a system exception occurred 1433 */ 1434 public static com.liferay.portal.model.Role fetchBySubtype_First( 1435 java.lang.String subtype, 1436 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1437 throws com.liferay.portal.kernel.exception.SystemException { 1438 return getPersistence().fetchBySubtype_First(subtype, orderByComparator); 1439 } 1440 1441 /** 1442 * Returns the last role in the ordered set where subtype = ?. 1443 * 1444 * @param subtype the subtype 1445 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1446 * @return the last matching role 1447 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 1448 * @throws SystemException if a system exception occurred 1449 */ 1450 public static com.liferay.portal.model.Role findBySubtype_Last( 1451 java.lang.String subtype, 1452 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1453 throws com.liferay.portal.NoSuchRoleException, 1454 com.liferay.portal.kernel.exception.SystemException { 1455 return getPersistence().findBySubtype_Last(subtype, orderByComparator); 1456 } 1457 1458 /** 1459 * Returns the last role in the ordered set where subtype = ?. 1460 * 1461 * @param subtype the subtype 1462 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1463 * @return the last matching role, or <code>null</code> if a matching role could not be found 1464 * @throws SystemException if a system exception occurred 1465 */ 1466 public static com.liferay.portal.model.Role fetchBySubtype_Last( 1467 java.lang.String subtype, 1468 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1469 throws com.liferay.portal.kernel.exception.SystemException { 1470 return getPersistence().fetchBySubtype_Last(subtype, orderByComparator); 1471 } 1472 1473 /** 1474 * Returns the roles before and after the current role in the ordered set where subtype = ?. 1475 * 1476 * @param roleId the primary key of the current role 1477 * @param subtype the subtype 1478 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1479 * @return the previous, current, and next role 1480 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 1481 * @throws SystemException if a system exception occurred 1482 */ 1483 public static com.liferay.portal.model.Role[] findBySubtype_PrevAndNext( 1484 long roleId, java.lang.String subtype, 1485 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1486 throws com.liferay.portal.NoSuchRoleException, 1487 com.liferay.portal.kernel.exception.SystemException { 1488 return getPersistence() 1489 .findBySubtype_PrevAndNext(roleId, subtype, orderByComparator); 1490 } 1491 1492 /** 1493 * Returns all the roles that the user has permission to view where subtype = ?. 1494 * 1495 * @param subtype the subtype 1496 * @return the matching roles that the user has permission to view 1497 * @throws SystemException if a system exception occurred 1498 */ 1499 public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype( 1500 java.lang.String subtype) 1501 throws com.liferay.portal.kernel.exception.SystemException { 1502 return getPersistence().filterFindBySubtype(subtype); 1503 } 1504 1505 /** 1506 * Returns a range of all the roles that the user has permission to view where subtype = ?. 1507 * 1508 * <p> 1509 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1510 * </p> 1511 * 1512 * @param subtype the subtype 1513 * @param start the lower bound of the range of roles 1514 * @param end the upper bound of the range of roles (not inclusive) 1515 * @return the range of matching roles that the user has permission to view 1516 * @throws SystemException if a system exception occurred 1517 */ 1518 public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype( 1519 java.lang.String subtype, int start, int end) 1520 throws com.liferay.portal.kernel.exception.SystemException { 1521 return getPersistence().filterFindBySubtype(subtype, start, end); 1522 } 1523 1524 /** 1525 * Returns an ordered range of all the roles that the user has permissions to view where subtype = ?. 1526 * 1527 * <p> 1528 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1529 * </p> 1530 * 1531 * @param subtype the subtype 1532 * @param start the lower bound of the range of roles 1533 * @param end the upper bound of the range of roles (not inclusive) 1534 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1535 * @return the ordered range of matching roles that the user has permission to view 1536 * @throws SystemException if a system exception occurred 1537 */ 1538 public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype( 1539 java.lang.String subtype, int start, int end, 1540 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1541 throws com.liferay.portal.kernel.exception.SystemException { 1542 return getPersistence() 1543 .filterFindBySubtype(subtype, start, end, orderByComparator); 1544 } 1545 1546 /** 1547 * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where subtype = ?. 1548 * 1549 * @param roleId the primary key of the current role 1550 * @param subtype the subtype 1551 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1552 * @return the previous, current, and next role 1553 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 1554 * @throws SystemException if a system exception occurred 1555 */ 1556 public static com.liferay.portal.model.Role[] filterFindBySubtype_PrevAndNext( 1557 long roleId, java.lang.String subtype, 1558 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1559 throws com.liferay.portal.NoSuchRoleException, 1560 com.liferay.portal.kernel.exception.SystemException { 1561 return getPersistence() 1562 .filterFindBySubtype_PrevAndNext(roleId, subtype, 1563 orderByComparator); 1564 } 1565 1566 /** 1567 * Removes all the roles where subtype = ? from the database. 1568 * 1569 * @param subtype the subtype 1570 * @throws SystemException if a system exception occurred 1571 */ 1572 public static void removeBySubtype(java.lang.String subtype) 1573 throws com.liferay.portal.kernel.exception.SystemException { 1574 getPersistence().removeBySubtype(subtype); 1575 } 1576 1577 /** 1578 * Returns the number of roles where subtype = ?. 1579 * 1580 * @param subtype the subtype 1581 * @return the number of matching roles 1582 * @throws SystemException if a system exception occurred 1583 */ 1584 public static int countBySubtype(java.lang.String subtype) 1585 throws com.liferay.portal.kernel.exception.SystemException { 1586 return getPersistence().countBySubtype(subtype); 1587 } 1588 1589 /** 1590 * Returns the number of roles that the user has permission to view where subtype = ?. 1591 * 1592 * @param subtype the subtype 1593 * @return the number of matching roles that the user has permission to view 1594 * @throws SystemException if a system exception occurred 1595 */ 1596 public static int filterCountBySubtype(java.lang.String subtype) 1597 throws com.liferay.portal.kernel.exception.SystemException { 1598 return getPersistence().filterCountBySubtype(subtype); 1599 } 1600 1601 /** 1602 * Returns the role where companyId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found. 1603 * 1604 * @param companyId the company ID 1605 * @param name the name 1606 * @return the matching role 1607 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 1608 * @throws SystemException if a system exception occurred 1609 */ 1610 public static com.liferay.portal.model.Role findByC_N(long companyId, 1611 java.lang.String name) 1612 throws com.liferay.portal.NoSuchRoleException, 1613 com.liferay.portal.kernel.exception.SystemException { 1614 return getPersistence().findByC_N(companyId, name); 1615 } 1616 1617 /** 1618 * Returns the role where companyId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 1619 * 1620 * @param companyId the company ID 1621 * @param name the name 1622 * @return the matching role, or <code>null</code> if a matching role could not be found 1623 * @throws SystemException if a system exception occurred 1624 */ 1625 public static com.liferay.portal.model.Role fetchByC_N(long companyId, 1626 java.lang.String name) 1627 throws com.liferay.portal.kernel.exception.SystemException { 1628 return getPersistence().fetchByC_N(companyId, name); 1629 } 1630 1631 /** 1632 * Returns the role where companyId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 1633 * 1634 * @param companyId the company ID 1635 * @param name the name 1636 * @param retrieveFromCache whether to use the finder cache 1637 * @return the matching role, or <code>null</code> if a matching role could not be found 1638 * @throws SystemException if a system exception occurred 1639 */ 1640 public static com.liferay.portal.model.Role fetchByC_N(long companyId, 1641 java.lang.String name, boolean retrieveFromCache) 1642 throws com.liferay.portal.kernel.exception.SystemException { 1643 return getPersistence().fetchByC_N(companyId, name, retrieveFromCache); 1644 } 1645 1646 /** 1647 * Removes the role where companyId = ? and name = ? from the database. 1648 * 1649 * @param companyId the company ID 1650 * @param name the name 1651 * @return the role that was removed 1652 * @throws SystemException if a system exception occurred 1653 */ 1654 public static com.liferay.portal.model.Role removeByC_N(long companyId, 1655 java.lang.String name) 1656 throws com.liferay.portal.NoSuchRoleException, 1657 com.liferay.portal.kernel.exception.SystemException { 1658 return getPersistence().removeByC_N(companyId, name); 1659 } 1660 1661 /** 1662 * Returns the number of roles where companyId = ? and name = ?. 1663 * 1664 * @param companyId the company ID 1665 * @param name the name 1666 * @return the number of matching roles 1667 * @throws SystemException if a system exception occurred 1668 */ 1669 public static int countByC_N(long companyId, java.lang.String name) 1670 throws com.liferay.portal.kernel.exception.SystemException { 1671 return getPersistence().countByC_N(companyId, name); 1672 } 1673 1674 /** 1675 * Returns all the roles where type = ? and subtype = ?. 1676 * 1677 * @param type the type 1678 * @param subtype the subtype 1679 * @return the matching roles 1680 * @throws SystemException if a system exception occurred 1681 */ 1682 public static java.util.List<com.liferay.portal.model.Role> findByT_S( 1683 int type, java.lang.String subtype) 1684 throws com.liferay.portal.kernel.exception.SystemException { 1685 return getPersistence().findByT_S(type, subtype); 1686 } 1687 1688 /** 1689 * Returns a range of all the roles where type = ? and subtype = ?. 1690 * 1691 * <p> 1692 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1693 * </p> 1694 * 1695 * @param type the type 1696 * @param subtype the subtype 1697 * @param start the lower bound of the range of roles 1698 * @param end the upper bound of the range of roles (not inclusive) 1699 * @return the range of matching roles 1700 * @throws SystemException if a system exception occurred 1701 */ 1702 public static java.util.List<com.liferay.portal.model.Role> findByT_S( 1703 int type, java.lang.String subtype, int start, int end) 1704 throws com.liferay.portal.kernel.exception.SystemException { 1705 return getPersistence().findByT_S(type, subtype, start, end); 1706 } 1707 1708 /** 1709 * Returns an ordered range of all the roles where type = ? and subtype = ?. 1710 * 1711 * <p> 1712 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1713 * </p> 1714 * 1715 * @param type the type 1716 * @param subtype the subtype 1717 * @param start the lower bound of the range of roles 1718 * @param end the upper bound of the range of roles (not inclusive) 1719 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1720 * @return the ordered range of matching roles 1721 * @throws SystemException if a system exception occurred 1722 */ 1723 public static java.util.List<com.liferay.portal.model.Role> findByT_S( 1724 int type, java.lang.String subtype, int start, int end, 1725 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1726 throws com.liferay.portal.kernel.exception.SystemException { 1727 return getPersistence() 1728 .findByT_S(type, subtype, start, end, orderByComparator); 1729 } 1730 1731 /** 1732 * Returns the first role in the ordered set where type = ? and subtype = ?. 1733 * 1734 * @param type the type 1735 * @param subtype the subtype 1736 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1737 * @return the first matching role 1738 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 1739 * @throws SystemException if a system exception occurred 1740 */ 1741 public static com.liferay.portal.model.Role findByT_S_First(int type, 1742 java.lang.String subtype, 1743 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1744 throws com.liferay.portal.NoSuchRoleException, 1745 com.liferay.portal.kernel.exception.SystemException { 1746 return getPersistence().findByT_S_First(type, subtype, orderByComparator); 1747 } 1748 1749 /** 1750 * Returns the first role in the ordered set where type = ? and subtype = ?. 1751 * 1752 * @param type the type 1753 * @param subtype the subtype 1754 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1755 * @return the first matching role, or <code>null</code> if a matching role could not be found 1756 * @throws SystemException if a system exception occurred 1757 */ 1758 public static com.liferay.portal.model.Role fetchByT_S_First(int type, 1759 java.lang.String subtype, 1760 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1761 throws com.liferay.portal.kernel.exception.SystemException { 1762 return getPersistence() 1763 .fetchByT_S_First(type, subtype, orderByComparator); 1764 } 1765 1766 /** 1767 * Returns the last role in the ordered set where type = ? and subtype = ?. 1768 * 1769 * @param type the type 1770 * @param subtype the subtype 1771 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1772 * @return the last matching role 1773 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 1774 * @throws SystemException if a system exception occurred 1775 */ 1776 public static com.liferay.portal.model.Role findByT_S_Last(int type, 1777 java.lang.String subtype, 1778 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1779 throws com.liferay.portal.NoSuchRoleException, 1780 com.liferay.portal.kernel.exception.SystemException { 1781 return getPersistence().findByT_S_Last(type, subtype, orderByComparator); 1782 } 1783 1784 /** 1785 * Returns the last role in the ordered set where type = ? and subtype = ?. 1786 * 1787 * @param type the type 1788 * @param subtype the subtype 1789 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1790 * @return the last matching role, or <code>null</code> if a matching role could not be found 1791 * @throws SystemException if a system exception occurred 1792 */ 1793 public static com.liferay.portal.model.Role fetchByT_S_Last(int type, 1794 java.lang.String subtype, 1795 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1796 throws com.liferay.portal.kernel.exception.SystemException { 1797 return getPersistence().fetchByT_S_Last(type, subtype, orderByComparator); 1798 } 1799 1800 /** 1801 * Returns the roles before and after the current role in the ordered set where type = ? and subtype = ?. 1802 * 1803 * @param roleId the primary key of the current role 1804 * @param type the type 1805 * @param subtype the subtype 1806 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1807 * @return the previous, current, and next role 1808 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 1809 * @throws SystemException if a system exception occurred 1810 */ 1811 public static com.liferay.portal.model.Role[] findByT_S_PrevAndNext( 1812 long roleId, int type, java.lang.String subtype, 1813 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1814 throws com.liferay.portal.NoSuchRoleException, 1815 com.liferay.portal.kernel.exception.SystemException { 1816 return getPersistence() 1817 .findByT_S_PrevAndNext(roleId, type, subtype, 1818 orderByComparator); 1819 } 1820 1821 /** 1822 * Returns all the roles that the user has permission to view where type = ? and subtype = ?. 1823 * 1824 * @param type the type 1825 * @param subtype the subtype 1826 * @return the matching roles that the user has permission to view 1827 * @throws SystemException if a system exception occurred 1828 */ 1829 public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S( 1830 int type, java.lang.String subtype) 1831 throws com.liferay.portal.kernel.exception.SystemException { 1832 return getPersistence().filterFindByT_S(type, subtype); 1833 } 1834 1835 /** 1836 * Returns a range of all the roles that the user has permission to view where type = ? and subtype = ?. 1837 * 1838 * <p> 1839 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1840 * </p> 1841 * 1842 * @param type the type 1843 * @param subtype the subtype 1844 * @param start the lower bound of the range of roles 1845 * @param end the upper bound of the range of roles (not inclusive) 1846 * @return the range of matching roles that the user has permission to view 1847 * @throws SystemException if a system exception occurred 1848 */ 1849 public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S( 1850 int type, java.lang.String subtype, int start, int end) 1851 throws com.liferay.portal.kernel.exception.SystemException { 1852 return getPersistence().filterFindByT_S(type, subtype, start, end); 1853 } 1854 1855 /** 1856 * Returns an ordered range of all the roles that the user has permissions to view where type = ? and subtype = ?. 1857 * 1858 * <p> 1859 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1860 * </p> 1861 * 1862 * @param type the type 1863 * @param subtype the subtype 1864 * @param start the lower bound of the range of roles 1865 * @param end the upper bound of the range of roles (not inclusive) 1866 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1867 * @return the ordered range of matching roles that the user has permission to view 1868 * @throws SystemException if a system exception occurred 1869 */ 1870 public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S( 1871 int type, java.lang.String subtype, int start, int end, 1872 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1873 throws com.liferay.portal.kernel.exception.SystemException { 1874 return getPersistence() 1875 .filterFindByT_S(type, subtype, start, end, orderByComparator); 1876 } 1877 1878 /** 1879 * Returns the roles before and after the current role in the ordered set of roles that the user has permission to view where type = ? and subtype = ?. 1880 * 1881 * @param roleId the primary key of the current role 1882 * @param type the type 1883 * @param subtype the subtype 1884 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1885 * @return the previous, current, and next role 1886 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 1887 * @throws SystemException if a system exception occurred 1888 */ 1889 public static com.liferay.portal.model.Role[] filterFindByT_S_PrevAndNext( 1890 long roleId, int type, java.lang.String subtype, 1891 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1892 throws com.liferay.portal.NoSuchRoleException, 1893 com.liferay.portal.kernel.exception.SystemException { 1894 return getPersistence() 1895 .filterFindByT_S_PrevAndNext(roleId, type, subtype, 1896 orderByComparator); 1897 } 1898 1899 /** 1900 * Removes all the roles where type = ? and subtype = ? from the database. 1901 * 1902 * @param type the type 1903 * @param subtype the subtype 1904 * @throws SystemException if a system exception occurred 1905 */ 1906 public static void removeByT_S(int type, java.lang.String subtype) 1907 throws com.liferay.portal.kernel.exception.SystemException { 1908 getPersistence().removeByT_S(type, subtype); 1909 } 1910 1911 /** 1912 * Returns the number of roles where type = ? and subtype = ?. 1913 * 1914 * @param type the type 1915 * @param subtype the subtype 1916 * @return the number of matching roles 1917 * @throws SystemException if a system exception occurred 1918 */ 1919 public static int countByT_S(int type, java.lang.String subtype) 1920 throws com.liferay.portal.kernel.exception.SystemException { 1921 return getPersistence().countByT_S(type, subtype); 1922 } 1923 1924 /** 1925 * Returns the number of roles that the user has permission to view where type = ? and subtype = ?. 1926 * 1927 * @param type the type 1928 * @param subtype the subtype 1929 * @return the number of matching roles that the user has permission to view 1930 * @throws SystemException if a system exception occurred 1931 */ 1932 public static int filterCountByT_S(int type, java.lang.String subtype) 1933 throws com.liferay.portal.kernel.exception.SystemException { 1934 return getPersistence().filterCountByT_S(type, subtype); 1935 } 1936 1937 /** 1938 * Returns the role where companyId = ? and classNameId = ? and classPK = ? or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found. 1939 * 1940 * @param companyId the company ID 1941 * @param classNameId the class name ID 1942 * @param classPK the class p k 1943 * @return the matching role 1944 * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found 1945 * @throws SystemException if a system exception occurred 1946 */ 1947 public static com.liferay.portal.model.Role findByC_C_C(long companyId, 1948 long classNameId, long classPK) 1949 throws com.liferay.portal.NoSuchRoleException, 1950 com.liferay.portal.kernel.exception.SystemException { 1951 return getPersistence().findByC_C_C(companyId, classNameId, classPK); 1952 } 1953 1954 /** 1955 * Returns the role where companyId = ? and classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 1956 * 1957 * @param companyId the company ID 1958 * @param classNameId the class name ID 1959 * @param classPK the class p k 1960 * @return the matching role, or <code>null</code> if a matching role could not be found 1961 * @throws SystemException if a system exception occurred 1962 */ 1963 public static com.liferay.portal.model.Role fetchByC_C_C(long companyId, 1964 long classNameId, long classPK) 1965 throws com.liferay.portal.kernel.exception.SystemException { 1966 return getPersistence().fetchByC_C_C(companyId, classNameId, classPK); 1967 } 1968 1969 /** 1970 * Returns the role where companyId = ? and classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 1971 * 1972 * @param companyId the company ID 1973 * @param classNameId the class name ID 1974 * @param classPK the class p k 1975 * @param retrieveFromCache whether to use the finder cache 1976 * @return the matching role, or <code>null</code> if a matching role could not be found 1977 * @throws SystemException if a system exception occurred 1978 */ 1979 public static com.liferay.portal.model.Role fetchByC_C_C(long companyId, 1980 long classNameId, long classPK, boolean retrieveFromCache) 1981 throws com.liferay.portal.kernel.exception.SystemException { 1982 return getPersistence() 1983 .fetchByC_C_C(companyId, classNameId, classPK, 1984 retrieveFromCache); 1985 } 1986 1987 /** 1988 * Removes the role where companyId = ? and classNameId = ? and classPK = ? from the database. 1989 * 1990 * @param companyId the company ID 1991 * @param classNameId the class name ID 1992 * @param classPK the class p k 1993 * @return the role that was removed 1994 * @throws SystemException if a system exception occurred 1995 */ 1996 public static com.liferay.portal.model.Role removeByC_C_C(long companyId, 1997 long classNameId, long classPK) 1998 throws com.liferay.portal.NoSuchRoleException, 1999 com.liferay.portal.kernel.exception.SystemException { 2000 return getPersistence().removeByC_C_C(companyId, classNameId, classPK); 2001 } 2002 2003 /** 2004 * Returns the number of roles where companyId = ? and classNameId = ? and classPK = ?. 2005 * 2006 * @param companyId the company ID 2007 * @param classNameId the class name ID 2008 * @param classPK the class p k 2009 * @return the number of matching roles 2010 * @throws SystemException if a system exception occurred 2011 */ 2012 public static int countByC_C_C(long companyId, long classNameId, 2013 long classPK) 2014 throws com.liferay.portal.kernel.exception.SystemException { 2015 return getPersistence().countByC_C_C(companyId, classNameId, classPK); 2016 } 2017 2018 /** 2019 * Caches the role in the entity cache if it is enabled. 2020 * 2021 * @param role the role 2022 */ 2023 public static void cacheResult(com.liferay.portal.model.Role role) { 2024 getPersistence().cacheResult(role); 2025 } 2026 2027 /** 2028 * Caches the roles in the entity cache if it is enabled. 2029 * 2030 * @param roles the roles 2031 */ 2032 public static void cacheResult( 2033 java.util.List<com.liferay.portal.model.Role> roles) { 2034 getPersistence().cacheResult(roles); 2035 } 2036 2037 /** 2038 * Creates a new role with the primary key. Does not add the role to the database. 2039 * 2040 * @param roleId the primary key for the new role 2041 * @return the new role 2042 */ 2043 public static com.liferay.portal.model.Role create(long roleId) { 2044 return getPersistence().create(roleId); 2045 } 2046 2047 /** 2048 * Removes the role with the primary key from the database. Also notifies the appropriate model listeners. 2049 * 2050 * @param roleId the primary key of the role 2051 * @return the role that was removed 2052 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 2053 * @throws SystemException if a system exception occurred 2054 */ 2055 public static com.liferay.portal.model.Role remove(long roleId) 2056 throws com.liferay.portal.NoSuchRoleException, 2057 com.liferay.portal.kernel.exception.SystemException { 2058 return getPersistence().remove(roleId); 2059 } 2060 2061 public static com.liferay.portal.model.Role updateImpl( 2062 com.liferay.portal.model.Role role) 2063 throws com.liferay.portal.kernel.exception.SystemException { 2064 return getPersistence().updateImpl(role); 2065 } 2066 2067 /** 2068 * Returns the role with the primary key or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found. 2069 * 2070 * @param roleId the primary key of the role 2071 * @return the role 2072 * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found 2073 * @throws SystemException if a system exception occurred 2074 */ 2075 public static com.liferay.portal.model.Role findByPrimaryKey(long roleId) 2076 throws com.liferay.portal.NoSuchRoleException, 2077 com.liferay.portal.kernel.exception.SystemException { 2078 return getPersistence().findByPrimaryKey(roleId); 2079 } 2080 2081 /** 2082 * Returns the role with the primary key or returns <code>null</code> if it could not be found. 2083 * 2084 * @param roleId the primary key of the role 2085 * @return the role, or <code>null</code> if a role with the primary key could not be found 2086 * @throws SystemException if a system exception occurred 2087 */ 2088 public static com.liferay.portal.model.Role fetchByPrimaryKey(long roleId) 2089 throws com.liferay.portal.kernel.exception.SystemException { 2090 return getPersistence().fetchByPrimaryKey(roleId); 2091 } 2092 2093 /** 2094 * Returns all the roles. 2095 * 2096 * @return the roles 2097 * @throws SystemException if a system exception occurred 2098 */ 2099 public static java.util.List<com.liferay.portal.model.Role> findAll() 2100 throws com.liferay.portal.kernel.exception.SystemException { 2101 return getPersistence().findAll(); 2102 } 2103 2104 /** 2105 * Returns a range of all the roles. 2106 * 2107 * <p> 2108 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 2109 * </p> 2110 * 2111 * @param start the lower bound of the range of roles 2112 * @param end the upper bound of the range of roles (not inclusive) 2113 * @return the range of roles 2114 * @throws SystemException if a system exception occurred 2115 */ 2116 public static java.util.List<com.liferay.portal.model.Role> findAll( 2117 int start, int end) 2118 throws com.liferay.portal.kernel.exception.SystemException { 2119 return getPersistence().findAll(start, end); 2120 } 2121 2122 /** 2123 * Returns an ordered range of all the roles. 2124 * 2125 * <p> 2126 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 2127 * </p> 2128 * 2129 * @param start the lower bound of the range of roles 2130 * @param end the upper bound of the range of roles (not inclusive) 2131 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 2132 * @return the ordered range of roles 2133 * @throws SystemException if a system exception occurred 2134 */ 2135 public static java.util.List<com.liferay.portal.model.Role> findAll( 2136 int start, int end, 2137 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 2138 throws com.liferay.portal.kernel.exception.SystemException { 2139 return getPersistence().findAll(start, end, orderByComparator); 2140 } 2141 2142 /** 2143 * Removes all the roles from the database. 2144 * 2145 * @throws SystemException if a system exception occurred 2146 */ 2147 public static void removeAll() 2148 throws com.liferay.portal.kernel.exception.SystemException { 2149 getPersistence().removeAll(); 2150 } 2151 2152 /** 2153 * Returns the number of roles. 2154 * 2155 * @return the number of roles 2156 * @throws SystemException if a system exception occurred 2157 */ 2158 public static int countAll() 2159 throws com.liferay.portal.kernel.exception.SystemException { 2160 return getPersistence().countAll(); 2161 } 2162 2163 /** 2164 * Returns all the groups associated with the role. 2165 * 2166 * @param pk the primary key of the role 2167 * @return the groups associated with the role 2168 * @throws SystemException if a system exception occurred 2169 */ 2170 public static java.util.List<com.liferay.portal.model.Group> getGroups( 2171 long pk) throws com.liferay.portal.kernel.exception.SystemException { 2172 return getPersistence().getGroups(pk); 2173 } 2174 2175 /** 2176 * Returns a range of all the groups associated with the role. 2177 * 2178 * <p> 2179 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 2180 * </p> 2181 * 2182 * @param pk the primary key of the role 2183 * @param start the lower bound of the range of roles 2184 * @param end the upper bound of the range of roles (not inclusive) 2185 * @return the range of groups associated with the role 2186 * @throws SystemException if a system exception occurred 2187 */ 2188 public static java.util.List<com.liferay.portal.model.Group> getGroups( 2189 long pk, int start, int end) 2190 throws com.liferay.portal.kernel.exception.SystemException { 2191 return getPersistence().getGroups(pk, start, end); 2192 } 2193 2194 /** 2195 * Returns an ordered range of all the groups associated with the role. 2196 * 2197 * <p> 2198 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 2199 * </p> 2200 * 2201 * @param pk the primary key of the role 2202 * @param start the lower bound of the range of roles 2203 * @param end the upper bound of the range of roles (not inclusive) 2204 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 2205 * @return the ordered range of groups associated with the role 2206 * @throws SystemException if a system exception occurred 2207 */ 2208 public static java.util.List<com.liferay.portal.model.Group> getGroups( 2209 long pk, int start, int end, 2210 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 2211 throws com.liferay.portal.kernel.exception.SystemException { 2212 return getPersistence().getGroups(pk, start, end, orderByComparator); 2213 } 2214 2215 /** 2216 * Returns the number of groups associated with the role. 2217 * 2218 * @param pk the primary key of the role 2219 * @return the number of groups associated with the role 2220 * @throws SystemException if a system exception occurred 2221 */ 2222 public static int getGroupsSize(long pk) 2223 throws com.liferay.portal.kernel.exception.SystemException { 2224 return getPersistence().getGroupsSize(pk); 2225 } 2226 2227 /** 2228 * Returns <code>true</code> if the group is associated with the role. 2229 * 2230 * @param pk the primary key of the role 2231 * @param groupPK the primary key of the group 2232 * @return <code>true</code> if the group is associated with the role; <code>false</code> otherwise 2233 * @throws SystemException if a system exception occurred 2234 */ 2235 public static boolean containsGroup(long pk, long groupPK) 2236 throws com.liferay.portal.kernel.exception.SystemException { 2237 return getPersistence().containsGroup(pk, groupPK); 2238 } 2239 2240 /** 2241 * Returns <code>true</code> if the role has any groups associated with it. 2242 * 2243 * @param pk the primary key of the role to check for associations with groups 2244 * @return <code>true</code> if the role has any groups associated with it; <code>false</code> otherwise 2245 * @throws SystemException if a system exception occurred 2246 */ 2247 public static boolean containsGroups(long pk) 2248 throws com.liferay.portal.kernel.exception.SystemException { 2249 return getPersistence().containsGroups(pk); 2250 } 2251 2252 /** 2253 * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2254 * 2255 * @param pk the primary key of the role 2256 * @param groupPK the primary key of the group 2257 * @throws SystemException if a system exception occurred 2258 */ 2259 public static void addGroup(long pk, long groupPK) 2260 throws com.liferay.portal.kernel.exception.SystemException { 2261 getPersistence().addGroup(pk, groupPK); 2262 } 2263 2264 /** 2265 * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2266 * 2267 * @param pk the primary key of the role 2268 * @param group the group 2269 * @throws SystemException if a system exception occurred 2270 */ 2271 public static void addGroup(long pk, com.liferay.portal.model.Group group) 2272 throws com.liferay.portal.kernel.exception.SystemException { 2273 getPersistence().addGroup(pk, group); 2274 } 2275 2276 /** 2277 * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2278 * 2279 * @param pk the primary key of the role 2280 * @param groupPKs the primary keys of the groups 2281 * @throws SystemException if a system exception occurred 2282 */ 2283 public static void addGroups(long pk, long[] groupPKs) 2284 throws com.liferay.portal.kernel.exception.SystemException { 2285 getPersistence().addGroups(pk, groupPKs); 2286 } 2287 2288 /** 2289 * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2290 * 2291 * @param pk the primary key of the role 2292 * @param groups the groups 2293 * @throws SystemException if a system exception occurred 2294 */ 2295 public static void addGroups(long pk, 2296 java.util.List<com.liferay.portal.model.Group> groups) 2297 throws com.liferay.portal.kernel.exception.SystemException { 2298 getPersistence().addGroups(pk, groups); 2299 } 2300 2301 /** 2302 * Clears all associations between the role and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2303 * 2304 * @param pk the primary key of the role to clear the associated groups from 2305 * @throws SystemException if a system exception occurred 2306 */ 2307 public static void clearGroups(long pk) 2308 throws com.liferay.portal.kernel.exception.SystemException { 2309 getPersistence().clearGroups(pk); 2310 } 2311 2312 /** 2313 * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2314 * 2315 * @param pk the primary key of the role 2316 * @param groupPK the primary key of the group 2317 * @throws SystemException if a system exception occurred 2318 */ 2319 public static void removeGroup(long pk, long groupPK) 2320 throws com.liferay.portal.kernel.exception.SystemException { 2321 getPersistence().removeGroup(pk, groupPK); 2322 } 2323 2324 /** 2325 * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2326 * 2327 * @param pk the primary key of the role 2328 * @param group the group 2329 * @throws SystemException if a system exception occurred 2330 */ 2331 public static void removeGroup(long pk, com.liferay.portal.model.Group group) 2332 throws com.liferay.portal.kernel.exception.SystemException { 2333 getPersistence().removeGroup(pk, group); 2334 } 2335 2336 /** 2337 * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2338 * 2339 * @param pk the primary key of the role 2340 * @param groupPKs the primary keys of the groups 2341 * @throws SystemException if a system exception occurred 2342 */ 2343 public static void removeGroups(long pk, long[] groupPKs) 2344 throws com.liferay.portal.kernel.exception.SystemException { 2345 getPersistence().removeGroups(pk, groupPKs); 2346 } 2347 2348 /** 2349 * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2350 * 2351 * @param pk the primary key of the role 2352 * @param groups the groups 2353 * @throws SystemException if a system exception occurred 2354 */ 2355 public static void removeGroups(long pk, 2356 java.util.List<com.liferay.portal.model.Group> groups) 2357 throws com.liferay.portal.kernel.exception.SystemException { 2358 getPersistence().removeGroups(pk, groups); 2359 } 2360 2361 /** 2362 * 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. 2363 * 2364 * @param pk the primary key of the role 2365 * @param groupPKs the primary keys of the groups to be associated with the role 2366 * @throws SystemException if a system exception occurred 2367 */ 2368 public static void setGroups(long pk, long[] groupPKs) 2369 throws com.liferay.portal.kernel.exception.SystemException { 2370 getPersistence().setGroups(pk, groupPKs); 2371 } 2372 2373 /** 2374 * 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. 2375 * 2376 * @param pk the primary key of the role 2377 * @param groups the groups to be associated with the role 2378 * @throws SystemException if a system exception occurred 2379 */ 2380 public static void setGroups(long pk, 2381 java.util.List<com.liferay.portal.model.Group> groups) 2382 throws com.liferay.portal.kernel.exception.SystemException { 2383 getPersistence().setGroups(pk, groups); 2384 } 2385 2386 /** 2387 * Returns all the users associated with the role. 2388 * 2389 * @param pk the primary key of the role 2390 * @return the users associated with the role 2391 * @throws SystemException if a system exception occurred 2392 */ 2393 public static java.util.List<com.liferay.portal.model.User> getUsers( 2394 long pk) throws com.liferay.portal.kernel.exception.SystemException { 2395 return getPersistence().getUsers(pk); 2396 } 2397 2398 /** 2399 * Returns a range of all the users associated with the role. 2400 * 2401 * <p> 2402 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 2403 * </p> 2404 * 2405 * @param pk the primary key of the role 2406 * @param start the lower bound of the range of roles 2407 * @param end the upper bound of the range of roles (not inclusive) 2408 * @return the range of users associated with the role 2409 * @throws SystemException if a system exception occurred 2410 */ 2411 public static java.util.List<com.liferay.portal.model.User> getUsers( 2412 long pk, int start, int end) 2413 throws com.liferay.portal.kernel.exception.SystemException { 2414 return getPersistence().getUsers(pk, start, end); 2415 } 2416 2417 /** 2418 * Returns an ordered range of all the users associated with the role. 2419 * 2420 * <p> 2421 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 2422 * </p> 2423 * 2424 * @param pk the primary key of the role 2425 * @param start the lower bound of the range of roles 2426 * @param end the upper bound of the range of roles (not inclusive) 2427 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 2428 * @return the ordered range of users associated with the role 2429 * @throws SystemException if a system exception occurred 2430 */ 2431 public static java.util.List<com.liferay.portal.model.User> getUsers( 2432 long pk, int start, int end, 2433 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 2434 throws com.liferay.portal.kernel.exception.SystemException { 2435 return getPersistence().getUsers(pk, start, end, orderByComparator); 2436 } 2437 2438 /** 2439 * Returns the number of users associated with the role. 2440 * 2441 * @param pk the primary key of the role 2442 * @return the number of users associated with the role 2443 * @throws SystemException if a system exception occurred 2444 */ 2445 public static int getUsersSize(long pk) 2446 throws com.liferay.portal.kernel.exception.SystemException { 2447 return getPersistence().getUsersSize(pk); 2448 } 2449 2450 /** 2451 * Returns <code>true</code> if the user is associated with the role. 2452 * 2453 * @param pk the primary key of the role 2454 * @param userPK the primary key of the user 2455 * @return <code>true</code> if the user is associated with the role; <code>false</code> otherwise 2456 * @throws SystemException if a system exception occurred 2457 */ 2458 public static boolean containsUser(long pk, long userPK) 2459 throws com.liferay.portal.kernel.exception.SystemException { 2460 return getPersistence().containsUser(pk, userPK); 2461 } 2462 2463 /** 2464 * Returns <code>true</code> if the role has any users associated with it. 2465 * 2466 * @param pk the primary key of the role to check for associations with users 2467 * @return <code>true</code> if the role has any users associated with it; <code>false</code> otherwise 2468 * @throws SystemException if a system exception occurred 2469 */ 2470 public static boolean containsUsers(long pk) 2471 throws com.liferay.portal.kernel.exception.SystemException { 2472 return getPersistence().containsUsers(pk); 2473 } 2474 2475 /** 2476 * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2477 * 2478 * @param pk the primary key of the role 2479 * @param userPK the primary key of the user 2480 * @throws SystemException if a system exception occurred 2481 */ 2482 public static void addUser(long pk, long userPK) 2483 throws com.liferay.portal.kernel.exception.SystemException { 2484 getPersistence().addUser(pk, userPK); 2485 } 2486 2487 /** 2488 * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2489 * 2490 * @param pk the primary key of the role 2491 * @param user the user 2492 * @throws SystemException if a system exception occurred 2493 */ 2494 public static void addUser(long pk, com.liferay.portal.model.User user) 2495 throws com.liferay.portal.kernel.exception.SystemException { 2496 getPersistence().addUser(pk, user); 2497 } 2498 2499 /** 2500 * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2501 * 2502 * @param pk the primary key of the role 2503 * @param userPKs the primary keys of the users 2504 * @throws SystemException if a system exception occurred 2505 */ 2506 public static void addUsers(long pk, long[] userPKs) 2507 throws com.liferay.portal.kernel.exception.SystemException { 2508 getPersistence().addUsers(pk, userPKs); 2509 } 2510 2511 /** 2512 * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2513 * 2514 * @param pk the primary key of the role 2515 * @param users the users 2516 * @throws SystemException if a system exception occurred 2517 */ 2518 public static void addUsers(long pk, 2519 java.util.List<com.liferay.portal.model.User> users) 2520 throws com.liferay.portal.kernel.exception.SystemException { 2521 getPersistence().addUsers(pk, users); 2522 } 2523 2524 /** 2525 * Clears all associations between the role and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2526 * 2527 * @param pk the primary key of the role to clear the associated users from 2528 * @throws SystemException if a system exception occurred 2529 */ 2530 public static void clearUsers(long pk) 2531 throws com.liferay.portal.kernel.exception.SystemException { 2532 getPersistence().clearUsers(pk); 2533 } 2534 2535 /** 2536 * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2537 * 2538 * @param pk the primary key of the role 2539 * @param userPK the primary key of the user 2540 * @throws SystemException if a system exception occurred 2541 */ 2542 public static void removeUser(long pk, long userPK) 2543 throws com.liferay.portal.kernel.exception.SystemException { 2544 getPersistence().removeUser(pk, userPK); 2545 } 2546 2547 /** 2548 * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2549 * 2550 * @param pk the primary key of the role 2551 * @param user the user 2552 * @throws SystemException if a system exception occurred 2553 */ 2554 public static void removeUser(long pk, com.liferay.portal.model.User user) 2555 throws com.liferay.portal.kernel.exception.SystemException { 2556 getPersistence().removeUser(pk, user); 2557 } 2558 2559 /** 2560 * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2561 * 2562 * @param pk the primary key of the role 2563 * @param userPKs the primary keys of the users 2564 * @throws SystemException if a system exception occurred 2565 */ 2566 public static void removeUsers(long pk, long[] userPKs) 2567 throws com.liferay.portal.kernel.exception.SystemException { 2568 getPersistence().removeUsers(pk, userPKs); 2569 } 2570 2571 /** 2572 * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2573 * 2574 * @param pk the primary key of the role 2575 * @param users the users 2576 * @throws SystemException if a system exception occurred 2577 */ 2578 public static void removeUsers(long pk, 2579 java.util.List<com.liferay.portal.model.User> users) 2580 throws com.liferay.portal.kernel.exception.SystemException { 2581 getPersistence().removeUsers(pk, users); 2582 } 2583 2584 /** 2585 * 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. 2586 * 2587 * @param pk the primary key of the role 2588 * @param userPKs the primary keys of the users to be associated with the role 2589 * @throws SystemException if a system exception occurred 2590 */ 2591 public static void setUsers(long pk, long[] userPKs) 2592 throws com.liferay.portal.kernel.exception.SystemException { 2593 getPersistence().setUsers(pk, userPKs); 2594 } 2595 2596 /** 2597 * 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. 2598 * 2599 * @param pk the primary key of the role 2600 * @param users the users to be associated with the role 2601 * @throws SystemException if a system exception occurred 2602 */ 2603 public static void setUsers(long pk, 2604 java.util.List<com.liferay.portal.model.User> users) 2605 throws com.liferay.portal.kernel.exception.SystemException { 2606 getPersistence().setUsers(pk, users); 2607 } 2608 2609 public static RolePersistence getPersistence() { 2610 if (_persistence == null) { 2611 _persistence = (RolePersistence)PortalBeanLocatorUtil.locate(RolePersistence.class.getName()); 2612 2613 ReferenceRegistry.registerReference(RoleUtil.class, "_persistence"); 2614 } 2615 2616 return _persistence; 2617 } 2618 2619 /** 2620 * @deprecated As of 6.2.0 2621 */ 2622 public void setPersistence(RolePersistence persistence) { 2623 } 2624 2625 private static RolePersistence _persistence; 2626 }