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