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