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