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