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