001 /** 002 * Copyright (c) 2000-2010 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.model.Lock; 022 import com.liferay.portal.service.ServiceContext; 023 024 import java.util.List; 025 026 /** 027 * The persistence utility for the lock service. 028 * 029 * <p> 030 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class. 031 * </p> 032 * 033 * @author Brian Wing Shun Chan 034 * @see LockPersistence 035 * @see LockPersistenceImpl 036 * @generated 037 */ 038 public class LockUtil { 039 /** 040 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 041 */ 042 public static void clearCache() { 043 getPersistence().clearCache(); 044 } 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 048 */ 049 public static void clearCache(Lock lock) { 050 getPersistence().clearCache(lock); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 055 */ 056 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 057 throws SystemException { 058 return getPersistence().countWithDynamicQuery(dynamicQuery); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 063 */ 064 public static List<Lock> findWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().findWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 071 */ 072 public static List<Lock> findWithDynamicQuery(DynamicQuery dynamicQuery, 073 int start, int end) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 079 */ 080 public static List<Lock> findWithDynamicQuery(DynamicQuery dynamicQuery, 081 int start, int end, OrderByComparator orderByComparator) 082 throws SystemException { 083 return getPersistence() 084 .findWithDynamicQuery(dynamicQuery, start, end, 085 orderByComparator); 086 } 087 088 /** 089 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 090 */ 091 public static Lock remove(Lock lock) throws SystemException { 092 return getPersistence().remove(lock); 093 } 094 095 /** 096 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 097 */ 098 public static Lock update(Lock lock, boolean merge) 099 throws SystemException { 100 return getPersistence().update(lock, merge); 101 } 102 103 /** 104 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 105 */ 106 public static Lock update(Lock lock, boolean merge, 107 ServiceContext serviceContext) throws SystemException { 108 return getPersistence().update(lock, merge, serviceContext); 109 } 110 111 /** 112 * Caches the lock in the entity cache if it is enabled. 113 * 114 * @param lock the lock to cache 115 */ 116 public static void cacheResult(com.liferay.portal.model.Lock lock) { 117 getPersistence().cacheResult(lock); 118 } 119 120 /** 121 * Caches the locks in the entity cache if it is enabled. 122 * 123 * @param locks the locks to cache 124 */ 125 public static void cacheResult( 126 java.util.List<com.liferay.portal.model.Lock> locks) { 127 getPersistence().cacheResult(locks); 128 } 129 130 /** 131 * Creates a new lock with the primary key. 132 * 133 * @param lockId the primary key for the new lock 134 * @return the new lock 135 */ 136 public static com.liferay.portal.model.Lock create(long lockId) { 137 return getPersistence().create(lockId); 138 } 139 140 /** 141 * Removes the lock with the primary key from the database. Also notifies the appropriate model listeners. 142 * 143 * @param lockId the primary key of the lock to remove 144 * @return the lock that was removed 145 * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found 146 * @throws SystemException if a system exception occurred 147 */ 148 public static com.liferay.portal.model.Lock remove(long lockId) 149 throws com.liferay.portal.NoSuchLockException, 150 com.liferay.portal.kernel.exception.SystemException { 151 return getPersistence().remove(lockId); 152 } 153 154 public static com.liferay.portal.model.Lock updateImpl( 155 com.liferay.portal.model.Lock lock, boolean merge) 156 throws com.liferay.portal.kernel.exception.SystemException { 157 return getPersistence().updateImpl(lock, merge); 158 } 159 160 /** 161 * Finds the lock with the primary key or throws a {@link com.liferay.portal.NoSuchLockException} if it could not be found. 162 * 163 * @param lockId the primary key of the lock to find 164 * @return the lock 165 * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found 166 * @throws SystemException if a system exception occurred 167 */ 168 public static com.liferay.portal.model.Lock findByPrimaryKey(long lockId) 169 throws com.liferay.portal.NoSuchLockException, 170 com.liferay.portal.kernel.exception.SystemException { 171 return getPersistence().findByPrimaryKey(lockId); 172 } 173 174 /** 175 * Finds the lock with the primary key or returns <code>null</code> if it could not be found. 176 * 177 * @param lockId the primary key of the lock to find 178 * @return the lock, or <code>null</code> if a lock with the primary key could not be found 179 * @throws SystemException if a system exception occurred 180 */ 181 public static com.liferay.portal.model.Lock fetchByPrimaryKey(long lockId) 182 throws com.liferay.portal.kernel.exception.SystemException { 183 return getPersistence().fetchByPrimaryKey(lockId); 184 } 185 186 /** 187 * Finds all the locks where uuid = ?. 188 * 189 * @param uuid the uuid to search with 190 * @return the matching locks 191 * @throws SystemException if a system exception occurred 192 */ 193 public static java.util.List<com.liferay.portal.model.Lock> findByUuid( 194 java.lang.String uuid) 195 throws com.liferay.portal.kernel.exception.SystemException { 196 return getPersistence().findByUuid(uuid); 197 } 198 199 /** 200 * Finds a range of all the locks where uuid = ?. 201 * 202 * <p> 203 * 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. 204 * </p> 205 * 206 * @param uuid the uuid to search with 207 * @param start the lower bound of the range of locks to return 208 * @param end the upper bound of the range of locks to return (not inclusive) 209 * @return the range of matching locks 210 * @throws SystemException if a system exception occurred 211 */ 212 public static java.util.List<com.liferay.portal.model.Lock> findByUuid( 213 java.lang.String uuid, int start, int end) 214 throws com.liferay.portal.kernel.exception.SystemException { 215 return getPersistence().findByUuid(uuid, start, end); 216 } 217 218 /** 219 * Finds an ordered range of all the locks where uuid = ?. 220 * 221 * <p> 222 * 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. 223 * </p> 224 * 225 * @param uuid the uuid to search with 226 * @param start the lower bound of the range of locks to return 227 * @param end the upper bound of the range of locks to return (not inclusive) 228 * @param orderByComparator the comparator to order the results by 229 * @return the ordered range of matching locks 230 * @throws SystemException if a system exception occurred 231 */ 232 public static java.util.List<com.liferay.portal.model.Lock> findByUuid( 233 java.lang.String uuid, int start, int end, 234 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 235 throws com.liferay.portal.kernel.exception.SystemException { 236 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 237 } 238 239 /** 240 * Finds the first lock in the ordered set where uuid = ?. 241 * 242 * <p> 243 * 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. 244 * </p> 245 * 246 * @param uuid the uuid to search with 247 * @param orderByComparator the comparator to order the set by 248 * @return the first matching lock 249 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 250 * @throws SystemException if a system exception occurred 251 */ 252 public static com.liferay.portal.model.Lock findByUuid_First( 253 java.lang.String uuid, 254 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 255 throws com.liferay.portal.NoSuchLockException, 256 com.liferay.portal.kernel.exception.SystemException { 257 return getPersistence().findByUuid_First(uuid, orderByComparator); 258 } 259 260 /** 261 * Finds the last lock in the ordered set where uuid = ?. 262 * 263 * <p> 264 * 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. 265 * </p> 266 * 267 * @param uuid the uuid to search with 268 * @param orderByComparator the comparator to order the set by 269 * @return the last matching lock 270 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 271 * @throws SystemException if a system exception occurred 272 */ 273 public static com.liferay.portal.model.Lock findByUuid_Last( 274 java.lang.String uuid, 275 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 276 throws com.liferay.portal.NoSuchLockException, 277 com.liferay.portal.kernel.exception.SystemException { 278 return getPersistence().findByUuid_Last(uuid, orderByComparator); 279 } 280 281 /** 282 * Finds the locks before and after the current lock in the ordered set where uuid = ?. 283 * 284 * <p> 285 * 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. 286 * </p> 287 * 288 * @param lockId the primary key of the current lock 289 * @param uuid the uuid to search with 290 * @param orderByComparator the comparator to order the set by 291 * @return the previous, current, and next lock 292 * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found 293 * @throws SystemException if a system exception occurred 294 */ 295 public static com.liferay.portal.model.Lock[] findByUuid_PrevAndNext( 296 long lockId, java.lang.String uuid, 297 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 298 throws com.liferay.portal.NoSuchLockException, 299 com.liferay.portal.kernel.exception.SystemException { 300 return getPersistence() 301 .findByUuid_PrevAndNext(lockId, uuid, orderByComparator); 302 } 303 304 /** 305 * Finds all the locks where expirationDate < ?. 306 * 307 * @param expirationDate the expiration date to search with 308 * @return the matching locks 309 * @throws SystemException if a system exception occurred 310 */ 311 public static java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate( 312 java.util.Date expirationDate) 313 throws com.liferay.portal.kernel.exception.SystemException { 314 return getPersistence().findByLtExpirationDate(expirationDate); 315 } 316 317 /** 318 * Finds a range of all the locks where expirationDate < ?. 319 * 320 * <p> 321 * 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. 322 * </p> 323 * 324 * @param expirationDate the expiration date to search with 325 * @param start the lower bound of the range of locks to return 326 * @param end the upper bound of the range of locks to return (not inclusive) 327 * @return the range of matching locks 328 * @throws SystemException if a system exception occurred 329 */ 330 public static java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate( 331 java.util.Date expirationDate, int start, int end) 332 throws com.liferay.portal.kernel.exception.SystemException { 333 return getPersistence() 334 .findByLtExpirationDate(expirationDate, start, end); 335 } 336 337 /** 338 * Finds an ordered range of all the locks where expirationDate < ?. 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 expirationDate the expiration date to search with 345 * @param start the lower bound of the range of locks to return 346 * @param end the upper bound of the range of locks to return (not inclusive) 347 * @param orderByComparator the comparator to order the results by 348 * @return the ordered range of matching locks 349 * @throws SystemException if a system exception occurred 350 */ 351 public static java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate( 352 java.util.Date expirationDate, int start, int end, 353 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 354 throws com.liferay.portal.kernel.exception.SystemException { 355 return getPersistence() 356 .findByLtExpirationDate(expirationDate, start, end, 357 orderByComparator); 358 } 359 360 /** 361 * Finds the first lock in the ordered set where expirationDate < ?. 362 * 363 * <p> 364 * 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. 365 * </p> 366 * 367 * @param expirationDate the expiration date to search with 368 * @param orderByComparator the comparator to order the set by 369 * @return the first matching lock 370 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 371 * @throws SystemException if a system exception occurred 372 */ 373 public static com.liferay.portal.model.Lock findByLtExpirationDate_First( 374 java.util.Date expirationDate, 375 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 376 throws com.liferay.portal.NoSuchLockException, 377 com.liferay.portal.kernel.exception.SystemException { 378 return getPersistence() 379 .findByLtExpirationDate_First(expirationDate, 380 orderByComparator); 381 } 382 383 /** 384 * Finds the last lock in the ordered set where expirationDate < ?. 385 * 386 * <p> 387 * 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. 388 * </p> 389 * 390 * @param expirationDate the expiration date to search with 391 * @param orderByComparator the comparator to order the set by 392 * @return the last matching lock 393 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 394 * @throws SystemException if a system exception occurred 395 */ 396 public static com.liferay.portal.model.Lock findByLtExpirationDate_Last( 397 java.util.Date expirationDate, 398 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 399 throws com.liferay.portal.NoSuchLockException, 400 com.liferay.portal.kernel.exception.SystemException { 401 return getPersistence() 402 .findByLtExpirationDate_Last(expirationDate, 403 orderByComparator); 404 } 405 406 /** 407 * Finds the locks before and after the current lock in the ordered set where expirationDate < ?. 408 * 409 * <p> 410 * 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. 411 * </p> 412 * 413 * @param lockId the primary key of the current lock 414 * @param expirationDate the expiration date to search with 415 * @param orderByComparator the comparator to order the set by 416 * @return the previous, current, and next lock 417 * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found 418 * @throws SystemException if a system exception occurred 419 */ 420 public static com.liferay.portal.model.Lock[] findByLtExpirationDate_PrevAndNext( 421 long lockId, java.util.Date expirationDate, 422 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 423 throws com.liferay.portal.NoSuchLockException, 424 com.liferay.portal.kernel.exception.SystemException { 425 return getPersistence() 426 .findByLtExpirationDate_PrevAndNext(lockId, expirationDate, 427 orderByComparator); 428 } 429 430 /** 431 * Finds the lock where className = ? and key = ? or throws a {@link com.liferay.portal.NoSuchLockException} if it could not be found. 432 * 433 * @param className the class name to search with 434 * @param key the key to search with 435 * @return the matching lock 436 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 437 * @throws SystemException if a system exception occurred 438 */ 439 public static com.liferay.portal.model.Lock findByC_K( 440 java.lang.String className, java.lang.String key) 441 throws com.liferay.portal.NoSuchLockException, 442 com.liferay.portal.kernel.exception.SystemException { 443 return getPersistence().findByC_K(className, key); 444 } 445 446 /** 447 * Finds the lock where className = ? and key = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 448 * 449 * @param className the class name to search with 450 * @param key the key to search with 451 * @return the matching lock, or <code>null</code> if a matching lock could not be found 452 * @throws SystemException if a system exception occurred 453 */ 454 public static com.liferay.portal.model.Lock fetchByC_K( 455 java.lang.String className, java.lang.String key) 456 throws com.liferay.portal.kernel.exception.SystemException { 457 return getPersistence().fetchByC_K(className, key); 458 } 459 460 /** 461 * Finds the lock where className = ? and key = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 462 * 463 * @param className the class name to search with 464 * @param key the key to search with 465 * @return the matching lock, or <code>null</code> if a matching lock could not be found 466 * @throws SystemException if a system exception occurred 467 */ 468 public static com.liferay.portal.model.Lock fetchByC_K( 469 java.lang.String className, java.lang.String key, 470 boolean retrieveFromCache) 471 throws com.liferay.portal.kernel.exception.SystemException { 472 return getPersistence().fetchByC_K(className, key, retrieveFromCache); 473 } 474 475 /** 476 * Finds all the locks. 477 * 478 * @return the locks 479 * @throws SystemException if a system exception occurred 480 */ 481 public static java.util.List<com.liferay.portal.model.Lock> findAll() 482 throws com.liferay.portal.kernel.exception.SystemException { 483 return getPersistence().findAll(); 484 } 485 486 /** 487 * Finds a range of all the locks. 488 * 489 * <p> 490 * 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. 491 * </p> 492 * 493 * @param start the lower bound of the range of locks to return 494 * @param end the upper bound of the range of locks to return (not inclusive) 495 * @return the range of locks 496 * @throws SystemException if a system exception occurred 497 */ 498 public static java.util.List<com.liferay.portal.model.Lock> findAll( 499 int start, int end) 500 throws com.liferay.portal.kernel.exception.SystemException { 501 return getPersistence().findAll(start, end); 502 } 503 504 /** 505 * Finds an ordered range of all the locks. 506 * 507 * <p> 508 * 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. 509 * </p> 510 * 511 * @param start the lower bound of the range of locks to return 512 * @param end the upper bound of the range of locks to return (not inclusive) 513 * @param orderByComparator the comparator to order the results by 514 * @return the ordered range of locks 515 * @throws SystemException if a system exception occurred 516 */ 517 public static java.util.List<com.liferay.portal.model.Lock> findAll( 518 int start, int end, 519 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 520 throws com.liferay.portal.kernel.exception.SystemException { 521 return getPersistence().findAll(start, end, orderByComparator); 522 } 523 524 /** 525 * Removes all the locks where uuid = ? from the database. 526 * 527 * @param uuid the uuid to search with 528 * @throws SystemException if a system exception occurred 529 */ 530 public static void removeByUuid(java.lang.String uuid) 531 throws com.liferay.portal.kernel.exception.SystemException { 532 getPersistence().removeByUuid(uuid); 533 } 534 535 /** 536 * Removes all the locks where expirationDate < ? from the database. 537 * 538 * @param expirationDate the expiration date to search with 539 * @throws SystemException if a system exception occurred 540 */ 541 public static void removeByLtExpirationDate(java.util.Date expirationDate) 542 throws com.liferay.portal.kernel.exception.SystemException { 543 getPersistence().removeByLtExpirationDate(expirationDate); 544 } 545 546 /** 547 * Removes the lock where className = ? and key = ? from the database. 548 * 549 * @param className the class name to search with 550 * @param key the key to search with 551 * @throws SystemException if a system exception occurred 552 */ 553 public static void removeByC_K(java.lang.String className, 554 java.lang.String key) 555 throws com.liferay.portal.NoSuchLockException, 556 com.liferay.portal.kernel.exception.SystemException { 557 getPersistence().removeByC_K(className, key); 558 } 559 560 /** 561 * Removes all the locks from the database. 562 * 563 * @throws SystemException if a system exception occurred 564 */ 565 public static void removeAll() 566 throws com.liferay.portal.kernel.exception.SystemException { 567 getPersistence().removeAll(); 568 } 569 570 /** 571 * Counts all the locks where uuid = ?. 572 * 573 * @param uuid the uuid to search with 574 * @return the number of matching locks 575 * @throws SystemException if a system exception occurred 576 */ 577 public static int countByUuid(java.lang.String uuid) 578 throws com.liferay.portal.kernel.exception.SystemException { 579 return getPersistence().countByUuid(uuid); 580 } 581 582 /** 583 * Counts all the locks where expirationDate < ?. 584 * 585 * @param expirationDate the expiration date to search with 586 * @return the number of matching locks 587 * @throws SystemException if a system exception occurred 588 */ 589 public static int countByLtExpirationDate(java.util.Date expirationDate) 590 throws com.liferay.portal.kernel.exception.SystemException { 591 return getPersistence().countByLtExpirationDate(expirationDate); 592 } 593 594 /** 595 * Counts all the locks where className = ? and key = ?. 596 * 597 * @param className the class name to search with 598 * @param key the key to search with 599 * @return the number of matching locks 600 * @throws SystemException if a system exception occurred 601 */ 602 public static int countByC_K(java.lang.String className, 603 java.lang.String key) 604 throws com.liferay.portal.kernel.exception.SystemException { 605 return getPersistence().countByC_K(className, key); 606 } 607 608 /** 609 * Counts all the locks. 610 * 611 * @return the number of locks 612 * @throws SystemException if a system exception occurred 613 */ 614 public static int countAll() 615 throws com.liferay.portal.kernel.exception.SystemException { 616 return getPersistence().countAll(); 617 } 618 619 public static LockPersistence getPersistence() { 620 if (_persistence == null) { 621 _persistence = (LockPersistence)PortalBeanLocatorUtil.locate(LockPersistence.class.getName()); 622 } 623 624 return _persistence; 625 } 626 627 public void setPersistence(LockPersistence persistence) { 628 _persistence = persistence; 629 } 630 631 private static LockPersistence _persistence; 632 }