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 = &#63;.
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 = &#63;.
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 = &#63;.
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 = &#63;.
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 = &#63;.
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 = &#63;.
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 = &#63;.
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 = &#63;.
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 = &#63; 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 = &#63;.
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 = &#63; and companyId = &#63;.
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 = &#63; and companyId = &#63;.
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 = &#63; and companyId = &#63;.
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 = &#63; and companyId = &#63;.
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 = &#63; and companyId = &#63;.
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 = &#63; and companyId = &#63;.
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 = &#63; and companyId = &#63;.
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 = &#63; and companyId = &#63;.
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 = &#63; and companyId = &#63; 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 = &#63; and companyId = &#63;.
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 &lt; &#63;.
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 &lt; &#63;.
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 &lt; &#63;.
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 &lt; &#63;.
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 &lt; &#63;.
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 &lt; &#63;.
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 &lt; &#63;.
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 &lt; &#63;.
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 &lt; &#63; 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 &lt; &#63;.
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 = &#63; and key = &#63; 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 = &#63; and key = &#63; 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 = &#63; and key = &#63; 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 = &#63; and key = &#63; 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 = &#63; and key = &#63;.
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            * Caches the lock in the entity cache if it is enabled.
528            *
529            * @param lock the lock
530            */
531            public void cacheResult(com.liferay.portal.model.Lock lock);
532    
533            /**
534            * Caches the locks in the entity cache if it is enabled.
535            *
536            * @param locks the locks
537            */
538            public void cacheResult(java.util.List<com.liferay.portal.model.Lock> locks);
539    
540            /**
541            * Creates a new lock with the primary key. Does not add the lock to the database.
542            *
543            * @param lockId the primary key for the new lock
544            * @return the new lock
545            */
546            public com.liferay.portal.model.Lock create(long lockId);
547    
548            /**
549            * Removes the lock with the primary key from the database. Also notifies the appropriate model listeners.
550            *
551            * @param lockId the primary key of the lock
552            * @return the lock that was removed
553            * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found
554            * @throws SystemException if a system exception occurred
555            */
556            public com.liferay.portal.model.Lock remove(long lockId)
557                    throws com.liferay.portal.NoSuchLockException,
558                            com.liferay.portal.kernel.exception.SystemException;
559    
560            public com.liferay.portal.model.Lock updateImpl(
561                    com.liferay.portal.model.Lock lock)
562                    throws com.liferay.portal.kernel.exception.SystemException;
563    
564            /**
565            * Returns the lock with the primary key or throws a {@link com.liferay.portal.NoSuchLockException} if it could not be found.
566            *
567            * @param lockId the primary key of the lock
568            * @return the lock
569            * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found
570            * @throws SystemException if a system exception occurred
571            */
572            public com.liferay.portal.model.Lock findByPrimaryKey(long lockId)
573                    throws com.liferay.portal.NoSuchLockException,
574                            com.liferay.portal.kernel.exception.SystemException;
575    
576            /**
577            * Returns the lock with the primary key or returns <code>null</code> if it could not be found.
578            *
579            * @param lockId the primary key of the lock
580            * @return the lock, or <code>null</code> if a lock with the primary key could not be found
581            * @throws SystemException if a system exception occurred
582            */
583            public com.liferay.portal.model.Lock fetchByPrimaryKey(long lockId)
584                    throws com.liferay.portal.kernel.exception.SystemException;
585    
586            /**
587            * Returns all the locks.
588            *
589            * @return the locks
590            * @throws SystemException if a system exception occurred
591            */
592            public java.util.List<com.liferay.portal.model.Lock> findAll()
593                    throws com.liferay.portal.kernel.exception.SystemException;
594    
595            /**
596            * Returns a range of all the locks.
597            *
598            * <p>
599            * 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.
600            * </p>
601            *
602            * @param start the lower bound of the range of locks
603            * @param end the upper bound of the range of locks (not inclusive)
604            * @return the range of locks
605            * @throws SystemException if a system exception occurred
606            */
607            public java.util.List<com.liferay.portal.model.Lock> findAll(int start,
608                    int end) throws com.liferay.portal.kernel.exception.SystemException;
609    
610            /**
611            * Returns an ordered range of all the locks.
612            *
613            * <p>
614            * 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.
615            * </p>
616            *
617            * @param start the lower bound of the range of locks
618            * @param end the upper bound of the range of locks (not inclusive)
619            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
620            * @return the ordered range of locks
621            * @throws SystemException if a system exception occurred
622            */
623            public java.util.List<com.liferay.portal.model.Lock> findAll(int start,
624                    int end,
625                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
626                    throws com.liferay.portal.kernel.exception.SystemException;
627    
628            /**
629            * Removes all the locks from the database.
630            *
631            * @throws SystemException if a system exception occurred
632            */
633            public void removeAll()
634                    throws com.liferay.portal.kernel.exception.SystemException;
635    
636            /**
637            * Returns the number of locks.
638            *
639            * @return the number of locks
640            * @throws SystemException if a system exception occurred
641            */
642            public int countAll()
643                    throws com.liferay.portal.kernel.exception.SystemException;
644    }