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.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 * @param groupId the group ID 253 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 254 * @return the first matching org group permission 255 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 256 * @throws SystemException if a system exception occurred 257 */ 258 public static com.liferay.portal.model.OrgGroupPermission findByGroupId_First( 259 long groupId, 260 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 261 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 262 com.liferay.portal.kernel.exception.SystemException { 263 return getPersistence().findByGroupId_First(groupId, orderByComparator); 264 } 265 266 /** 267 * Returns the first org group permission in the ordered set where groupId = ?. 268 * 269 * @param groupId the group ID 270 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 271 * @return the first matching org group permission, or <code>null</code> if a matching org group permission could not be found 272 * @throws SystemException if a system exception occurred 273 */ 274 public static com.liferay.portal.model.OrgGroupPermission fetchByGroupId_First( 275 long groupId, 276 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 277 throws com.liferay.portal.kernel.exception.SystemException { 278 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 279 } 280 281 /** 282 * Returns the last org group permission in the ordered set where groupId = ?. 283 * 284 * @param groupId the group ID 285 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 286 * @return the last matching org group permission 287 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 288 * @throws SystemException if a system exception occurred 289 */ 290 public static com.liferay.portal.model.OrgGroupPermission findByGroupId_Last( 291 long groupId, 292 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 293 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 294 com.liferay.portal.kernel.exception.SystemException { 295 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 296 } 297 298 /** 299 * Returns the last org group permission in the ordered set where groupId = ?. 300 * 301 * @param groupId the group ID 302 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 303 * @return the last matching org group permission, or <code>null</code> if a matching org group permission could not be found 304 * @throws SystemException if a system exception occurred 305 */ 306 public static com.liferay.portal.model.OrgGroupPermission fetchByGroupId_Last( 307 long groupId, 308 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 309 throws com.liferay.portal.kernel.exception.SystemException { 310 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 311 } 312 313 /** 314 * Returns the org group permissions before and after the current org group permission in the ordered set where groupId = ?. 315 * 316 * @param orgGroupPermissionPK the primary key of the current org group permission 317 * @param groupId the group ID 318 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 319 * @return the previous, current, and next org group permission 320 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a org group permission with the primary key could not be found 321 * @throws SystemException if a system exception occurred 322 */ 323 public static com.liferay.portal.model.OrgGroupPermission[] findByGroupId_PrevAndNext( 324 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK, 325 long groupId, 326 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 327 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 328 com.liferay.portal.kernel.exception.SystemException { 329 return getPersistence() 330 .findByGroupId_PrevAndNext(orgGroupPermissionPK, groupId, 331 orderByComparator); 332 } 333 334 /** 335 * Returns all the org group permissions where permissionId = ?. 336 * 337 * @param permissionId the permission ID 338 * @return the matching org group permissions 339 * @throws SystemException if a system exception occurred 340 */ 341 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findByPermissionId( 342 long permissionId) 343 throws com.liferay.portal.kernel.exception.SystemException { 344 return getPersistence().findByPermissionId(permissionId); 345 } 346 347 /** 348 * Returns a range of all the org group permissions where permissionId = ?. 349 * 350 * <p> 351 * 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. 352 * </p> 353 * 354 * @param permissionId the permission ID 355 * @param start the lower bound of the range of org group permissions 356 * @param end the upper bound of the range of org group permissions (not inclusive) 357 * @return the range of matching org group permissions 358 * @throws SystemException if a system exception occurred 359 */ 360 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findByPermissionId( 361 long permissionId, int start, int end) 362 throws com.liferay.portal.kernel.exception.SystemException { 363 return getPersistence().findByPermissionId(permissionId, start, end); 364 } 365 366 /** 367 * Returns an ordered range of all the org group permissions where permissionId = ?. 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 permissionId the permission ID 374 * @param start the lower bound of the range of org group permissions 375 * @param end the upper bound of the range of org group permissions (not inclusive) 376 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 377 * @return the ordered range of matching org group permissions 378 * @throws SystemException if a system exception occurred 379 */ 380 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findByPermissionId( 381 long permissionId, int start, int end, 382 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 383 throws com.liferay.portal.kernel.exception.SystemException { 384 return getPersistence() 385 .findByPermissionId(permissionId, start, end, 386 orderByComparator); 387 } 388 389 /** 390 * Returns the first org group permission in the ordered set where permissionId = ?. 391 * 392 * @param permissionId the permission ID 393 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 394 * @return the first matching org group permission 395 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 396 * @throws SystemException if a system exception occurred 397 */ 398 public static com.liferay.portal.model.OrgGroupPermission findByPermissionId_First( 399 long permissionId, 400 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 401 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 402 com.liferay.portal.kernel.exception.SystemException { 403 return getPersistence() 404 .findByPermissionId_First(permissionId, orderByComparator); 405 } 406 407 /** 408 * Returns the first org group permission in the ordered set where permissionId = ?. 409 * 410 * @param permissionId the permission ID 411 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 412 * @return the first matching org group permission, or <code>null</code> if a matching org group permission could not be found 413 * @throws SystemException if a system exception occurred 414 */ 415 public static com.liferay.portal.model.OrgGroupPermission fetchByPermissionId_First( 416 long permissionId, 417 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 418 throws com.liferay.portal.kernel.exception.SystemException { 419 return getPersistence() 420 .fetchByPermissionId_First(permissionId, orderByComparator); 421 } 422 423 /** 424 * Returns the last org group permission in the ordered set where permissionId = ?. 425 * 426 * @param permissionId the permission ID 427 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 428 * @return the last matching org group permission 429 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 430 * @throws SystemException if a system exception occurred 431 */ 432 public static com.liferay.portal.model.OrgGroupPermission findByPermissionId_Last( 433 long permissionId, 434 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 435 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 436 com.liferay.portal.kernel.exception.SystemException { 437 return getPersistence() 438 .findByPermissionId_Last(permissionId, orderByComparator); 439 } 440 441 /** 442 * Returns the last org group permission in the ordered set where permissionId = ?. 443 * 444 * @param permissionId the permission ID 445 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 446 * @return the last matching org group permission, or <code>null</code> if a matching org group permission could not be found 447 * @throws SystemException if a system exception occurred 448 */ 449 public static com.liferay.portal.model.OrgGroupPermission fetchByPermissionId_Last( 450 long permissionId, 451 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 452 throws com.liferay.portal.kernel.exception.SystemException { 453 return getPersistence() 454 .fetchByPermissionId_Last(permissionId, orderByComparator); 455 } 456 457 /** 458 * Returns the org group permissions before and after the current org group permission in the ordered set where permissionId = ?. 459 * 460 * @param orgGroupPermissionPK the primary key of the current org group permission 461 * @param permissionId the permission ID 462 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 463 * @return the previous, current, and next org group permission 464 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a org group permission with the primary key could not be found 465 * @throws SystemException if a system exception occurred 466 */ 467 public static com.liferay.portal.model.OrgGroupPermission[] findByPermissionId_PrevAndNext( 468 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK, 469 long permissionId, 470 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 471 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 472 com.liferay.portal.kernel.exception.SystemException { 473 return getPersistence() 474 .findByPermissionId_PrevAndNext(orgGroupPermissionPK, 475 permissionId, orderByComparator); 476 } 477 478 /** 479 * Returns all the org group permissions. 480 * 481 * @return the org group permissions 482 * @throws SystemException if a system exception occurred 483 */ 484 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findAll() 485 throws com.liferay.portal.kernel.exception.SystemException { 486 return getPersistence().findAll(); 487 } 488 489 /** 490 * Returns a range of all the org group permissions. 491 * 492 * <p> 493 * 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. 494 * </p> 495 * 496 * @param start the lower bound of the range of org group permissions 497 * @param end the upper bound of the range of org group permissions (not inclusive) 498 * @return the range of org group permissions 499 * @throws SystemException if a system exception occurred 500 */ 501 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findAll( 502 int start, int end) 503 throws com.liferay.portal.kernel.exception.SystemException { 504 return getPersistence().findAll(start, end); 505 } 506 507 /** 508 * Returns an ordered range of all the org group permissions. 509 * 510 * <p> 511 * 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. 512 * </p> 513 * 514 * @param start the lower bound of the range of org group permissions 515 * @param end the upper bound of the range of org group permissions (not inclusive) 516 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 517 * @return the ordered range of org group permissions 518 * @throws SystemException if a system exception occurred 519 */ 520 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findAll( 521 int start, int end, 522 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 523 throws com.liferay.portal.kernel.exception.SystemException { 524 return getPersistence().findAll(start, end, orderByComparator); 525 } 526 527 /** 528 * Removes all the org group permissions where groupId = ? from the database. 529 * 530 * @param groupId the group ID 531 * @throws SystemException if a system exception occurred 532 */ 533 public static void removeByGroupId(long groupId) 534 throws com.liferay.portal.kernel.exception.SystemException { 535 getPersistence().removeByGroupId(groupId); 536 } 537 538 /** 539 * Removes all the org group permissions where permissionId = ? from the database. 540 * 541 * @param permissionId the permission ID 542 * @throws SystemException if a system exception occurred 543 */ 544 public static void removeByPermissionId(long permissionId) 545 throws com.liferay.portal.kernel.exception.SystemException { 546 getPersistence().removeByPermissionId(permissionId); 547 } 548 549 /** 550 * Removes all the org group permissions from the database. 551 * 552 * @throws SystemException if a system exception occurred 553 */ 554 public static void removeAll() 555 throws com.liferay.portal.kernel.exception.SystemException { 556 getPersistence().removeAll(); 557 } 558 559 /** 560 * Returns the number of org group permissions where groupId = ?. 561 * 562 * @param groupId the group ID 563 * @return the number of matching org group permissions 564 * @throws SystemException if a system exception occurred 565 */ 566 public static int countByGroupId(long groupId) 567 throws com.liferay.portal.kernel.exception.SystemException { 568 return getPersistence().countByGroupId(groupId); 569 } 570 571 /** 572 * Returns the number of org group permissions where permissionId = ?. 573 * 574 * @param permissionId the permission ID 575 * @return the number of matching org group permissions 576 * @throws SystemException if a system exception occurred 577 */ 578 public static int countByPermissionId(long permissionId) 579 throws com.liferay.portal.kernel.exception.SystemException { 580 return getPersistence().countByPermissionId(permissionId); 581 } 582 583 /** 584 * Returns the number of org group permissions. 585 * 586 * @return the number of org group permissions 587 * @throws SystemException if a system exception occurred 588 */ 589 public static int countAll() 590 throws com.liferay.portal.kernel.exception.SystemException { 591 return getPersistence().countAll(); 592 } 593 594 public static OrgGroupPermissionPersistence getPersistence() { 595 if (_persistence == null) { 596 _persistence = (OrgGroupPermissionPersistence)PortalBeanLocatorUtil.locate(OrgGroupPermissionPersistence.class.getName()); 597 598 ReferenceRegistry.registerReference(OrgGroupPermissionUtil.class, 599 "_persistence"); 600 } 601 602 return _persistence; 603 } 604 605 /** 606 * @deprecated 607 */ 608 public void setPersistence(OrgGroupPermissionPersistence persistence) { 609 } 610 611 private static OrgGroupPermissionPersistence _persistence; 612 }