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.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 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, boolean) 098 */ 099 public static OrgGroupRole update(OrgGroupRole orgGroupRole, boolean merge) 100 throws SystemException { 101 return getPersistence().update(orgGroupRole, merge); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 106 */ 107 public static OrgGroupRole update(OrgGroupRole orgGroupRole, boolean merge, 108 ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(orgGroupRole, merge, serviceContext); 110 } 111 112 /** 113 * Caches the org group role in the entity cache if it is enabled. 114 * 115 * @param orgGroupRole the org group role 116 */ 117 public static void cacheResult( 118 com.liferay.portal.model.OrgGroupRole orgGroupRole) { 119 getPersistence().cacheResult(orgGroupRole); 120 } 121 122 /** 123 * Caches the org group roles in the entity cache if it is enabled. 124 * 125 * @param orgGroupRoles the org group roles 126 */ 127 public static void cacheResult( 128 java.util.List<com.liferay.portal.model.OrgGroupRole> orgGroupRoles) { 129 getPersistence().cacheResult(orgGroupRoles); 130 } 131 132 /** 133 * Creates a new org group role with the primary key. Does not add the org group role to the database. 134 * 135 * @param orgGroupRolePK the primary key for the new org group role 136 * @return the new org group role 137 */ 138 public static com.liferay.portal.model.OrgGroupRole create( 139 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) { 140 return getPersistence().create(orgGroupRolePK); 141 } 142 143 /** 144 * Removes the org group role with the primary key from the database. Also notifies the appropriate model listeners. 145 * 146 * @param orgGroupRolePK the primary key of the org group role 147 * @return the org group role that was removed 148 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found 149 * @throws SystemException if a system exception occurred 150 */ 151 public static com.liferay.portal.model.OrgGroupRole remove( 152 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) 153 throws com.liferay.portal.NoSuchOrgGroupRoleException, 154 com.liferay.portal.kernel.exception.SystemException { 155 return getPersistence().remove(orgGroupRolePK); 156 } 157 158 public static com.liferay.portal.model.OrgGroupRole updateImpl( 159 com.liferay.portal.model.OrgGroupRole orgGroupRole, boolean merge) 160 throws com.liferay.portal.kernel.exception.SystemException { 161 return getPersistence().updateImpl(orgGroupRole, merge); 162 } 163 164 /** 165 * Returns the org group role with the primary key or throws a {@link com.liferay.portal.NoSuchOrgGroupRoleException} if it could not be found. 166 * 167 * @param orgGroupRolePK the primary key of the org group role 168 * @return the org group role 169 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found 170 * @throws SystemException if a system exception occurred 171 */ 172 public static com.liferay.portal.model.OrgGroupRole findByPrimaryKey( 173 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) 174 throws com.liferay.portal.NoSuchOrgGroupRoleException, 175 com.liferay.portal.kernel.exception.SystemException { 176 return getPersistence().findByPrimaryKey(orgGroupRolePK); 177 } 178 179 /** 180 * Returns the org group role with the primary key or returns <code>null</code> if it could not be found. 181 * 182 * @param orgGroupRolePK the primary key of the org group role 183 * @return the org group role, or <code>null</code> if a org group role with the primary key could not be found 184 * @throws SystemException if a system exception occurred 185 */ 186 public static com.liferay.portal.model.OrgGroupRole fetchByPrimaryKey( 187 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) 188 throws com.liferay.portal.kernel.exception.SystemException { 189 return getPersistence().fetchByPrimaryKey(orgGroupRolePK); 190 } 191 192 /** 193 * Returns all the org group roles where groupId = ?. 194 * 195 * @param groupId the group ID 196 * @return the matching org group roles 197 * @throws SystemException if a system exception occurred 198 */ 199 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId( 200 long groupId) 201 throws com.liferay.portal.kernel.exception.SystemException { 202 return getPersistence().findByGroupId(groupId); 203 } 204 205 /** 206 * Returns a range of all the org group roles where groupId = ?. 207 * 208 * <p> 209 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 210 * </p> 211 * 212 * @param groupId the group ID 213 * @param start the lower bound of the range of org group roles 214 * @param end the upper bound of the range of org group roles (not inclusive) 215 * @return the range of matching org group roles 216 * @throws SystemException if a system exception occurred 217 */ 218 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId( 219 long groupId, int start, int end) 220 throws com.liferay.portal.kernel.exception.SystemException { 221 return getPersistence().findByGroupId(groupId, start, end); 222 } 223 224 /** 225 * Returns an ordered range of all the org group roles where groupId = ?. 226 * 227 * <p> 228 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 229 * </p> 230 * 231 * @param groupId the group ID 232 * @param start the lower bound of the range of org group roles 233 * @param end the upper bound of the range of org group roles (not inclusive) 234 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 235 * @return the ordered range of matching org group roles 236 * @throws SystemException if a system exception occurred 237 */ 238 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId( 239 long groupId, int start, int end, 240 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 241 throws com.liferay.portal.kernel.exception.SystemException { 242 return getPersistence() 243 .findByGroupId(groupId, start, end, orderByComparator); 244 } 245 246 /** 247 * Returns the first org group role in the ordered set where groupId = ?. 248 * 249 * <p> 250 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 251 * </p> 252 * 253 * @param groupId the group ID 254 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 255 * @return the first matching org group role 256 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found 257 * @throws SystemException if a system exception occurred 258 */ 259 public static com.liferay.portal.model.OrgGroupRole findByGroupId_First( 260 long groupId, 261 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 262 throws com.liferay.portal.NoSuchOrgGroupRoleException, 263 com.liferay.portal.kernel.exception.SystemException { 264 return getPersistence().findByGroupId_First(groupId, orderByComparator); 265 } 266 267 /** 268 * Returns the last org group role in the ordered set where groupId = ?. 269 * 270 * <p> 271 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 272 * </p> 273 * 274 * @param groupId the group ID 275 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 276 * @return the last matching org group role 277 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found 278 * @throws SystemException if a system exception occurred 279 */ 280 public static com.liferay.portal.model.OrgGroupRole findByGroupId_Last( 281 long groupId, 282 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 283 throws com.liferay.portal.NoSuchOrgGroupRoleException, 284 com.liferay.portal.kernel.exception.SystemException { 285 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 286 } 287 288 /** 289 * Returns the org group roles before and after the current org group role in the ordered set where groupId = ?. 290 * 291 * <p> 292 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 293 * </p> 294 * 295 * @param orgGroupRolePK the primary key of the current org group role 296 * @param groupId the group ID 297 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 298 * @return the previous, current, and next org group role 299 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found 300 * @throws SystemException if a system exception occurred 301 */ 302 public static com.liferay.portal.model.OrgGroupRole[] findByGroupId_PrevAndNext( 303 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK, 304 long groupId, 305 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 306 throws com.liferay.portal.NoSuchOrgGroupRoleException, 307 com.liferay.portal.kernel.exception.SystemException { 308 return getPersistence() 309 .findByGroupId_PrevAndNext(orgGroupRolePK, groupId, 310 orderByComparator); 311 } 312 313 /** 314 * Returns all the org group roles where roleId = ?. 315 * 316 * @param roleId the role ID 317 * @return the matching org group roles 318 * @throws SystemException if a system exception occurred 319 */ 320 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId( 321 long roleId) throws com.liferay.portal.kernel.exception.SystemException { 322 return getPersistence().findByRoleId(roleId); 323 } 324 325 /** 326 * Returns a range of all the org group roles where roleId = ?. 327 * 328 * <p> 329 * 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. 330 * </p> 331 * 332 * @param roleId the role ID 333 * @param start the lower bound of the range of org group roles 334 * @param end the upper bound of the range of org group roles (not inclusive) 335 * @return the range of matching org group roles 336 * @throws SystemException if a system exception occurred 337 */ 338 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId( 339 long roleId, int start, int end) 340 throws com.liferay.portal.kernel.exception.SystemException { 341 return getPersistence().findByRoleId(roleId, start, end); 342 } 343 344 /** 345 * Returns an ordered range of all the org group roles where roleId = ?. 346 * 347 * <p> 348 * 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. 349 * </p> 350 * 351 * @param roleId the role ID 352 * @param start the lower bound of the range of org group roles 353 * @param end the upper bound of the range of org group roles (not inclusive) 354 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 355 * @return the ordered range of matching org group roles 356 * @throws SystemException if a system exception occurred 357 */ 358 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId( 359 long roleId, int start, int end, 360 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 361 throws com.liferay.portal.kernel.exception.SystemException { 362 return getPersistence() 363 .findByRoleId(roleId, start, end, orderByComparator); 364 } 365 366 /** 367 * Returns the first org group role in the ordered set where roleId = ?. 368 * 369 * <p> 370 * 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. 371 * </p> 372 * 373 * @param roleId the role ID 374 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 375 * @return the first matching org group role 376 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found 377 * @throws SystemException if a system exception occurred 378 */ 379 public static com.liferay.portal.model.OrgGroupRole findByRoleId_First( 380 long roleId, 381 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 382 throws com.liferay.portal.NoSuchOrgGroupRoleException, 383 com.liferay.portal.kernel.exception.SystemException { 384 return getPersistence().findByRoleId_First(roleId, orderByComparator); 385 } 386 387 /** 388 * Returns the last org group role in the ordered set where roleId = ?. 389 * 390 * <p> 391 * 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. 392 * </p> 393 * 394 * @param roleId the role ID 395 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 396 * @return the last matching org group role 397 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found 398 * @throws SystemException if a system exception occurred 399 */ 400 public static com.liferay.portal.model.OrgGroupRole findByRoleId_Last( 401 long roleId, 402 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 403 throws com.liferay.portal.NoSuchOrgGroupRoleException, 404 com.liferay.portal.kernel.exception.SystemException { 405 return getPersistence().findByRoleId_Last(roleId, orderByComparator); 406 } 407 408 /** 409 * Returns the org group roles before and after the current org group role in the ordered set where roleId = ?. 410 * 411 * <p> 412 * 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. 413 * </p> 414 * 415 * @param orgGroupRolePK the primary key of the current org group role 416 * @param roleId the role ID 417 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 418 * @return the previous, current, and next org group role 419 * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found 420 * @throws SystemException if a system exception occurred 421 */ 422 public static com.liferay.portal.model.OrgGroupRole[] findByRoleId_PrevAndNext( 423 com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK, 424 long roleId, 425 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 426 throws com.liferay.portal.NoSuchOrgGroupRoleException, 427 com.liferay.portal.kernel.exception.SystemException { 428 return getPersistence() 429 .findByRoleId_PrevAndNext(orgGroupRolePK, roleId, 430 orderByComparator); 431 } 432 433 /** 434 * Returns all the org group roles. 435 * 436 * @return the org group roles 437 * @throws SystemException if a system exception occurred 438 */ 439 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll() 440 throws com.liferay.portal.kernel.exception.SystemException { 441 return getPersistence().findAll(); 442 } 443 444 /** 445 * Returns a range of all the org group roles. 446 * 447 * <p> 448 * 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. 449 * </p> 450 * 451 * @param start the lower bound of the range of org group roles 452 * @param end the upper bound of the range of org group roles (not inclusive) 453 * @return the range of org group roles 454 * @throws SystemException if a system exception occurred 455 */ 456 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll( 457 int start, int end) 458 throws com.liferay.portal.kernel.exception.SystemException { 459 return getPersistence().findAll(start, end); 460 } 461 462 /** 463 * Returns an ordered range of all the org group roles. 464 * 465 * <p> 466 * 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. 467 * </p> 468 * 469 * @param start the lower bound of the range of org group roles 470 * @param end the upper bound of the range of org group roles (not inclusive) 471 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 472 * @return the ordered range of org group roles 473 * @throws SystemException if a system exception occurred 474 */ 475 public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll( 476 int start, int end, 477 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 478 throws com.liferay.portal.kernel.exception.SystemException { 479 return getPersistence().findAll(start, end, orderByComparator); 480 } 481 482 /** 483 * Removes all the org group roles where groupId = ? from the database. 484 * 485 * @param groupId the group ID 486 * @throws SystemException if a system exception occurred 487 */ 488 public static void removeByGroupId(long groupId) 489 throws com.liferay.portal.kernel.exception.SystemException { 490 getPersistence().removeByGroupId(groupId); 491 } 492 493 /** 494 * Removes all the org group roles where roleId = ? from the database. 495 * 496 * @param roleId the role ID 497 * @throws SystemException if a system exception occurred 498 */ 499 public static void removeByRoleId(long roleId) 500 throws com.liferay.portal.kernel.exception.SystemException { 501 getPersistence().removeByRoleId(roleId); 502 } 503 504 /** 505 * Removes all the org group roles from the database. 506 * 507 * @throws SystemException if a system exception occurred 508 */ 509 public static void removeAll() 510 throws com.liferay.portal.kernel.exception.SystemException { 511 getPersistence().removeAll(); 512 } 513 514 /** 515 * Returns the number of org group roles where groupId = ?. 516 * 517 * @param groupId the group ID 518 * @return the number of matching org group roles 519 * @throws SystemException if a system exception occurred 520 */ 521 public static int countByGroupId(long groupId) 522 throws com.liferay.portal.kernel.exception.SystemException { 523 return getPersistence().countByGroupId(groupId); 524 } 525 526 /** 527 * Returns the number of org group roles where roleId = ?. 528 * 529 * @param roleId the role ID 530 * @return the number of matching org group roles 531 * @throws SystemException if a system exception occurred 532 */ 533 public static int countByRoleId(long roleId) 534 throws com.liferay.portal.kernel.exception.SystemException { 535 return getPersistence().countByRoleId(roleId); 536 } 537 538 /** 539 * Returns the number of org group roles. 540 * 541 * @return the number of org group roles 542 * @throws SystemException if a system exception occurred 543 */ 544 public static int countAll() 545 throws com.liferay.portal.kernel.exception.SystemException { 546 return getPersistence().countAll(); 547 } 548 549 public static OrgGroupRolePersistence getPersistence() { 550 if (_persistence == null) { 551 _persistence = (OrgGroupRolePersistence)PortalBeanLocatorUtil.locate(OrgGroupRolePersistence.class.getName()); 552 553 ReferenceRegistry.registerReference(OrgGroupRoleUtil.class, 554 "_persistence"); 555 } 556 557 return _persistence; 558 } 559 560 public void setPersistence(OrgGroupRolePersistence persistence) { 561 _persistence = persistence; 562 563 ReferenceRegistry.registerReference(OrgGroupRoleUtil.class, 564 "_persistence"); 565 } 566 567 private static OrgGroupRolePersistence _persistence; 568 }