001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.model.Lock; 018 019 /** 020 * The persistence interface for the lock service. 021 * 022 * <p> 023 * Caching information and settings can be found in <code>portal.properties</code> 024 * </p> 025 * 026 * @author Brian Wing Shun Chan 027 * @see LockPersistenceImpl 028 * @see LockUtil 029 * @generated 030 */ 031 public interface LockPersistence extends BasePersistence<Lock> { 032 /* 033 * NOTE FOR DEVELOPERS: 034 * 035 * Never modify or reference this interface directly. Always use {@link LockUtil} to access the lock persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 036 */ 037 038 /** 039 * Returns all the locks where uuid = ?. 040 * 041 * @param uuid the uuid 042 * @return the matching locks 043 * @throws SystemException if a system exception occurred 044 */ 045 public java.util.List<com.liferay.portal.model.Lock> findByUuid( 046 java.lang.String uuid) 047 throws com.liferay.portal.kernel.exception.SystemException; 048 049 /** 050 * Returns a range of all the locks where uuid = ?. 051 * 052 * <p> 053 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LockModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 054 * </p> 055 * 056 * @param uuid the uuid 057 * @param start the lower bound of the range of locks 058 * @param end the upper bound of the range of locks (not inclusive) 059 * @return the range of matching locks 060 * @throws SystemException if a system exception occurred 061 */ 062 public java.util.List<com.liferay.portal.model.Lock> findByUuid( 063 java.lang.String uuid, int start, int end) 064 throws com.liferay.portal.kernel.exception.SystemException; 065 066 /** 067 * Returns an ordered range of all the locks where uuid = ?. 068 * 069 * <p> 070 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LockModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 071 * </p> 072 * 073 * @param uuid the uuid 074 * @param start the lower bound of the range of locks 075 * @param end the upper bound of the range of locks (not inclusive) 076 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 077 * @return the ordered range of matching locks 078 * @throws SystemException if a system exception occurred 079 */ 080 public java.util.List<com.liferay.portal.model.Lock> findByUuid( 081 java.lang.String uuid, int start, int end, 082 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 083 throws com.liferay.portal.kernel.exception.SystemException; 084 085 /** 086 * Returns the first lock in the ordered set where uuid = ?. 087 * 088 * @param uuid the uuid 089 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 090 * @return the first matching lock 091 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 092 * @throws SystemException if a system exception occurred 093 */ 094 public com.liferay.portal.model.Lock findByUuid_First( 095 java.lang.String uuid, 096 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 097 throws com.liferay.portal.NoSuchLockException, 098 com.liferay.portal.kernel.exception.SystemException; 099 100 /** 101 * Returns the first lock in the ordered set where uuid = ?. 102 * 103 * @param uuid the uuid 104 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 105 * @return the first matching lock, or <code>null</code> if a matching lock could not be found 106 * @throws SystemException if a system exception occurred 107 */ 108 public com.liferay.portal.model.Lock fetchByUuid_First( 109 java.lang.String uuid, 110 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 111 throws com.liferay.portal.kernel.exception.SystemException; 112 113 /** 114 * Returns the last lock in the ordered set where uuid = ?. 115 * 116 * @param uuid the uuid 117 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 118 * @return the last matching lock 119 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 120 * @throws SystemException if a system exception occurred 121 */ 122 public com.liferay.portal.model.Lock findByUuid_Last( 123 java.lang.String uuid, 124 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 125 throws com.liferay.portal.NoSuchLockException, 126 com.liferay.portal.kernel.exception.SystemException; 127 128 /** 129 * Returns the last lock in the ordered set where uuid = ?. 130 * 131 * @param uuid the uuid 132 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 133 * @return the last matching lock, or <code>null</code> if a matching lock could not be found 134 * @throws SystemException if a system exception occurred 135 */ 136 public com.liferay.portal.model.Lock fetchByUuid_Last( 137 java.lang.String uuid, 138 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 139 throws com.liferay.portal.kernel.exception.SystemException; 140 141 /** 142 * Returns the locks before and after the current lock in the ordered set where uuid = ?. 143 * 144 * @param lockId the primary key of the current lock 145 * @param uuid the uuid 146 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 147 * @return the previous, current, and next lock 148 * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found 149 * @throws SystemException if a system exception occurred 150 */ 151 public com.liferay.portal.model.Lock[] findByUuid_PrevAndNext(long lockId, 152 java.lang.String uuid, 153 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 154 throws com.liferay.portal.NoSuchLockException, 155 com.liferay.portal.kernel.exception.SystemException; 156 157 /** 158 * Removes all the locks where uuid = ? from the database. 159 * 160 * @param uuid the uuid 161 * @throws SystemException if a system exception occurred 162 */ 163 public void removeByUuid(java.lang.String uuid) 164 throws com.liferay.portal.kernel.exception.SystemException; 165 166 /** 167 * Returns the number of locks where uuid = ?. 168 * 169 * @param uuid the uuid 170 * @return the number of matching locks 171 * @throws SystemException if a system exception occurred 172 */ 173 public int countByUuid(java.lang.String uuid) 174 throws com.liferay.portal.kernel.exception.SystemException; 175 176 /** 177 * Returns all the locks where uuid = ? and companyId = ?. 178 * 179 * @param uuid the uuid 180 * @param companyId the company ID 181 * @return the matching locks 182 * @throws SystemException if a system exception occurred 183 */ 184 public java.util.List<com.liferay.portal.model.Lock> findByUuid_C( 185 java.lang.String uuid, long companyId) 186 throws com.liferay.portal.kernel.exception.SystemException; 187 188 /** 189 * Returns a range of all the locks where uuid = ? and companyId = ?. 190 * 191 * <p> 192 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LockModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 193 * </p> 194 * 195 * @param uuid the uuid 196 * @param companyId the company ID 197 * @param start the lower bound of the range of locks 198 * @param end the upper bound of the range of locks (not inclusive) 199 * @return the range of matching locks 200 * @throws SystemException if a system exception occurred 201 */ 202 public java.util.List<com.liferay.portal.model.Lock> findByUuid_C( 203 java.lang.String uuid, long companyId, int start, int end) 204 throws com.liferay.portal.kernel.exception.SystemException; 205 206 /** 207 * Returns an ordered range of all the locks where uuid = ? and companyId = ?. 208 * 209 * <p> 210 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LockModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 211 * </p> 212 * 213 * @param uuid the uuid 214 * @param companyId the company ID 215 * @param start the lower bound of the range of locks 216 * @param end the upper bound of the range of locks (not inclusive) 217 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 218 * @return the ordered range of matching locks 219 * @throws SystemException if a system exception occurred 220 */ 221 public java.util.List<com.liferay.portal.model.Lock> findByUuid_C( 222 java.lang.String uuid, long companyId, int start, int end, 223 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 224 throws com.liferay.portal.kernel.exception.SystemException; 225 226 /** 227 * Returns the first lock in the ordered set where uuid = ? and companyId = ?. 228 * 229 * @param uuid the uuid 230 * @param companyId the company ID 231 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 232 * @return the first matching lock 233 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 234 * @throws SystemException if a system exception occurred 235 */ 236 public com.liferay.portal.model.Lock findByUuid_C_First( 237 java.lang.String uuid, long companyId, 238 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 239 throws com.liferay.portal.NoSuchLockException, 240 com.liferay.portal.kernel.exception.SystemException; 241 242 /** 243 * Returns the first lock in the ordered set where uuid = ? and companyId = ?. 244 * 245 * @param uuid the uuid 246 * @param companyId the company ID 247 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 248 * @return the first matching lock, or <code>null</code> if a matching lock could not be found 249 * @throws SystemException if a system exception occurred 250 */ 251 public com.liferay.portal.model.Lock fetchByUuid_C_First( 252 java.lang.String uuid, long companyId, 253 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 254 throws com.liferay.portal.kernel.exception.SystemException; 255 256 /** 257 * Returns the last lock in the ordered set where uuid = ? and companyId = ?. 258 * 259 * @param uuid the uuid 260 * @param companyId the company ID 261 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 262 * @return the last matching lock 263 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 264 * @throws SystemException if a system exception occurred 265 */ 266 public com.liferay.portal.model.Lock findByUuid_C_Last( 267 java.lang.String uuid, long companyId, 268 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 269 throws com.liferay.portal.NoSuchLockException, 270 com.liferay.portal.kernel.exception.SystemException; 271 272 /** 273 * Returns the last lock in the ordered set where uuid = ? and companyId = ?. 274 * 275 * @param uuid the uuid 276 * @param companyId the company ID 277 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 278 * @return the last matching lock, or <code>null</code> if a matching lock could not be found 279 * @throws SystemException if a system exception occurred 280 */ 281 public com.liferay.portal.model.Lock fetchByUuid_C_Last( 282 java.lang.String uuid, long companyId, 283 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 284 throws com.liferay.portal.kernel.exception.SystemException; 285 286 /** 287 * Returns the locks before and after the current lock in the ordered set where uuid = ? and companyId = ?. 288 * 289 * @param lockId the primary key of the current lock 290 * @param uuid the uuid 291 * @param companyId the company ID 292 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 293 * @return the previous, current, and next lock 294 * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found 295 * @throws SystemException if a system exception occurred 296 */ 297 public com.liferay.portal.model.Lock[] findByUuid_C_PrevAndNext( 298 long lockId, java.lang.String uuid, long companyId, 299 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 300 throws com.liferay.portal.NoSuchLockException, 301 com.liferay.portal.kernel.exception.SystemException; 302 303 /** 304 * Removes all the locks where uuid = ? and companyId = ? from the database. 305 * 306 * @param uuid the uuid 307 * @param companyId the company ID 308 * @throws SystemException if a system exception occurred 309 */ 310 public void removeByUuid_C(java.lang.String uuid, long companyId) 311 throws com.liferay.portal.kernel.exception.SystemException; 312 313 /** 314 * Returns the number of locks where uuid = ? and companyId = ?. 315 * 316 * @param uuid the uuid 317 * @param companyId the company ID 318 * @return the number of matching locks 319 * @throws SystemException if a system exception occurred 320 */ 321 public int countByUuid_C(java.lang.String uuid, long companyId) 322 throws com.liferay.portal.kernel.exception.SystemException; 323 324 /** 325 * Returns all the locks where expirationDate < ?. 326 * 327 * @param expirationDate the expiration date 328 * @return the matching locks 329 * @throws SystemException if a system exception occurred 330 */ 331 public java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate( 332 java.util.Date expirationDate) 333 throws com.liferay.portal.kernel.exception.SystemException; 334 335 /** 336 * Returns a range of all the locks where expirationDate < ?. 337 * 338 * <p> 339 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LockModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 340 * </p> 341 * 342 * @param expirationDate the expiration date 343 * @param start the lower bound of the range of locks 344 * @param end the upper bound of the range of locks (not inclusive) 345 * @return the range of matching locks 346 * @throws SystemException if a system exception occurred 347 */ 348 public java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate( 349 java.util.Date expirationDate, int start, int end) 350 throws com.liferay.portal.kernel.exception.SystemException; 351 352 /** 353 * Returns an ordered range of all the locks where expirationDate < ?. 354 * 355 * <p> 356 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LockModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 357 * </p> 358 * 359 * @param expirationDate the expiration date 360 * @param start the lower bound of the range of locks 361 * @param end the upper bound of the range of locks (not inclusive) 362 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 363 * @return the ordered range of matching locks 364 * @throws SystemException if a system exception occurred 365 */ 366 public java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate( 367 java.util.Date expirationDate, int start, int end, 368 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 369 throws com.liferay.portal.kernel.exception.SystemException; 370 371 /** 372 * Returns the first lock in the ordered set where expirationDate < ?. 373 * 374 * @param expirationDate the expiration date 375 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 376 * @return the first matching lock 377 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 378 * @throws SystemException if a system exception occurred 379 */ 380 public com.liferay.portal.model.Lock findByLtExpirationDate_First( 381 java.util.Date expirationDate, 382 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 383 throws com.liferay.portal.NoSuchLockException, 384 com.liferay.portal.kernel.exception.SystemException; 385 386 /** 387 * Returns the first lock in the ordered set where expirationDate < ?. 388 * 389 * @param expirationDate the expiration date 390 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 391 * @return the first matching lock, or <code>null</code> if a matching lock could not be found 392 * @throws SystemException if a system exception occurred 393 */ 394 public com.liferay.portal.model.Lock fetchByLtExpirationDate_First( 395 java.util.Date expirationDate, 396 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 397 throws com.liferay.portal.kernel.exception.SystemException; 398 399 /** 400 * Returns the last lock in the ordered set where expirationDate < ?. 401 * 402 * @param expirationDate the expiration date 403 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 404 * @return the last matching lock 405 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 406 * @throws SystemException if a system exception occurred 407 */ 408 public com.liferay.portal.model.Lock findByLtExpirationDate_Last( 409 java.util.Date expirationDate, 410 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 411 throws com.liferay.portal.NoSuchLockException, 412 com.liferay.portal.kernel.exception.SystemException; 413 414 /** 415 * Returns the last lock in the ordered set where expirationDate < ?. 416 * 417 * @param expirationDate the expiration date 418 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 419 * @return the last matching lock, or <code>null</code> if a matching lock could not be found 420 * @throws SystemException if a system exception occurred 421 */ 422 public com.liferay.portal.model.Lock fetchByLtExpirationDate_Last( 423 java.util.Date expirationDate, 424 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 425 throws com.liferay.portal.kernel.exception.SystemException; 426 427 /** 428 * Returns the locks before and after the current lock in the ordered set where expirationDate < ?. 429 * 430 * @param lockId the primary key of the current lock 431 * @param expirationDate the expiration date 432 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 433 * @return the previous, current, and next lock 434 * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found 435 * @throws SystemException if a system exception occurred 436 */ 437 public com.liferay.portal.model.Lock[] findByLtExpirationDate_PrevAndNext( 438 long lockId, java.util.Date expirationDate, 439 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 440 throws com.liferay.portal.NoSuchLockException, 441 com.liferay.portal.kernel.exception.SystemException; 442 443 /** 444 * Removes all the locks where expirationDate < ? from the database. 445 * 446 * @param expirationDate the expiration date 447 * @throws SystemException if a system exception occurred 448 */ 449 public void removeByLtExpirationDate(java.util.Date expirationDate) 450 throws com.liferay.portal.kernel.exception.SystemException; 451 452 /** 453 * Returns the number of locks where expirationDate < ?. 454 * 455 * @param expirationDate the expiration date 456 * @return the number of matching locks 457 * @throws SystemException if a system exception occurred 458 */ 459 public int countByLtExpirationDate(java.util.Date expirationDate) 460 throws com.liferay.portal.kernel.exception.SystemException; 461 462 /** 463 * Returns the lock where className = ? and key = ? or throws a {@link com.liferay.portal.NoSuchLockException} if it could not be found. 464 * 465 * @param className the class name 466 * @param key the key 467 * @return the matching lock 468 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 469 * @throws SystemException if a system exception occurred 470 */ 471 public com.liferay.portal.model.Lock findByC_K(java.lang.String className, 472 java.lang.String key) 473 throws com.liferay.portal.NoSuchLockException, 474 com.liferay.portal.kernel.exception.SystemException; 475 476 /** 477 * Returns the lock where className = ? and key = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 478 * 479 * @param className the class name 480 * @param key the key 481 * @return the matching lock, or <code>null</code> if a matching lock could not be found 482 * @throws SystemException if a system exception occurred 483 */ 484 public com.liferay.portal.model.Lock fetchByC_K( 485 java.lang.String className, java.lang.String key) 486 throws com.liferay.portal.kernel.exception.SystemException; 487 488 /** 489 * Returns the lock where className = ? and key = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 490 * 491 * @param className the class name 492 * @param key the key 493 * @param retrieveFromCache whether to use the finder cache 494 * @return the matching lock, or <code>null</code> if a matching lock could not be found 495 * @throws SystemException if a system exception occurred 496 */ 497 public com.liferay.portal.model.Lock fetchByC_K( 498 java.lang.String className, java.lang.String key, 499 boolean retrieveFromCache) 500 throws com.liferay.portal.kernel.exception.SystemException; 501 502 /** 503 * Removes the lock where className = ? and key = ? from the database. 504 * 505 * @param className the class name 506 * @param key the key 507 * @return the lock that was removed 508 * @throws SystemException if a system exception occurred 509 */ 510 public com.liferay.portal.model.Lock removeByC_K( 511 java.lang.String className, java.lang.String key) 512 throws com.liferay.portal.NoSuchLockException, 513 com.liferay.portal.kernel.exception.SystemException; 514 515 /** 516 * Returns the number of locks where className = ? and key = ?. 517 * 518 * @param className the class name 519 * @param key the key 520 * @return the number of matching locks 521 * @throws SystemException if a system exception occurred 522 */ 523 public int countByC_K(java.lang.String className, java.lang.String key) 524 throws com.liferay.portal.kernel.exception.SystemException; 525 526 /** 527 * Returns the lock where className = ? and key = ? and owner = ? or throws a {@link com.liferay.portal.NoSuchLockException} if it could not be found. 528 * 529 * @param className the class name 530 * @param key the key 531 * @param owner the owner 532 * @return the matching lock 533 * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found 534 * @throws SystemException if a system exception occurred 535 */ 536 public com.liferay.portal.model.Lock findByC_K_O( 537 java.lang.String className, java.lang.String key, java.lang.String owner) 538 throws com.liferay.portal.NoSuchLockException, 539 com.liferay.portal.kernel.exception.SystemException; 540 541 /** 542 * Returns the lock where className = ? and key = ? and owner = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 543 * 544 * @param className the class name 545 * @param key the key 546 * @param owner the owner 547 * @return the matching lock, or <code>null</code> if a matching lock could not be found 548 * @throws SystemException if a system exception occurred 549 */ 550 public com.liferay.portal.model.Lock fetchByC_K_O( 551 java.lang.String className, java.lang.String key, java.lang.String owner) 552 throws com.liferay.portal.kernel.exception.SystemException; 553 554 /** 555 * Returns the lock where className = ? and key = ? and owner = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 556 * 557 * @param className the class name 558 * @param key the key 559 * @param owner the owner 560 * @param retrieveFromCache whether to use the finder cache 561 * @return the matching lock, or <code>null</code> if a matching lock could not be found 562 * @throws SystemException if a system exception occurred 563 */ 564 public com.liferay.portal.model.Lock fetchByC_K_O( 565 java.lang.String className, java.lang.String key, 566 java.lang.String owner, boolean retrieveFromCache) 567 throws com.liferay.portal.kernel.exception.SystemException; 568 569 /** 570 * Removes the lock where className = ? and key = ? and owner = ? from the database. 571 * 572 * @param className the class name 573 * @param key the key 574 * @param owner the owner 575 * @return the lock that was removed 576 * @throws SystemException if a system exception occurred 577 */ 578 public com.liferay.portal.model.Lock removeByC_K_O( 579 java.lang.String className, java.lang.String key, java.lang.String owner) 580 throws com.liferay.portal.NoSuchLockException, 581 com.liferay.portal.kernel.exception.SystemException; 582 583 /** 584 * Returns the number of locks where className = ? and key = ? and owner = ?. 585 * 586 * @param className the class name 587 * @param key the key 588 * @param owner the owner 589 * @return the number of matching locks 590 * @throws SystemException if a system exception occurred 591 */ 592 public int countByC_K_O(java.lang.String className, java.lang.String key, 593 java.lang.String owner) 594 throws com.liferay.portal.kernel.exception.SystemException; 595 596 /** 597 * Caches the lock in the entity cache if it is enabled. 598 * 599 * @param lock the lock 600 */ 601 public void cacheResult(com.liferay.portal.model.Lock lock); 602 603 /** 604 * Caches the locks in the entity cache if it is enabled. 605 * 606 * @param locks the locks 607 */ 608 public void cacheResult(java.util.List<com.liferay.portal.model.Lock> locks); 609 610 /** 611 * Creates a new lock with the primary key. Does not add the lock to the database. 612 * 613 * @param lockId the primary key for the new lock 614 * @return the new lock 615 */ 616 public com.liferay.portal.model.Lock create(long lockId); 617 618 /** 619 * Removes the lock with the primary key from the database. Also notifies the appropriate model listeners. 620 * 621 * @param lockId the primary key of the lock 622 * @return the lock that was removed 623 * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found 624 * @throws SystemException if a system exception occurred 625 */ 626 public com.liferay.portal.model.Lock remove(long lockId) 627 throws com.liferay.portal.NoSuchLockException, 628 com.liferay.portal.kernel.exception.SystemException; 629 630 public com.liferay.portal.model.Lock updateImpl( 631 com.liferay.portal.model.Lock lock) 632 throws com.liferay.portal.kernel.exception.SystemException; 633 634 /** 635 * Returns the lock with the primary key or throws a {@link com.liferay.portal.NoSuchLockException} if it could not be found. 636 * 637 * @param lockId the primary key of the lock 638 * @return the lock 639 * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found 640 * @throws SystemException if a system exception occurred 641 */ 642 public com.liferay.portal.model.Lock findByPrimaryKey(long lockId) 643 throws com.liferay.portal.NoSuchLockException, 644 com.liferay.portal.kernel.exception.SystemException; 645 646 /** 647 * Returns the lock with the primary key or returns <code>null</code> if it could not be found. 648 * 649 * @param lockId the primary key of the lock 650 * @return the lock, or <code>null</code> if a lock with the primary key could not be found 651 * @throws SystemException if a system exception occurred 652 */ 653 public com.liferay.portal.model.Lock fetchByPrimaryKey(long lockId) 654 throws com.liferay.portal.kernel.exception.SystemException; 655 656 /** 657 * Returns all the locks. 658 * 659 * @return the locks 660 * @throws SystemException if a system exception occurred 661 */ 662 public java.util.List<com.liferay.portal.model.Lock> findAll() 663 throws com.liferay.portal.kernel.exception.SystemException; 664 665 /** 666 * Returns a range of all the locks. 667 * 668 * <p> 669 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LockModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 670 * </p> 671 * 672 * @param start the lower bound of the range of locks 673 * @param end the upper bound of the range of locks (not inclusive) 674 * @return the range of locks 675 * @throws SystemException if a system exception occurred 676 */ 677 public java.util.List<com.liferay.portal.model.Lock> findAll(int start, 678 int end) throws com.liferay.portal.kernel.exception.SystemException; 679 680 /** 681 * Returns an ordered range of all the locks. 682 * 683 * <p> 684 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LockModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 685 * </p> 686 * 687 * @param start the lower bound of the range of locks 688 * @param end the upper bound of the range of locks (not inclusive) 689 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 690 * @return the ordered range of locks 691 * @throws SystemException if a system exception occurred 692 */ 693 public java.util.List<com.liferay.portal.model.Lock> findAll(int start, 694 int end, 695 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 696 throws com.liferay.portal.kernel.exception.SystemException; 697 698 /** 699 * Removes all the locks from the database. 700 * 701 * @throws SystemException if a system exception occurred 702 */ 703 public void removeAll() 704 throws com.liferay.portal.kernel.exception.SystemException; 705 706 /** 707 * Returns the number of locks. 708 * 709 * @return the number of locks 710 * @throws SystemException if a system exception occurred 711 */ 712 public int countAll() 713 throws com.liferay.portal.kernel.exception.SystemException; 714 }