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