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