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.UserGroupRole; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the user group role service. This utility wraps {@link UserGroupRolePersistenceImpl} 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 UserGroupRolePersistence 036 * @see UserGroupRolePersistenceImpl 037 * @generated 038 */ 039 public class UserGroupRoleUtil { 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(UserGroupRole userGroupRole) { 057 getPersistence().clearCache(userGroupRole); 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<UserGroupRole> findWithDynamicQuery( 072 DynamicQuery dynamicQuery) 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<UserGroupRole> findWithDynamicQuery( 080 DynamicQuery dynamicQuery, int start, int end) 081 throws SystemException { 082 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 083 } 084 085 /** 086 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 087 */ 088 public static List<UserGroupRole> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator orderByComparator) throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 098 */ 099 public static UserGroupRole update(UserGroupRole userGroupRole, 100 boolean merge) throws SystemException { 101 return getPersistence().update(userGroupRole, merge); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 106 */ 107 public static UserGroupRole update(UserGroupRole userGroupRole, 108 boolean merge, ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(userGroupRole, merge, serviceContext); 110 } 111 112 /** 113 * Caches the user group role in the entity cache if it is enabled. 114 * 115 * @param userGroupRole the user group role 116 */ 117 public static void cacheResult( 118 com.liferay.portal.model.UserGroupRole userGroupRole) { 119 getPersistence().cacheResult(userGroupRole); 120 } 121 122 /** 123 * Caches the user group roles in the entity cache if it is enabled. 124 * 125 * @param userGroupRoles the user group roles 126 */ 127 public static void cacheResult( 128 java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles) { 129 getPersistence().cacheResult(userGroupRoles); 130 } 131 132 /** 133 * Creates a new user group role with the primary key. Does not add the user group role to the database. 134 * 135 * @param userGroupRolePK the primary key for the new user group role 136 * @return the new user group role 137 */ 138 public static com.liferay.portal.model.UserGroupRole create( 139 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) { 140 return getPersistence().create(userGroupRolePK); 141 } 142 143 /** 144 * Removes the user group role with the primary key from the database. Also notifies the appropriate model listeners. 145 * 146 * @param userGroupRolePK the primary key of the user group role 147 * @return the user group role that was removed 148 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found 149 * @throws SystemException if a system exception occurred 150 */ 151 public static com.liferay.portal.model.UserGroupRole remove( 152 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) 153 throws com.liferay.portal.NoSuchUserGroupRoleException, 154 com.liferay.portal.kernel.exception.SystemException { 155 return getPersistence().remove(userGroupRolePK); 156 } 157 158 public static com.liferay.portal.model.UserGroupRole updateImpl( 159 com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge) 160 throws com.liferay.portal.kernel.exception.SystemException { 161 return getPersistence().updateImpl(userGroupRole, merge); 162 } 163 164 /** 165 * Returns the user group role with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupRoleException} if it could not be found. 166 * 167 * @param userGroupRolePK the primary key of the user group role 168 * @return the user group role 169 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found 170 * @throws SystemException if a system exception occurred 171 */ 172 public static com.liferay.portal.model.UserGroupRole findByPrimaryKey( 173 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) 174 throws com.liferay.portal.NoSuchUserGroupRoleException, 175 com.liferay.portal.kernel.exception.SystemException { 176 return getPersistence().findByPrimaryKey(userGroupRolePK); 177 } 178 179 /** 180 * Returns the user group role with the primary key or returns <code>null</code> if it could not be found. 181 * 182 * @param userGroupRolePK the primary key of the user group role 183 * @return the user group role, or <code>null</code> if a user group role with the primary key could not be found 184 * @throws SystemException if a system exception occurred 185 */ 186 public static com.liferay.portal.model.UserGroupRole fetchByPrimaryKey( 187 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) 188 throws com.liferay.portal.kernel.exception.SystemException { 189 return getPersistence().fetchByPrimaryKey(userGroupRolePK); 190 } 191 192 /** 193 * Returns all the user group roles where userId = ?. 194 * 195 * @param userId the user ID 196 * @return the matching user group roles 197 * @throws SystemException if a system exception occurred 198 */ 199 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId( 200 long userId) throws com.liferay.portal.kernel.exception.SystemException { 201 return getPersistence().findByUserId(userId); 202 } 203 204 /** 205 * Returns a range of all the user group roles where userId = ?. 206 * 207 * <p> 208 * 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. 209 * </p> 210 * 211 * @param userId the user ID 212 * @param start the lower bound of the range of user group roles 213 * @param end the upper bound of the range of user group roles (not inclusive) 214 * @return the range of matching user group roles 215 * @throws SystemException if a system exception occurred 216 */ 217 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId( 218 long userId, int start, int end) 219 throws com.liferay.portal.kernel.exception.SystemException { 220 return getPersistence().findByUserId(userId, start, end); 221 } 222 223 /** 224 * Returns an ordered range of all the user group roles where userId = ?. 225 * 226 * <p> 227 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 228 * </p> 229 * 230 * @param userId the user ID 231 * @param start the lower bound of the range of user group roles 232 * @param end the upper bound of the range of user group roles (not inclusive) 233 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 234 * @return the ordered range of matching user group roles 235 * @throws SystemException if a system exception occurred 236 */ 237 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId( 238 long userId, int start, int end, 239 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 240 throws com.liferay.portal.kernel.exception.SystemException { 241 return getPersistence() 242 .findByUserId(userId, start, end, orderByComparator); 243 } 244 245 /** 246 * Returns the first user group role in the ordered set where userId = ?. 247 * 248 * @param userId the user ID 249 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 250 * @return the first matching user group role 251 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found 252 * @throws SystemException if a system exception occurred 253 */ 254 public static com.liferay.portal.model.UserGroupRole findByUserId_First( 255 long userId, 256 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 257 throws com.liferay.portal.NoSuchUserGroupRoleException, 258 com.liferay.portal.kernel.exception.SystemException { 259 return getPersistence().findByUserId_First(userId, orderByComparator); 260 } 261 262 /** 263 * Returns the first user group role in the ordered set where userId = ?. 264 * 265 * @param userId the user ID 266 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 267 * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found 268 * @throws SystemException if a system exception occurred 269 */ 270 public static com.liferay.portal.model.UserGroupRole fetchByUserId_First( 271 long userId, 272 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 273 throws com.liferay.portal.kernel.exception.SystemException { 274 return getPersistence().fetchByUserId_First(userId, orderByComparator); 275 } 276 277 /** 278 * Returns the last user group role in the ordered set where userId = ?. 279 * 280 * @param userId the user ID 281 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 282 * @return the last matching user group role 283 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portal.model.UserGroupRole findByUserId_Last( 287 long userId, 288 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 289 throws com.liferay.portal.NoSuchUserGroupRoleException, 290 com.liferay.portal.kernel.exception.SystemException { 291 return getPersistence().findByUserId_Last(userId, orderByComparator); 292 } 293 294 /** 295 * Returns the last user group role in the ordered set where userId = ?. 296 * 297 * @param userId the user ID 298 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 299 * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found 300 * @throws SystemException if a system exception occurred 301 */ 302 public static com.liferay.portal.model.UserGroupRole fetchByUserId_Last( 303 long userId, 304 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 305 throws com.liferay.portal.kernel.exception.SystemException { 306 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 307 } 308 309 /** 310 * Returns the user group roles before and after the current user group role in the ordered set where userId = ?. 311 * 312 * @param userGroupRolePK the primary key of the current user group role 313 * @param userId the user ID 314 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 315 * @return the previous, current, and next user group role 316 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found 317 * @throws SystemException if a system exception occurred 318 */ 319 public static com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext( 320 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK, 321 long userId, 322 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 323 throws com.liferay.portal.NoSuchUserGroupRoleException, 324 com.liferay.portal.kernel.exception.SystemException { 325 return getPersistence() 326 .findByUserId_PrevAndNext(userGroupRolePK, userId, 327 orderByComparator); 328 } 329 330 /** 331 * Returns all the user group roles where groupId = ?. 332 * 333 * @param groupId the group ID 334 * @return the matching user group roles 335 * @throws SystemException if a system exception occurred 336 */ 337 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId( 338 long groupId) 339 throws com.liferay.portal.kernel.exception.SystemException { 340 return getPersistence().findByGroupId(groupId); 341 } 342 343 /** 344 * Returns a range of all the user group roles where groupId = ?. 345 * 346 * <p> 347 * 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. 348 * </p> 349 * 350 * @param groupId the group ID 351 * @param start the lower bound of the range of user group roles 352 * @param end the upper bound of the range of user group roles (not inclusive) 353 * @return the range of matching user group roles 354 * @throws SystemException if a system exception occurred 355 */ 356 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId( 357 long groupId, int start, int end) 358 throws com.liferay.portal.kernel.exception.SystemException { 359 return getPersistence().findByGroupId(groupId, start, end); 360 } 361 362 /** 363 * Returns an ordered range of all the user group roles where groupId = ?. 364 * 365 * <p> 366 * 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. 367 * </p> 368 * 369 * @param groupId the group ID 370 * @param start the lower bound of the range of user group roles 371 * @param end the upper bound of the range of user group roles (not inclusive) 372 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 373 * @return the ordered range of matching user group roles 374 * @throws SystemException if a system exception occurred 375 */ 376 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId( 377 long groupId, int start, int end, 378 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 379 throws com.liferay.portal.kernel.exception.SystemException { 380 return getPersistence() 381 .findByGroupId(groupId, start, end, orderByComparator); 382 } 383 384 /** 385 * Returns the first user group role in the ordered set where groupId = ?. 386 * 387 * @param groupId the group ID 388 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 389 * @return the first matching user group role 390 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found 391 * @throws SystemException if a system exception occurred 392 */ 393 public static com.liferay.portal.model.UserGroupRole findByGroupId_First( 394 long groupId, 395 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 396 throws com.liferay.portal.NoSuchUserGroupRoleException, 397 com.liferay.portal.kernel.exception.SystemException { 398 return getPersistence().findByGroupId_First(groupId, orderByComparator); 399 } 400 401 /** 402 * Returns the first user group role in the ordered set where groupId = ?. 403 * 404 * @param groupId the group ID 405 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 406 * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found 407 * @throws SystemException if a system exception occurred 408 */ 409 public static com.liferay.portal.model.UserGroupRole fetchByGroupId_First( 410 long groupId, 411 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 412 throws com.liferay.portal.kernel.exception.SystemException { 413 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 414 } 415 416 /** 417 * Returns the last user group role in the ordered set where groupId = ?. 418 * 419 * @param groupId the group ID 420 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 421 * @return the last matching user group role 422 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found 423 * @throws SystemException if a system exception occurred 424 */ 425 public static com.liferay.portal.model.UserGroupRole findByGroupId_Last( 426 long groupId, 427 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 428 throws com.liferay.portal.NoSuchUserGroupRoleException, 429 com.liferay.portal.kernel.exception.SystemException { 430 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 431 } 432 433 /** 434 * Returns the last user group role in the ordered set where groupId = ?. 435 * 436 * @param groupId the group ID 437 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 438 * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found 439 * @throws SystemException if a system exception occurred 440 */ 441 public static com.liferay.portal.model.UserGroupRole fetchByGroupId_Last( 442 long groupId, 443 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 444 throws com.liferay.portal.kernel.exception.SystemException { 445 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 446 } 447 448 /** 449 * Returns the user group roles before and after the current user group role in the ordered set where groupId = ?. 450 * 451 * @param userGroupRolePK the primary key of the current user group role 452 * @param groupId the group ID 453 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 454 * @return the previous, current, and next user group role 455 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found 456 * @throws SystemException if a system exception occurred 457 */ 458 public static com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext( 459 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK, 460 long groupId, 461 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 462 throws com.liferay.portal.NoSuchUserGroupRoleException, 463 com.liferay.portal.kernel.exception.SystemException { 464 return getPersistence() 465 .findByGroupId_PrevAndNext(userGroupRolePK, groupId, 466 orderByComparator); 467 } 468 469 /** 470 * Returns all the user group roles where roleId = ?. 471 * 472 * @param roleId the role ID 473 * @return the matching user group roles 474 * @throws SystemException if a system exception occurred 475 */ 476 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId( 477 long roleId) throws com.liferay.portal.kernel.exception.SystemException { 478 return getPersistence().findByRoleId(roleId); 479 } 480 481 /** 482 * Returns a range of all the user group roles where roleId = ?. 483 * 484 * <p> 485 * 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. 486 * </p> 487 * 488 * @param roleId the role ID 489 * @param start the lower bound of the range of user group roles 490 * @param end the upper bound of the range of user group roles (not inclusive) 491 * @return the range of matching user group roles 492 * @throws SystemException if a system exception occurred 493 */ 494 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId( 495 long roleId, int start, int end) 496 throws com.liferay.portal.kernel.exception.SystemException { 497 return getPersistence().findByRoleId(roleId, start, end); 498 } 499 500 /** 501 * Returns an ordered range of all the user group roles where roleId = ?. 502 * 503 * <p> 504 * 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. 505 * </p> 506 * 507 * @param roleId the role ID 508 * @param start the lower bound of the range of user group roles 509 * @param end the upper bound of the range of user group roles (not inclusive) 510 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 511 * @return the ordered range of matching user group roles 512 * @throws SystemException if a system exception occurred 513 */ 514 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId( 515 long roleId, int start, int end, 516 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 517 throws com.liferay.portal.kernel.exception.SystemException { 518 return getPersistence() 519 .findByRoleId(roleId, start, end, orderByComparator); 520 } 521 522 /** 523 * Returns the first user group role in the ordered set where roleId = ?. 524 * 525 * @param roleId the role ID 526 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 527 * @return the first matching user group role 528 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found 529 * @throws SystemException if a system exception occurred 530 */ 531 public static com.liferay.portal.model.UserGroupRole findByRoleId_First( 532 long roleId, 533 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 534 throws com.liferay.portal.NoSuchUserGroupRoleException, 535 com.liferay.portal.kernel.exception.SystemException { 536 return getPersistence().findByRoleId_First(roleId, orderByComparator); 537 } 538 539 /** 540 * Returns the first user group role in the ordered set where roleId = ?. 541 * 542 * @param roleId the role ID 543 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 544 * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found 545 * @throws SystemException if a system exception occurred 546 */ 547 public static com.liferay.portal.model.UserGroupRole fetchByRoleId_First( 548 long roleId, 549 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 550 throws com.liferay.portal.kernel.exception.SystemException { 551 return getPersistence().fetchByRoleId_First(roleId, orderByComparator); 552 } 553 554 /** 555 * Returns the last user group role in the ordered set where roleId = ?. 556 * 557 * @param roleId the role ID 558 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 559 * @return the last matching user group role 560 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found 561 * @throws SystemException if a system exception occurred 562 */ 563 public static com.liferay.portal.model.UserGroupRole findByRoleId_Last( 564 long roleId, 565 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 566 throws com.liferay.portal.NoSuchUserGroupRoleException, 567 com.liferay.portal.kernel.exception.SystemException { 568 return getPersistence().findByRoleId_Last(roleId, orderByComparator); 569 } 570 571 /** 572 * Returns the last user group role in the ordered set where roleId = ?. 573 * 574 * @param roleId the role ID 575 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 576 * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found 577 * @throws SystemException if a system exception occurred 578 */ 579 public static com.liferay.portal.model.UserGroupRole fetchByRoleId_Last( 580 long roleId, 581 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 582 throws com.liferay.portal.kernel.exception.SystemException { 583 return getPersistence().fetchByRoleId_Last(roleId, orderByComparator); 584 } 585 586 /** 587 * Returns the user group roles before and after the current user group role in the ordered set where roleId = ?. 588 * 589 * @param userGroupRolePK the primary key of the current user group role 590 * @param roleId the role ID 591 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 592 * @return the previous, current, and next user group role 593 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found 594 * @throws SystemException if a system exception occurred 595 */ 596 public static com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext( 597 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK, 598 long roleId, 599 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 600 throws com.liferay.portal.NoSuchUserGroupRoleException, 601 com.liferay.portal.kernel.exception.SystemException { 602 return getPersistence() 603 .findByRoleId_PrevAndNext(userGroupRolePK, roleId, 604 orderByComparator); 605 } 606 607 /** 608 * Returns all the user group roles where userId = ? and groupId = ?. 609 * 610 * @param userId the user ID 611 * @param groupId the group ID 612 * @return the matching user group roles 613 * @throws SystemException if a system exception occurred 614 */ 615 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G( 616 long userId, long groupId) 617 throws com.liferay.portal.kernel.exception.SystemException { 618 return getPersistence().findByU_G(userId, groupId); 619 } 620 621 /** 622 * Returns a range of all the user group roles where userId = ? and groupId = ?. 623 * 624 * <p> 625 * 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. 626 * </p> 627 * 628 * @param userId the user ID 629 * @param groupId the group ID 630 * @param start the lower bound of the range of user group roles 631 * @param end the upper bound of the range of user group roles (not inclusive) 632 * @return the range of matching user group roles 633 * @throws SystemException if a system exception occurred 634 */ 635 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G( 636 long userId, long groupId, int start, int end) 637 throws com.liferay.portal.kernel.exception.SystemException { 638 return getPersistence().findByU_G(userId, groupId, start, end); 639 } 640 641 /** 642 * Returns an ordered range of all the user group roles where userId = ? and groupId = ?. 643 * 644 * <p> 645 * 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. 646 * </p> 647 * 648 * @param userId the user ID 649 * @param groupId the group ID 650 * @param start the lower bound of the range of user group roles 651 * @param end the upper bound of the range of user group roles (not inclusive) 652 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 653 * @return the ordered range of matching user group roles 654 * @throws SystemException if a system exception occurred 655 */ 656 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G( 657 long userId, long groupId, int start, int end, 658 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 659 throws com.liferay.portal.kernel.exception.SystemException { 660 return getPersistence() 661 .findByU_G(userId, groupId, start, end, orderByComparator); 662 } 663 664 /** 665 * Returns the first user group role in the ordered set where userId = ? and groupId = ?. 666 * 667 * @param userId the user ID 668 * @param groupId the group ID 669 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 670 * @return the first matching user group role 671 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found 672 * @throws SystemException if a system exception occurred 673 */ 674 public static com.liferay.portal.model.UserGroupRole findByU_G_First( 675 long userId, long groupId, 676 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 677 throws com.liferay.portal.NoSuchUserGroupRoleException, 678 com.liferay.portal.kernel.exception.SystemException { 679 return getPersistence() 680 .findByU_G_First(userId, groupId, orderByComparator); 681 } 682 683 /** 684 * Returns the first user group role in the ordered set where userId = ? and groupId = ?. 685 * 686 * @param userId the user ID 687 * @param groupId the group ID 688 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 689 * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found 690 * @throws SystemException if a system exception occurred 691 */ 692 public static com.liferay.portal.model.UserGroupRole fetchByU_G_First( 693 long userId, long groupId, 694 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 695 throws com.liferay.portal.kernel.exception.SystemException { 696 return getPersistence() 697 .fetchByU_G_First(userId, groupId, orderByComparator); 698 } 699 700 /** 701 * Returns the last user group role in the ordered set where userId = ? and groupId = ?. 702 * 703 * @param userId the user ID 704 * @param groupId the group ID 705 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 706 * @return the last matching user group role 707 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found 708 * @throws SystemException if a system exception occurred 709 */ 710 public static com.liferay.portal.model.UserGroupRole findByU_G_Last( 711 long userId, long groupId, 712 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 713 throws com.liferay.portal.NoSuchUserGroupRoleException, 714 com.liferay.portal.kernel.exception.SystemException { 715 return getPersistence() 716 .findByU_G_Last(userId, groupId, orderByComparator); 717 } 718 719 /** 720 * Returns the last user group role in the ordered set where userId = ? and groupId = ?. 721 * 722 * @param userId the user ID 723 * @param groupId the group ID 724 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 725 * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found 726 * @throws SystemException if a system exception occurred 727 */ 728 public static com.liferay.portal.model.UserGroupRole fetchByU_G_Last( 729 long userId, long groupId, 730 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 731 throws com.liferay.portal.kernel.exception.SystemException { 732 return getPersistence() 733 .fetchByU_G_Last(userId, groupId, orderByComparator); 734 } 735 736 /** 737 * Returns the user group roles before and after the current user group role in the ordered set where userId = ? and groupId = ?. 738 * 739 * @param userGroupRolePK the primary key of the current user group role 740 * @param userId the user ID 741 * @param groupId the group ID 742 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 743 * @return the previous, current, and next user group role 744 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found 745 * @throws SystemException if a system exception occurred 746 */ 747 public static com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext( 748 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK, 749 long userId, long groupId, 750 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 751 throws com.liferay.portal.NoSuchUserGroupRoleException, 752 com.liferay.portal.kernel.exception.SystemException { 753 return getPersistence() 754 .findByU_G_PrevAndNext(userGroupRolePK, userId, groupId, 755 orderByComparator); 756 } 757 758 /** 759 * Returns all the user group roles where groupId = ? and roleId = ?. 760 * 761 * @param groupId the group ID 762 * @param roleId the role ID 763 * @return the matching user group roles 764 * @throws SystemException if a system exception occurred 765 */ 766 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R( 767 long groupId, long roleId) 768 throws com.liferay.portal.kernel.exception.SystemException { 769 return getPersistence().findByG_R(groupId, roleId); 770 } 771 772 /** 773 * Returns a range of all the user group roles where groupId = ? and roleId = ?. 774 * 775 * <p> 776 * 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. 777 * </p> 778 * 779 * @param groupId the group ID 780 * @param roleId the role ID 781 * @param start the lower bound of the range of user group roles 782 * @param end the upper bound of the range of user group roles (not inclusive) 783 * @return the range of matching user group roles 784 * @throws SystemException if a system exception occurred 785 */ 786 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R( 787 long groupId, long roleId, int start, int end) 788 throws com.liferay.portal.kernel.exception.SystemException { 789 return getPersistence().findByG_R(groupId, roleId, start, end); 790 } 791 792 /** 793 * Returns an ordered range of all the user group roles where groupId = ? and roleId = ?. 794 * 795 * <p> 796 * 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. 797 * </p> 798 * 799 * @param groupId the group ID 800 * @param roleId the role ID 801 * @param start the lower bound of the range of user group roles 802 * @param end the upper bound of the range of user group roles (not inclusive) 803 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 804 * @return the ordered range of matching user group roles 805 * @throws SystemException if a system exception occurred 806 */ 807 public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R( 808 long groupId, long roleId, int start, int end, 809 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 810 throws com.liferay.portal.kernel.exception.SystemException { 811 return getPersistence() 812 .findByG_R(groupId, roleId, start, end, orderByComparator); 813 } 814 815 /** 816 * Returns the first user group role in the ordered set where groupId = ? and roleId = ?. 817 * 818 * @param groupId the group ID 819 * @param roleId the role ID 820 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 821 * @return the first matching user group role 822 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found 823 * @throws SystemException if a system exception occurred 824 */ 825 public static com.liferay.portal.model.UserGroupRole findByG_R_First( 826 long groupId, long roleId, 827 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 828 throws com.liferay.portal.NoSuchUserGroupRoleException, 829 com.liferay.portal.kernel.exception.SystemException { 830 return getPersistence() 831 .findByG_R_First(groupId, roleId, orderByComparator); 832 } 833 834 /** 835 * Returns the first user group role in the ordered set where groupId = ? and roleId = ?. 836 * 837 * @param groupId the group ID 838 * @param roleId the role ID 839 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 840 * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found 841 * @throws SystemException if a system exception occurred 842 */ 843 public static com.liferay.portal.model.UserGroupRole fetchByG_R_First( 844 long groupId, long roleId, 845 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 846 throws com.liferay.portal.kernel.exception.SystemException { 847 return getPersistence() 848 .fetchByG_R_First(groupId, roleId, orderByComparator); 849 } 850 851 /** 852 * Returns the last user group role in the ordered set where groupId = ? and roleId = ?. 853 * 854 * @param groupId the group ID 855 * @param roleId the role ID 856 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 857 * @return the last matching user group role 858 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a matching user group role could not be found 859 * @throws SystemException if a system exception occurred 860 */ 861 public static com.liferay.portal.model.UserGroupRole findByG_R_Last( 862 long groupId, long roleId, 863 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 864 throws com.liferay.portal.NoSuchUserGroupRoleException, 865 com.liferay.portal.kernel.exception.SystemException { 866 return getPersistence() 867 .findByG_R_Last(groupId, roleId, orderByComparator); 868 } 869 870 /** 871 * Returns the last user group role in the ordered set where groupId = ? and roleId = ?. 872 * 873 * @param groupId the group ID 874 * @param roleId the role ID 875 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 876 * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found 877 * @throws SystemException if a system exception occurred 878 */ 879 public static com.liferay.portal.model.UserGroupRole fetchByG_R_Last( 880 long groupId, long roleId, 881 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 882 throws com.liferay.portal.kernel.exception.SystemException { 883 return getPersistence() 884 .fetchByG_R_Last(groupId, roleId, orderByComparator); 885 } 886 887 /** 888 * Returns the user group roles before and after the current user group role in the ordered set where groupId = ? and roleId = ?. 889 * 890 * @param userGroupRolePK the primary key of the current user group role 891 * @param groupId the group ID 892 * @param roleId the role ID 893 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 894 * @return the previous, current, and next user group role 895 * @throws com.liferay.portal.NoSuchUserGroupRoleException if a user group role with the primary key could not be found 896 * @throws SystemException if a system exception occurred 897 */ 898 public static com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext( 899 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK, 900 long groupId, long roleId, 901 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 902 throws com.liferay.portal.NoSuchUserGroupRoleException, 903 com.liferay.portal.kernel.exception.SystemException { 904 return getPersistence() 905 .findByG_R_PrevAndNext(userGroupRolePK, groupId, roleId, 906 orderByComparator); 907 } 908 909 /** 910 * Returns all the user group roles. 911 * 912 * @return the user group roles 913 * @throws SystemException if a system exception occurred 914 */ 915 public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll() 916 throws com.liferay.portal.kernel.exception.SystemException { 917 return getPersistence().findAll(); 918 } 919 920 /** 921 * Returns a range of all the user group roles. 922 * 923 * <p> 924 * 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. 925 * </p> 926 * 927 * @param start the lower bound of the range of user group roles 928 * @param end the upper bound of the range of user group roles (not inclusive) 929 * @return the range of user group roles 930 * @throws SystemException if a system exception occurred 931 */ 932 public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll( 933 int start, int end) 934 throws com.liferay.portal.kernel.exception.SystemException { 935 return getPersistence().findAll(start, end); 936 } 937 938 /** 939 * Returns an ordered range of all the user group roles. 940 * 941 * <p> 942 * 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. 943 * </p> 944 * 945 * @param start the lower bound of the range of user group roles 946 * @param end the upper bound of the range of user group roles (not inclusive) 947 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 948 * @return the ordered range of user group roles 949 * @throws SystemException if a system exception occurred 950 */ 951 public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll( 952 int start, int end, 953 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 954 throws com.liferay.portal.kernel.exception.SystemException { 955 return getPersistence().findAll(start, end, orderByComparator); 956 } 957 958 /** 959 * Removes all the user group roles where userId = ? from the database. 960 * 961 * @param userId the user ID 962 * @throws SystemException if a system exception occurred 963 */ 964 public static void removeByUserId(long userId) 965 throws com.liferay.portal.kernel.exception.SystemException { 966 getPersistence().removeByUserId(userId); 967 } 968 969 /** 970 * Removes all the user group roles where groupId = ? from the database. 971 * 972 * @param groupId the group ID 973 * @throws SystemException if a system exception occurred 974 */ 975 public static void removeByGroupId(long groupId) 976 throws com.liferay.portal.kernel.exception.SystemException { 977 getPersistence().removeByGroupId(groupId); 978 } 979 980 /** 981 * Removes all the user group roles where roleId = ? from the database. 982 * 983 * @param roleId the role ID 984 * @throws SystemException if a system exception occurred 985 */ 986 public static void removeByRoleId(long roleId) 987 throws com.liferay.portal.kernel.exception.SystemException { 988 getPersistence().removeByRoleId(roleId); 989 } 990 991 /** 992 * Removes all the user group roles where userId = ? and groupId = ? from the database. 993 * 994 * @param userId the user ID 995 * @param groupId the group ID 996 * @throws SystemException if a system exception occurred 997 */ 998 public static void removeByU_G(long userId, long groupId) 999 throws com.liferay.portal.kernel.exception.SystemException { 1000 getPersistence().removeByU_G(userId, groupId); 1001 } 1002 1003 /** 1004 * Removes all the user group roles where groupId = ? and roleId = ? from the database. 1005 * 1006 * @param groupId the group ID 1007 * @param roleId the role ID 1008 * @throws SystemException if a system exception occurred 1009 */ 1010 public static void removeByG_R(long groupId, long roleId) 1011 throws com.liferay.portal.kernel.exception.SystemException { 1012 getPersistence().removeByG_R(groupId, roleId); 1013 } 1014 1015 /** 1016 * Removes all the user group roles from the database. 1017 * 1018 * @throws SystemException if a system exception occurred 1019 */ 1020 public static void removeAll() 1021 throws com.liferay.portal.kernel.exception.SystemException { 1022 getPersistence().removeAll(); 1023 } 1024 1025 /** 1026 * Returns the number of user group roles where userId = ?. 1027 * 1028 * @param userId the user ID 1029 * @return the number of matching user group roles 1030 * @throws SystemException if a system exception occurred 1031 */ 1032 public static int countByUserId(long userId) 1033 throws com.liferay.portal.kernel.exception.SystemException { 1034 return getPersistence().countByUserId(userId); 1035 } 1036 1037 /** 1038 * Returns the number of user group roles where groupId = ?. 1039 * 1040 * @param groupId the group ID 1041 * @return the number of matching user group roles 1042 * @throws SystemException if a system exception occurred 1043 */ 1044 public static int countByGroupId(long groupId) 1045 throws com.liferay.portal.kernel.exception.SystemException { 1046 return getPersistence().countByGroupId(groupId); 1047 } 1048 1049 /** 1050 * Returns the number of user group roles where roleId = ?. 1051 * 1052 * @param roleId the role ID 1053 * @return the number of matching user group roles 1054 * @throws SystemException if a system exception occurred 1055 */ 1056 public static int countByRoleId(long roleId) 1057 throws com.liferay.portal.kernel.exception.SystemException { 1058 return getPersistence().countByRoleId(roleId); 1059 } 1060 1061 /** 1062 * Returns the number of user group roles where userId = ? and groupId = ?. 1063 * 1064 * @param userId the user ID 1065 * @param groupId the group ID 1066 * @return the number of matching user group roles 1067 * @throws SystemException if a system exception occurred 1068 */ 1069 public static int countByU_G(long userId, long groupId) 1070 throws com.liferay.portal.kernel.exception.SystemException { 1071 return getPersistence().countByU_G(userId, groupId); 1072 } 1073 1074 /** 1075 * Returns the number of user group roles where groupId = ? and roleId = ?. 1076 * 1077 * @param groupId the group ID 1078 * @param roleId the role ID 1079 * @return the number of matching user group roles 1080 * @throws SystemException if a system exception occurred 1081 */ 1082 public static int countByG_R(long groupId, long roleId) 1083 throws com.liferay.portal.kernel.exception.SystemException { 1084 return getPersistence().countByG_R(groupId, roleId); 1085 } 1086 1087 /** 1088 * Returns the number of user group roles. 1089 * 1090 * @return the number of user group roles 1091 * @throws SystemException if a system exception occurred 1092 */ 1093 public static int countAll() 1094 throws com.liferay.portal.kernel.exception.SystemException { 1095 return getPersistence().countAll(); 1096 } 1097 1098 public static UserGroupRolePersistence getPersistence() { 1099 if (_persistence == null) { 1100 _persistence = (UserGroupRolePersistence)PortalBeanLocatorUtil.locate(UserGroupRolePersistence.class.getName()); 1101 1102 ReferenceRegistry.registerReference(UserGroupRoleUtil.class, 1103 "_persistence"); 1104 } 1105 1106 return _persistence; 1107 } 1108 1109 /** 1110 * @deprecated 1111 */ 1112 public void setPersistence(UserGroupRolePersistence persistence) { 1113 } 1114 1115 private static UserGroupRolePersistence _persistence; 1116 }