001 /** 002 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 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.model.OrgGroupPermission; 022 import com.liferay.portal.service.ServiceContext; 023 024 import java.util.List; 025 026 /** 027 * 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. 028 * 029 * <p> 030 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 031 * </p> 032 * 033 * <p> 034 * Caching information and settings can be found in <code>portal.properties</code> 035 * </p> 036 * 037 * @author Brian Wing Shun Chan 038 * @see OrgGroupPermissionPersistence 039 * @see OrgGroupPermissionPersistenceImpl 040 * @generated 041 */ 042 public class OrgGroupPermissionUtil { 043 /** 044 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 045 */ 046 public static void clearCache() { 047 getPersistence().clearCache(); 048 } 049 050 /** 051 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 052 */ 053 public static void clearCache(OrgGroupPermission orgGroupPermission) { 054 getPersistence().clearCache(orgGroupPermission); 055 } 056 057 /** 058 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 059 */ 060 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 061 throws SystemException { 062 return getPersistence().countWithDynamicQuery(dynamicQuery); 063 } 064 065 /** 066 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 067 */ 068 public static List<OrgGroupPermission> findWithDynamicQuery( 069 DynamicQuery dynamicQuery) throws SystemException { 070 return getPersistence().findWithDynamicQuery(dynamicQuery); 071 } 072 073 /** 074 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 075 */ 076 public static List<OrgGroupPermission> findWithDynamicQuery( 077 DynamicQuery dynamicQuery, int start, int end) 078 throws SystemException { 079 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 080 } 081 082 /** 083 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 084 */ 085 public static List<OrgGroupPermission> findWithDynamicQuery( 086 DynamicQuery dynamicQuery, int start, int end, 087 OrderByComparator orderByComparator) throws SystemException { 088 return getPersistence() 089 .findWithDynamicQuery(dynamicQuery, start, end, 090 orderByComparator); 091 } 092 093 /** 094 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 095 */ 096 public static OrgGroupPermission remove( 097 OrgGroupPermission orgGroupPermission) throws SystemException { 098 return getPersistence().remove(orgGroupPermission); 099 } 100 101 /** 102 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 103 */ 104 public static OrgGroupPermission update( 105 OrgGroupPermission orgGroupPermission, boolean merge) 106 throws SystemException { 107 return getPersistence().update(orgGroupPermission, merge); 108 } 109 110 /** 111 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 112 */ 113 public static OrgGroupPermission update( 114 OrgGroupPermission orgGroupPermission, boolean merge, 115 ServiceContext serviceContext) throws SystemException { 116 return getPersistence().update(orgGroupPermission, merge, serviceContext); 117 } 118 119 /** 120 * Caches the org group permission in the entity cache if it is enabled. 121 * 122 * @param orgGroupPermission the org group permission to cache 123 */ 124 public static void cacheResult( 125 com.liferay.portal.model.OrgGroupPermission orgGroupPermission) { 126 getPersistence().cacheResult(orgGroupPermission); 127 } 128 129 /** 130 * Caches the org group permissions in the entity cache if it is enabled. 131 * 132 * @param orgGroupPermissions the org group permissions to cache 133 */ 134 public static void cacheResult( 135 java.util.List<com.liferay.portal.model.OrgGroupPermission> orgGroupPermissions) { 136 getPersistence().cacheResult(orgGroupPermissions); 137 } 138 139 /** 140 * Creates a new org group permission with the primary key. Does not add the org group permission to the database. 141 * 142 * @param orgGroupPermissionPK the primary key for the new org group permission 143 * @return the new org group permission 144 */ 145 public static com.liferay.portal.model.OrgGroupPermission create( 146 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK) { 147 return getPersistence().create(orgGroupPermissionPK); 148 } 149 150 /** 151 * Removes the org group permission with the primary key from the database. Also notifies the appropriate model listeners. 152 * 153 * @param orgGroupPermissionPK the primary key of the org group permission to remove 154 * @return the org group permission that was removed 155 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a org group permission with the primary key could not be found 156 * @throws SystemException if a system exception occurred 157 */ 158 public static com.liferay.portal.model.OrgGroupPermission remove( 159 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK) 160 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 161 com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence().remove(orgGroupPermissionPK); 163 } 164 165 public static com.liferay.portal.model.OrgGroupPermission updateImpl( 166 com.liferay.portal.model.OrgGroupPermission orgGroupPermission, 167 boolean merge) 168 throws com.liferay.portal.kernel.exception.SystemException { 169 return getPersistence().updateImpl(orgGroupPermission, merge); 170 } 171 172 /** 173 * Finds the org group permission with the primary key or throws a {@link com.liferay.portal.NoSuchOrgGroupPermissionException} if it could not be found. 174 * 175 * @param orgGroupPermissionPK the primary key of the org group permission to find 176 * @return the org group permission 177 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a org group permission with the primary key could not be found 178 * @throws SystemException if a system exception occurred 179 */ 180 public static com.liferay.portal.model.OrgGroupPermission findByPrimaryKey( 181 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK) 182 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 183 com.liferay.portal.kernel.exception.SystemException { 184 return getPersistence().findByPrimaryKey(orgGroupPermissionPK); 185 } 186 187 /** 188 * Finds the org group permission with the primary key or returns <code>null</code> if it could not be found. 189 * 190 * @param orgGroupPermissionPK the primary key of the org group permission to find 191 * @return the org group permission, or <code>null</code> if a org group permission with the primary key could not be found 192 * @throws SystemException if a system exception occurred 193 */ 194 public static com.liferay.portal.model.OrgGroupPermission fetchByPrimaryKey( 195 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK) 196 throws com.liferay.portal.kernel.exception.SystemException { 197 return getPersistence().fetchByPrimaryKey(orgGroupPermissionPK); 198 } 199 200 /** 201 * Finds all the org group permissions where groupId = ?. 202 * 203 * @param groupId the group id to search with 204 * @return the matching org group permissions 205 * @throws SystemException if a system exception occurred 206 */ 207 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findByGroupId( 208 long groupId) 209 throws com.liferay.portal.kernel.exception.SystemException { 210 return getPersistence().findByGroupId(groupId); 211 } 212 213 /** 214 * Finds a range of all the org group permissions where groupId = ?. 215 * 216 * <p> 217 * 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. 218 * </p> 219 * 220 * @param groupId the group id to search with 221 * @param start the lower bound of the range of org group permissions to return 222 * @param end the upper bound of the range of org group permissions to return (not inclusive) 223 * @return the range of matching org group permissions 224 * @throws SystemException if a system exception occurred 225 */ 226 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findByGroupId( 227 long groupId, int start, int end) 228 throws com.liferay.portal.kernel.exception.SystemException { 229 return getPersistence().findByGroupId(groupId, start, end); 230 } 231 232 /** 233 * Finds an ordered range of all the org group permissions where groupId = ?. 234 * 235 * <p> 236 * 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. 237 * </p> 238 * 239 * @param groupId the group id to search with 240 * @param start the lower bound of the range of org group permissions to return 241 * @param end the upper bound of the range of org group permissions to return (not inclusive) 242 * @param orderByComparator the comparator to order the results by 243 * @return the ordered range of matching org group permissions 244 * @throws SystemException if a system exception occurred 245 */ 246 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findByGroupId( 247 long groupId, int start, int end, 248 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 249 throws com.liferay.portal.kernel.exception.SystemException { 250 return getPersistence() 251 .findByGroupId(groupId, start, end, orderByComparator); 252 } 253 254 /** 255 * Finds the first org group permission in the ordered set where groupId = ?. 256 * 257 * <p> 258 * 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. 259 * </p> 260 * 261 * @param groupId the group id to search with 262 * @param orderByComparator the comparator to order the set by 263 * @return the first matching org group permission 264 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 265 * @throws SystemException if a system exception occurred 266 */ 267 public static com.liferay.portal.model.OrgGroupPermission findByGroupId_First( 268 long groupId, 269 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 270 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 271 com.liferay.portal.kernel.exception.SystemException { 272 return getPersistence().findByGroupId_First(groupId, orderByComparator); 273 } 274 275 /** 276 * Finds the last org group permission in the ordered set where groupId = ?. 277 * 278 * <p> 279 * 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. 280 * </p> 281 * 282 * @param groupId the group id to search with 283 * @param orderByComparator the comparator to order the set by 284 * @return the last matching org group permission 285 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 286 * @throws SystemException if a system exception occurred 287 */ 288 public static com.liferay.portal.model.OrgGroupPermission findByGroupId_Last( 289 long groupId, 290 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 291 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 292 com.liferay.portal.kernel.exception.SystemException { 293 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 294 } 295 296 /** 297 * Finds the org group permissions before and after the current org group permission in the ordered set where groupId = ?. 298 * 299 * <p> 300 * 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. 301 * </p> 302 * 303 * @param orgGroupPermissionPK the primary key of the current org group permission 304 * @param groupId the group id to search with 305 * @param orderByComparator the comparator to order the set by 306 * @return the previous, current, and next org group permission 307 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a org group permission with the primary key could not be found 308 * @throws SystemException if a system exception occurred 309 */ 310 public static com.liferay.portal.model.OrgGroupPermission[] findByGroupId_PrevAndNext( 311 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK, 312 long groupId, 313 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 314 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 315 com.liferay.portal.kernel.exception.SystemException { 316 return getPersistence() 317 .findByGroupId_PrevAndNext(orgGroupPermissionPK, groupId, 318 orderByComparator); 319 } 320 321 /** 322 * Finds all the org group permissions where permissionId = ?. 323 * 324 * @param permissionId the permission id to search with 325 * @return the matching org group permissions 326 * @throws SystemException if a system exception occurred 327 */ 328 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findByPermissionId( 329 long permissionId) 330 throws com.liferay.portal.kernel.exception.SystemException { 331 return getPersistence().findByPermissionId(permissionId); 332 } 333 334 /** 335 * Finds a range of all the org group permissions where permissionId = ?. 336 * 337 * <p> 338 * 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. 339 * </p> 340 * 341 * @param permissionId the permission id to search with 342 * @param start the lower bound of the range of org group permissions to return 343 * @param end the upper bound of the range of org group permissions to return (not inclusive) 344 * @return the range of matching org group permissions 345 * @throws SystemException if a system exception occurred 346 */ 347 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findByPermissionId( 348 long permissionId, int start, int end) 349 throws com.liferay.portal.kernel.exception.SystemException { 350 return getPersistence().findByPermissionId(permissionId, start, end); 351 } 352 353 /** 354 * Finds an ordered range of all the org group permissions where permissionId = ?. 355 * 356 * <p> 357 * 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. 358 * </p> 359 * 360 * @param permissionId the permission id to search with 361 * @param start the lower bound of the range of org group permissions to return 362 * @param end the upper bound of the range of org group permissions to return (not inclusive) 363 * @param orderByComparator the comparator to order the results by 364 * @return the ordered range of matching org group permissions 365 * @throws SystemException if a system exception occurred 366 */ 367 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findByPermissionId( 368 long permissionId, int start, int end, 369 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 370 throws com.liferay.portal.kernel.exception.SystemException { 371 return getPersistence() 372 .findByPermissionId(permissionId, start, end, 373 orderByComparator); 374 } 375 376 /** 377 * Finds the first org group permission in the ordered set where permissionId = ?. 378 * 379 * <p> 380 * 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. 381 * </p> 382 * 383 * @param permissionId the permission id to search with 384 * @param orderByComparator the comparator to order the set by 385 * @return the first matching org group permission 386 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 387 * @throws SystemException if a system exception occurred 388 */ 389 public static com.liferay.portal.model.OrgGroupPermission findByPermissionId_First( 390 long permissionId, 391 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 392 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 393 com.liferay.portal.kernel.exception.SystemException { 394 return getPersistence() 395 .findByPermissionId_First(permissionId, orderByComparator); 396 } 397 398 /** 399 * Finds the last org group permission in the ordered set where permissionId = ?. 400 * 401 * <p> 402 * 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. 403 * </p> 404 * 405 * @param permissionId the permission id to search with 406 * @param orderByComparator the comparator to order the set by 407 * @return the last matching org group permission 408 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a matching org group permission could not be found 409 * @throws SystemException if a system exception occurred 410 */ 411 public static com.liferay.portal.model.OrgGroupPermission findByPermissionId_Last( 412 long permissionId, 413 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 414 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 415 com.liferay.portal.kernel.exception.SystemException { 416 return getPersistence() 417 .findByPermissionId_Last(permissionId, orderByComparator); 418 } 419 420 /** 421 * Finds the org group permissions before and after the current org group permission in the ordered set where permissionId = ?. 422 * 423 * <p> 424 * 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. 425 * </p> 426 * 427 * @param orgGroupPermissionPK the primary key of the current org group permission 428 * @param permissionId the permission id to search with 429 * @param orderByComparator the comparator to order the set by 430 * @return the previous, current, and next org group permission 431 * @throws com.liferay.portal.NoSuchOrgGroupPermissionException if a org group permission with the primary key could not be found 432 * @throws SystemException if a system exception occurred 433 */ 434 public static com.liferay.portal.model.OrgGroupPermission[] findByPermissionId_PrevAndNext( 435 com.liferay.portal.service.persistence.OrgGroupPermissionPK orgGroupPermissionPK, 436 long permissionId, 437 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 438 throws com.liferay.portal.NoSuchOrgGroupPermissionException, 439 com.liferay.portal.kernel.exception.SystemException { 440 return getPersistence() 441 .findByPermissionId_PrevAndNext(orgGroupPermissionPK, 442 permissionId, orderByComparator); 443 } 444 445 /** 446 * Finds all the org group permissions. 447 * 448 * @return the org group permissions 449 * @throws SystemException if a system exception occurred 450 */ 451 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findAll() 452 throws com.liferay.portal.kernel.exception.SystemException { 453 return getPersistence().findAll(); 454 } 455 456 /** 457 * Finds a range of all the org group permissions. 458 * 459 * <p> 460 * 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. 461 * </p> 462 * 463 * @param start the lower bound of the range of org group permissions to return 464 * @param end the upper bound of the range of org group permissions to return (not inclusive) 465 * @return the range of org group permissions 466 * @throws SystemException if a system exception occurred 467 */ 468 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findAll( 469 int start, int end) 470 throws com.liferay.portal.kernel.exception.SystemException { 471 return getPersistence().findAll(start, end); 472 } 473 474 /** 475 * Finds an ordered range of all the org group permissions. 476 * 477 * <p> 478 * 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. 479 * </p> 480 * 481 * @param start the lower bound of the range of org group permissions to return 482 * @param end the upper bound of the range of org group permissions to return (not inclusive) 483 * @param orderByComparator the comparator to order the results by 484 * @return the ordered range of org group permissions 485 * @throws SystemException if a system exception occurred 486 */ 487 public static java.util.List<com.liferay.portal.model.OrgGroupPermission> findAll( 488 int start, int end, 489 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 490 throws com.liferay.portal.kernel.exception.SystemException { 491 return getPersistence().findAll(start, end, orderByComparator); 492 } 493 494 /** 495 * Removes all the org group permissions where groupId = ? from the database. 496 * 497 * @param groupId the group id to search with 498 * @throws SystemException if a system exception occurred 499 */ 500 public static void removeByGroupId(long groupId) 501 throws com.liferay.portal.kernel.exception.SystemException { 502 getPersistence().removeByGroupId(groupId); 503 } 504 505 /** 506 * Removes all the org group permissions where permissionId = ? from the database. 507 * 508 * @param permissionId the permission id to search with 509 * @throws SystemException if a system exception occurred 510 */ 511 public static void removeByPermissionId(long permissionId) 512 throws com.liferay.portal.kernel.exception.SystemException { 513 getPersistence().removeByPermissionId(permissionId); 514 } 515 516 /** 517 * Removes all the org group permissions from the database. 518 * 519 * @throws SystemException if a system exception occurred 520 */ 521 public static void removeAll() 522 throws com.liferay.portal.kernel.exception.SystemException { 523 getPersistence().removeAll(); 524 } 525 526 /** 527 * Counts all the org group permissions where groupId = ?. 528 * 529 * @param groupId the group id to search with 530 * @return the number of matching org group permissions 531 * @throws SystemException if a system exception occurred 532 */ 533 public static int countByGroupId(long groupId) 534 throws com.liferay.portal.kernel.exception.SystemException { 535 return getPersistence().countByGroupId(groupId); 536 } 537 538 /** 539 * Counts all the org group permissions where permissionId = ?. 540 * 541 * @param permissionId the permission id to search with 542 * @return the number of matching org group permissions 543 * @throws SystemException if a system exception occurred 544 */ 545 public static int countByPermissionId(long permissionId) 546 throws com.liferay.portal.kernel.exception.SystemException { 547 return getPersistence().countByPermissionId(permissionId); 548 } 549 550 /** 551 * Counts all the org group permissions. 552 * 553 * @return the number of org group permissions 554 * @throws SystemException if a system exception occurred 555 */ 556 public static int countAll() 557 throws com.liferay.portal.kernel.exception.SystemException { 558 return getPersistence().countAll(); 559 } 560 561 public static OrgGroupPermissionPersistence getPersistence() { 562 if (_persistence == null) { 563 _persistence = (OrgGroupPermissionPersistence)PortalBeanLocatorUtil.locate(OrgGroupPermissionPersistence.class.getName()); 564 } 565 566 return _persistence; 567 } 568 569 public void setPersistence(OrgGroupPermissionPersistence persistence) { 570 _persistence = persistence; 571 } 572 573 private static OrgGroupPermissionPersistence _persistence; 574 }