001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.OrgGroupRole; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the org group role service. This utility wraps {@link OrgGroupRolePersistenceImpl} 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 OrgGroupRolePersistence 036 * @see OrgGroupRolePersistenceImpl 037 * @generated 038 */ 039 public class OrgGroupRoleUtil { 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(OrgGroupRole orgGroupRole) { 057 getPersistence().clearCache(orgGroupRole); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public static 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<OrgGroupRole> 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<OrgGroupRole> 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<OrgGroupRole> 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 OrgGroupRole update(OrgGroupRole orgGroupRole) 100 throws SystemException { 101 return getPersistence().update(orgGroupRole); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static OrgGroupRole update(OrgGroupRole orgGroupRole, 108 ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(orgGroupRole, serviceContext); 110 } 111 112 /** 113 * Returns all the org group roles where groupId = ?. 114 * 115 * @param groupId the group ID 116 * @return the matching org group roles 117 * @throws SystemException if a system exception occurred 118 */ 119 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId( 120 long groupId) 121 throws com.liferay.portal.kernel.exception.SystemException { 122 return getPersistence().findByGroupId(groupId); 123 } 124 125 /** 126 * Returns a range of all the org group roles where groupId = ?. 127 * 128 * <p> 129 * 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.OrgGroupRoleModelImpl}. 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. 130 * </p> 131 * 132 * @param groupId the group ID 133 * @param start the lower bound of the range of org group roles 134 * @param end the upper bound of the range of org group roles (not inclusive) 135 * @return the range of matching org group roles 136 * @throws SystemException if a system exception occurred 137 */ 138 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId( 139 long groupId, int start, int end) 140 throws com.liferay.portal.kernel.exception.SystemException { 141 return getPersistence().findByGroupId(groupId, start, end); 142 } 143 144 /** 145 * Returns an ordered range of all the org group roles where groupId = ?. 146 * 147 * <p> 148 * 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.OrgGroupRoleModelImpl}. 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. 149 * </p> 150 * 151 * @param groupId the group ID 152 * @param start the lower bound of the range of org group roles 153 * @param end the upper bound of the range of org group roles (not inclusive) 154 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 155 * @return the ordered range of matching org group roles 156 * @throws SystemException if a system exception occurred 157 */ 158 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId( 159 long groupId, int start, int end, 160 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence() 163 .findByGroupId(groupId, start, end, orderByComparator); 164 } 165 166 /** 167 * Returns the first org group role in the ordered set where groupId = ?. 168 * 169 * @param groupId the group ID 170 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 171 * @return the first matching org group role 172 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found 173 * @throws SystemException if a system exception occurred 174 */ 175 public static com.liferay.portal.model.OrgGroupRole findByGroupId_First( 176 long groupId, 177 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 178 throws com.liferay.portal.NoSuchOrgGroupRoleException, 179 com.liferay.portal.kernel.exception.SystemException { 180 return getPersistence().findByGroupId_First(groupId, orderByComparator); 181 } 182 183 /** 184 * Returns the first org group role in the ordered set where groupId = ?. 185 * 186 * @param groupId the group ID 187 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 188 * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found 189 * @throws SystemException if a system exception occurred 190 */ 191 public static com.liferay.portal.model.OrgGroupRole fetchByGroupId_First( 192 long groupId, 193 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 194 throws com.liferay.portal.kernel.exception.SystemException { 195 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 196 } 197 198 /** 199 * Returns the last org group role in the ordered set where groupId = ?. 200 * 201 * @param groupId the group ID 202 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 203 * @return the last matching org group role 204 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found 205 * @throws SystemException if a system exception occurred 206 */ 207 public static com.liferay.portal.model.OrgGroupRole findByGroupId_Last( 208 long groupId, 209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 210 throws com.liferay.portal.NoSuchOrgGroupRoleException, 211 com.liferay.portal.kernel.exception.SystemException { 212 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 213 } 214 215 /** 216 * Returns the last org group role in the ordered set where groupId = ?. 217 * 218 * @param groupId the group ID 219 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 220 * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found 221 * @throws SystemException if a system exception occurred 222 */ 223 public static com.liferay.portal.model.OrgGroupRole fetchByGroupId_Last( 224 long groupId, 225 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 226 throws com.liferay.portal.kernel.exception.SystemException { 227 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 228 } 229 230 /** 231 * Returns the org group roles before and after the current org group role in the ordered set where groupId = ?. 232 * 233 * @param orgGroupRolePK the primary key of the current org group role 234 * @param groupId the group ID 235 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 236 * @return the previous, current, and next org group role 237 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found 238 * @throws SystemException if a system exception occurred 239 */ 240 public static com.liferay.portal.model.OrgGroupRole[] findByGroupId_PrevAndNext( 241 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK, 242 long groupId, 243 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 244 throws com.liferay.portal.NoSuchOrgGroupRoleException, 245 com.liferay.portal.kernel.exception.SystemException { 246 return getPersistence() 247 .findByGroupId_PrevAndNext(orgGroupRolePK, groupId, 248 orderByComparator); 249 } 250 251 /** 252 * Removes all the org group roles where groupId = ? from the database. 253 * 254 * @param groupId the group ID 255 * @throws SystemException if a system exception occurred 256 */ 257 public static void removeByGroupId(long groupId) 258 throws com.liferay.portal.kernel.exception.SystemException { 259 getPersistence().removeByGroupId(groupId); 260 } 261 262 /** 263 * Returns the number of org group roles where groupId = ?. 264 * 265 * @param groupId the group ID 266 * @return the number of matching org group roles 267 * @throws SystemException if a system exception occurred 268 */ 269 public static int countByGroupId(long groupId) 270 throws com.liferay.portal.kernel.exception.SystemException { 271 return getPersistence().countByGroupId(groupId); 272 } 273 274 /** 275 * Returns all the org group roles where roleId = ?. 276 * 277 * @param roleId the role ID 278 * @return the matching org group roles 279 * @throws SystemException if a system exception occurred 280 */ 281 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId( 282 long roleId) throws com.liferay.portal.kernel.exception.SystemException { 283 return getPersistence().findByRoleId(roleId); 284 } 285 286 /** 287 * Returns a range of all the org group roles where roleId = ?. 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.OrgGroupRoleModelImpl}. 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 roleId the role ID 294 * @param start the lower bound of the range of org group roles 295 * @param end the upper bound of the range of org group roles (not inclusive) 296 * @return the range of matching org group roles 297 * @throws SystemException if a system exception occurred 298 */ 299 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId( 300 long roleId, int start, int end) 301 throws com.liferay.portal.kernel.exception.SystemException { 302 return getPersistence().findByRoleId(roleId, start, end); 303 } 304 305 /** 306 * Returns an ordered range of all the org group roles where roleId = ?. 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.OrgGroupRoleModelImpl}. 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 roleId the role ID 313 * @param start the lower bound of the range of org group roles 314 * @param end the upper bound of the range of org 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 org group roles 317 * @throws SystemException if a system exception occurred 318 */ 319 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId( 320 long roleId, int start, int end, 321 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 322 throws com.liferay.portal.kernel.exception.SystemException { 323 return getPersistence() 324 .findByRoleId(roleId, start, end, orderByComparator); 325 } 326 327 /** 328 * Returns the first org group role in the ordered set where roleId = ?. 329 * 330 * @param roleId the role ID 331 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 332 * @return the first matching org group role 333 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found 334 * @throws SystemException if a system exception occurred 335 */ 336 public static com.liferay.portal.model.OrgGroupRole findByRoleId_First( 337 long roleId, 338 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 339 throws com.liferay.portal.NoSuchOrgGroupRoleException, 340 com.liferay.portal.kernel.exception.SystemException { 341 return getPersistence().findByRoleId_First(roleId, orderByComparator); 342 } 343 344 /** 345 * Returns the first org group role in the ordered set where roleId = ?. 346 * 347 * @param roleId the role ID 348 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 349 * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found 350 * @throws SystemException if a system exception occurred 351 */ 352 public static com.liferay.portal.model.OrgGroupRole fetchByRoleId_First( 353 long roleId, 354 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 355 throws com.liferay.portal.kernel.exception.SystemException { 356 return getPersistence().fetchByRoleId_First(roleId, orderByComparator); 357 } 358 359 /** 360 * Returns the last org group role in the ordered set where roleId = ?. 361 * 362 * @param roleId the role ID 363 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 364 * @return the last matching org group role 365 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found 366 * @throws SystemException if a system exception occurred 367 */ 368 public static com.liferay.portal.model.OrgGroupRole findByRoleId_Last( 369 long roleId, 370 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 371 throws com.liferay.portal.NoSuchOrgGroupRoleException, 372 com.liferay.portal.kernel.exception.SystemException { 373 return getPersistence().findByRoleId_Last(roleId, orderByComparator); 374 } 375 376 /** 377 * Returns the last org group role in the ordered set where roleId = ?. 378 * 379 * @param roleId the role ID 380 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 381 * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found 382 * @throws SystemException if a system exception occurred 383 */ 384 public static com.liferay.portal.model.OrgGroupRole fetchByRoleId_Last( 385 long roleId, 386 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 387 throws com.liferay.portal.kernel.exception.SystemException { 388 return getPersistence().fetchByRoleId_Last(roleId, orderByComparator); 389 } 390 391 /** 392 * Returns the org group roles before and after the current org group role in the ordered set where roleId = ?. 393 * 394 * @param orgGroupRolePK the primary key of the current org group role 395 * @param roleId the role ID 396 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 397 * @return the previous, current, and next org group role 398 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org 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.OrgGroupRole[] findByRoleId_PrevAndNext( 402 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK, 403 long roleId, 404 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 405 throws com.liferay.portal.NoSuchOrgGroupRoleException, 406 com.liferay.portal.kernel.exception.SystemException { 407 return getPersistence() 408 .findByRoleId_PrevAndNext(orgGroupRolePK, roleId, 409 orderByComparator); 410 } 411 412 /** 413 * Removes all the org group roles where roleId = ? from the database. 414 * 415 * @param roleId the role ID 416 * @throws SystemException if a system exception occurred 417 */ 418 public static void removeByRoleId(long roleId) 419 throws com.liferay.portal.kernel.exception.SystemException { 420 getPersistence().removeByRoleId(roleId); 421 } 422 423 /** 424 * Returns the number of org group roles where roleId = ?. 425 * 426 * @param roleId the role ID 427 * @return the number of matching org group roles 428 * @throws SystemException if a system exception occurred 429 */ 430 public static int countByRoleId(long roleId) 431 throws com.liferay.portal.kernel.exception.SystemException { 432 return getPersistence().countByRoleId(roleId); 433 } 434 435 /** 436 * Caches the org group role in the entity cache if it is enabled. 437 * 438 * @param orgGroupRole the org group role 439 */ 440 public static void cacheResult( 441 com.liferay.portal.model.OrgGroupRole orgGroupRole) { 442 getPersistence().cacheResult(orgGroupRole); 443 } 444 445 /** 446 * Caches the org group roles in the entity cache if it is enabled. 447 * 448 * @param orgGroupRoles the org group roles 449 */ 450 public static void cacheResult( 451 java.util.List<com.liferay.portal.model.OrgGroupRole> orgGroupRoles) { 452 getPersistence().cacheResult(orgGroupRoles); 453 } 454 455 /** 456 * Creates a new org group role with the primary key. Does not add the org group role to the database. 457 * 458 * @param orgGroupRolePK the primary key for the new org group role 459 * @return the new org group role 460 */ 461 public static com.liferay.portal.model.OrgGroupRole create( 462 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) { 463 return getPersistence().create(orgGroupRolePK); 464 } 465 466 /** 467 * Removes the org group role with the primary key from the database. Also notifies the appropriate model listeners. 468 * 469 * @param orgGroupRolePK the primary key of the org group role 470 * @return the org group role that was removed 471 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found 472 * @throws SystemException if a system exception occurred 473 */ 474 public static com.liferay.portal.model.OrgGroupRole remove( 475 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) 476 throws com.liferay.portal.NoSuchOrgGroupRoleException, 477 com.liferay.portal.kernel.exception.SystemException { 478 return getPersistence().remove(orgGroupRolePK); 479 } 480 481 public static com.liferay.portal.model.OrgGroupRole updateImpl( 482 com.liferay.portal.model.OrgGroupRole orgGroupRole) 483 throws com.liferay.portal.kernel.exception.SystemException { 484 return getPersistence().updateImpl(orgGroupRole); 485 } 486 487 /** 488 * Returns the org group role with the primary key or throws a {@link com.liferay.portal.NoSuchOrgGroupRoleException} if it could not be found. 489 * 490 * @param orgGroupRolePK the primary key of the org group role 491 * @return the org group role 492 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found 493 * @throws SystemException if a system exception occurred 494 */ 495 public static com.liferay.portal.model.OrgGroupRole findByPrimaryKey( 496 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) 497 throws com.liferay.portal.NoSuchOrgGroupRoleException, 498 com.liferay.portal.kernel.exception.SystemException { 499 return getPersistence().findByPrimaryKey(orgGroupRolePK); 500 } 501 502 /** 503 * Returns the org group role with the primary key or returns <code>null</code> if it could not be found. 504 * 505 * @param orgGroupRolePK the primary key of the org group role 506 * @return the org group role, or <code>null</code> if a org group role with the primary key could not be found 507 * @throws SystemException if a system exception occurred 508 */ 509 public static com.liferay.portal.model.OrgGroupRole fetchByPrimaryKey( 510 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) 511 throws com.liferay.portal.kernel.exception.SystemException { 512 return getPersistence().fetchByPrimaryKey(orgGroupRolePK); 513 } 514 515 /** 516 * Returns all the org group roles. 517 * 518 * @return the org group roles 519 * @throws SystemException if a system exception occurred 520 */ 521 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll() 522 throws com.liferay.portal.kernel.exception.SystemException { 523 return getPersistence().findAll(); 524 } 525 526 /** 527 * Returns a range of all the org group roles. 528 * 529 * <p> 530 * 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.OrgGroupRoleModelImpl}. 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. 531 * </p> 532 * 533 * @param start the lower bound of the range of org group roles 534 * @param end the upper bound of the range of org group roles (not inclusive) 535 * @return the range of org group roles 536 * @throws SystemException if a system exception occurred 537 */ 538 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll( 539 int start, int end) 540 throws com.liferay.portal.kernel.exception.SystemException { 541 return getPersistence().findAll(start, end); 542 } 543 544 /** 545 * Returns an ordered range of all the org group roles. 546 * 547 * <p> 548 * 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.OrgGroupRoleModelImpl}. 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. 549 * </p> 550 * 551 * @param start the lower bound of the range of org group roles 552 * @param end the upper bound of the range of org group roles (not inclusive) 553 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 554 * @return the ordered range of org group roles 555 * @throws SystemException if a system exception occurred 556 */ 557 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll( 558 int start, int end, 559 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 560 throws com.liferay.portal.kernel.exception.SystemException { 561 return getPersistence().findAll(start, end, orderByComparator); 562 } 563 564 /** 565 * Removes all the org group roles from the database. 566 * 567 * @throws SystemException if a system exception occurred 568 */ 569 public static void removeAll() 570 throws com.liferay.portal.kernel.exception.SystemException { 571 getPersistence().removeAll(); 572 } 573 574 /** 575 * Returns the number of org group roles. 576 * 577 * @return the number of org group roles 578 * @throws SystemException if a system exception occurred 579 */ 580 public static int countAll() 581 throws com.liferay.portal.kernel.exception.SystemException { 582 return getPersistence().countAll(); 583 } 584 585 public static OrgGroupRolePersistence getPersistence() { 586 if (_persistence == null) { 587 _persistence = (OrgGroupRolePersistence)PortalBeanLocatorUtil.locate(OrgGroupRolePersistence.class.getName()); 588 589 ReferenceRegistry.registerReference(OrgGroupRoleUtil.class, 590 "_persistence"); 591 } 592 593 return _persistence; 594 } 595 596 /** 597 * @deprecated As of 6.2.0 598 */ 599 public void setPersistence(OrgGroupRolePersistence persistence) { 600 } 601 602 private static OrgGroupRolePersistence _persistence; 603 }