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