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.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.Lock;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the lock service. This utility wraps {@link LockPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see LockPersistence
036     * @see LockPersistenceImpl
037     * @generated
038     */
039    public class LockUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(Lock lock) {
057                    getPersistence().clearCache(lock);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<Lock> findWithDynamicQuery(DynamicQuery dynamicQuery)
072                    throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<Lock> findWithDynamicQuery(DynamicQuery dynamicQuery,
080                    int start, int end) throws SystemException {
081                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
082            }
083    
084            /**
085             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
086             */
087            public static List<Lock> findWithDynamicQuery(DynamicQuery dynamicQuery,
088                    int start, int end, OrderByComparator orderByComparator)
089                    throws SystemException {
090                    return getPersistence()
091                                       .findWithDynamicQuery(dynamicQuery, start, end,
092                            orderByComparator);
093            }
094    
095            /**
096             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
097             */
098            public static Lock update(Lock lock) throws SystemException {
099                    return getPersistence().update(lock);
100            }
101    
102            /**
103             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
104             */
105            public static Lock update(Lock lock, ServiceContext serviceContext)
106                    throws SystemException {
107                    return getPersistence().update(lock, serviceContext);
108            }
109    
110            /**
111            * Returns all the locks where uuid = &#63;.
112            *
113            * @param uuid the uuid
114            * @return the matching locks
115            * @throws SystemException if a system exception occurred
116            */
117            public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
118                    java.lang.String uuid)
119                    throws com.liferay.portal.kernel.exception.SystemException {
120                    return getPersistence().findByUuid(uuid);
121            }
122    
123            /**
124            * Returns a range of all the locks where uuid = &#63;.
125            *
126            * <p>
127            * 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.
128            * </p>
129            *
130            * @param uuid the uuid
131            * @param start the lower bound of the range of locks
132            * @param end the upper bound of the range of locks (not inclusive)
133            * @return the range of matching locks
134            * @throws SystemException if a system exception occurred
135            */
136            public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
137                    java.lang.String uuid, int start, int end)
138                    throws com.liferay.portal.kernel.exception.SystemException {
139                    return getPersistence().findByUuid(uuid, start, end);
140            }
141    
142            /**
143            * Returns an ordered range of all the locks where uuid = &#63;.
144            *
145            * <p>
146            * 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.
147            * </p>
148            *
149            * @param uuid the uuid
150            * @param start the lower bound of the range of locks
151            * @param end the upper bound of the range of locks (not inclusive)
152            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
153            * @return the ordered range of matching locks
154            * @throws SystemException if a system exception occurred
155            */
156            public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
157                    java.lang.String uuid, int start, int end,
158                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159                    throws com.liferay.portal.kernel.exception.SystemException {
160                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
161            }
162    
163            /**
164            * Returns the first lock in the ordered set where uuid = &#63;.
165            *
166            * @param uuid the uuid
167            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
168            * @return the first matching lock
169            * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public static com.liferay.portal.model.Lock findByUuid_First(
173                    java.lang.String uuid,
174                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175                    throws com.liferay.portal.NoSuchLockException,
176                            com.liferay.portal.kernel.exception.SystemException {
177                    return getPersistence().findByUuid_First(uuid, orderByComparator);
178            }
179    
180            /**
181            * Returns the first lock in the ordered set where uuid = &#63;.
182            *
183            * @param uuid the uuid
184            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
185            * @return the first matching lock, or <code>null</code> if a matching lock could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            public static com.liferay.portal.model.Lock fetchByUuid_First(
189                    java.lang.String uuid,
190                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
191                    throws com.liferay.portal.kernel.exception.SystemException {
192                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
193            }
194    
195            /**
196            * Returns the last lock in the ordered set where uuid = &#63;.
197            *
198            * @param uuid the uuid
199            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
200            * @return the last matching lock
201            * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found
202            * @throws SystemException if a system exception occurred
203            */
204            public static com.liferay.portal.model.Lock findByUuid_Last(
205                    java.lang.String uuid,
206                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207                    throws com.liferay.portal.NoSuchLockException,
208                            com.liferay.portal.kernel.exception.SystemException {
209                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
210            }
211    
212            /**
213            * Returns the last lock in the ordered set where uuid = &#63;.
214            *
215            * @param uuid the uuid
216            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
217            * @return the last matching lock, or <code>null</code> if a matching lock could not be found
218            * @throws SystemException if a system exception occurred
219            */
220            public static com.liferay.portal.model.Lock fetchByUuid_Last(
221                    java.lang.String uuid,
222                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
223                    throws com.liferay.portal.kernel.exception.SystemException {
224                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
225            }
226    
227            /**
228            * Returns the locks before and after the current lock in the ordered set where uuid = &#63;.
229            *
230            * @param lockId the primary key of the current lock
231            * @param uuid the uuid
232            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
233            * @return the previous, current, and next lock
234            * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found
235            * @throws SystemException if a system exception occurred
236            */
237            public static com.liferay.portal.model.Lock[] findByUuid_PrevAndNext(
238                    long lockId, java.lang.String uuid,
239                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
240                    throws com.liferay.portal.NoSuchLockException,
241                            com.liferay.portal.kernel.exception.SystemException {
242                    return getPersistence()
243                                       .findByUuid_PrevAndNext(lockId, uuid, orderByComparator);
244            }
245    
246            /**
247            * Removes all the locks where uuid = &#63; from the database.
248            *
249            * @param uuid the uuid
250            * @throws SystemException if a system exception occurred
251            */
252            public static void removeByUuid(java.lang.String uuid)
253                    throws com.liferay.portal.kernel.exception.SystemException {
254                    getPersistence().removeByUuid(uuid);
255            }
256    
257            /**
258            * Returns the number of locks where uuid = &#63;.
259            *
260            * @param uuid the uuid
261            * @return the number of matching locks
262            * @throws SystemException if a system exception occurred
263            */
264            public static int countByUuid(java.lang.String uuid)
265                    throws com.liferay.portal.kernel.exception.SystemException {
266                    return getPersistence().countByUuid(uuid);
267            }
268    
269            /**
270            * Returns all the locks where uuid = &#63; and companyId = &#63;.
271            *
272            * @param uuid the uuid
273            * @param companyId the company ID
274            * @return the matching locks
275            * @throws SystemException if a system exception occurred
276            */
277            public static java.util.List<com.liferay.portal.model.Lock> findByUuid_C(
278                    java.lang.String uuid, long companyId)
279                    throws com.liferay.portal.kernel.exception.SystemException {
280                    return getPersistence().findByUuid_C(uuid, companyId);
281            }
282    
283            /**
284            * Returns a range of all the locks where uuid = &#63; and companyId = &#63;.
285            *
286            * <p>
287            * 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.
288            * </p>
289            *
290            * @param uuid the uuid
291            * @param companyId the company ID
292            * @param start the lower bound of the range of locks
293            * @param end the upper bound of the range of locks (not inclusive)
294            * @return the range of matching locks
295            * @throws SystemException if a system exception occurred
296            */
297            public static java.util.List<com.liferay.portal.model.Lock> findByUuid_C(
298                    java.lang.String uuid, long companyId, int start, int end)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
301            }
302    
303            /**
304            * Returns an ordered range of all the locks where uuid = &#63; and companyId = &#63;.
305            *
306            * <p>
307            * 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.
308            * </p>
309            *
310            * @param uuid the uuid
311            * @param companyId the company ID
312            * @param start the lower bound of the range of locks
313            * @param end the upper bound of the range of locks (not inclusive)
314            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
315            * @return the ordered range of matching locks
316            * @throws SystemException if a system exception occurred
317            */
318            public static java.util.List<com.liferay.portal.model.Lock> findByUuid_C(
319                    java.lang.String uuid, long companyId, int start, int end,
320                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
321                    throws com.liferay.portal.kernel.exception.SystemException {
322                    return getPersistence()
323                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
324            }
325    
326            /**
327            * Returns the first lock in the ordered set where uuid = &#63; and companyId = &#63;.
328            *
329            * @param uuid the uuid
330            * @param companyId the company ID
331            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
332            * @return the first matching lock
333            * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found
334            * @throws SystemException if a system exception occurred
335            */
336            public static com.liferay.portal.model.Lock findByUuid_C_First(
337                    java.lang.String uuid, long companyId,
338                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
339                    throws com.liferay.portal.NoSuchLockException,
340                            com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence()
342                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
343            }
344    
345            /**
346            * Returns the first lock in the ordered set where uuid = &#63; and companyId = &#63;.
347            *
348            * @param uuid the uuid
349            * @param companyId the company ID
350            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
351            * @return the first matching lock, or <code>null</code> if a matching lock could not be found
352            * @throws SystemException if a system exception occurred
353            */
354            public static com.liferay.portal.model.Lock fetchByUuid_C_First(
355                    java.lang.String uuid, long companyId,
356                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
357                    throws com.liferay.portal.kernel.exception.SystemException {
358                    return getPersistence()
359                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
360            }
361    
362            /**
363            * Returns the last lock in the ordered set where uuid = &#63; and companyId = &#63;.
364            *
365            * @param uuid the uuid
366            * @param companyId the company ID
367            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
368            * @return the last matching lock
369            * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found
370            * @throws SystemException if a system exception occurred
371            */
372            public static com.liferay.portal.model.Lock findByUuid_C_Last(
373                    java.lang.String uuid, long companyId,
374                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
375                    throws com.liferay.portal.NoSuchLockException,
376                            com.liferay.portal.kernel.exception.SystemException {
377                    return getPersistence()
378                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
379            }
380    
381            /**
382            * Returns the last lock in the ordered set where uuid = &#63; and companyId = &#63;.
383            *
384            * @param uuid the uuid
385            * @param companyId the company ID
386            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
387            * @return the last matching lock, or <code>null</code> if a matching lock could not be found
388            * @throws SystemException if a system exception occurred
389            */
390            public static com.liferay.portal.model.Lock fetchByUuid_C_Last(
391                    java.lang.String uuid, long companyId,
392                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
393                    throws com.liferay.portal.kernel.exception.SystemException {
394                    return getPersistence()
395                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
396            }
397    
398            /**
399            * Returns the locks before and after the current lock in the ordered set where uuid = &#63; and companyId = &#63;.
400            *
401            * @param lockId the primary key of the current lock
402            * @param uuid the uuid
403            * @param companyId the company ID
404            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
405            * @return the previous, current, and next lock
406            * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found
407            * @throws SystemException if a system exception occurred
408            */
409            public static com.liferay.portal.model.Lock[] findByUuid_C_PrevAndNext(
410                    long lockId, java.lang.String uuid, long companyId,
411                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
412                    throws com.liferay.portal.NoSuchLockException,
413                            com.liferay.portal.kernel.exception.SystemException {
414                    return getPersistence()
415                                       .findByUuid_C_PrevAndNext(lockId, uuid, companyId,
416                            orderByComparator);
417            }
418    
419            /**
420            * Removes all the locks where uuid = &#63; and companyId = &#63; from the database.
421            *
422            * @param uuid the uuid
423            * @param companyId the company ID
424            * @throws SystemException if a system exception occurred
425            */
426            public static void removeByUuid_C(java.lang.String uuid, long companyId)
427                    throws com.liferay.portal.kernel.exception.SystemException {
428                    getPersistence().removeByUuid_C(uuid, companyId);
429            }
430    
431            /**
432            * Returns the number of locks where uuid = &#63; and companyId = &#63;.
433            *
434            * @param uuid the uuid
435            * @param companyId the company ID
436            * @return the number of matching locks
437            * @throws SystemException if a system exception occurred
438            */
439            public static int countByUuid_C(java.lang.String uuid, long companyId)
440                    throws com.liferay.portal.kernel.exception.SystemException {
441                    return getPersistence().countByUuid_C(uuid, companyId);
442            }
443    
444            /**
445            * Returns all the locks where expirationDate &lt; &#63;.
446            *
447            * @param expirationDate the expiration date
448            * @return the matching locks
449            * @throws SystemException if a system exception occurred
450            */
451            public static java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate(
452                    java.util.Date expirationDate)
453                    throws com.liferay.portal.kernel.exception.SystemException {
454                    return getPersistence().findByLtExpirationDate(expirationDate);
455            }
456    
457            /**
458            * Returns a range of all the locks where expirationDate &lt; &#63;.
459            *
460            * <p>
461            * 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.
462            * </p>
463            *
464            * @param expirationDate the expiration date
465            * @param start the lower bound of the range of locks
466            * @param end the upper bound of the range of locks (not inclusive)
467            * @return the range of matching locks
468            * @throws SystemException if a system exception occurred
469            */
470            public static java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate(
471                    java.util.Date expirationDate, int start, int end)
472                    throws com.liferay.portal.kernel.exception.SystemException {
473                    return getPersistence()
474                                       .findByLtExpirationDate(expirationDate, start, end);
475            }
476    
477            /**
478            * Returns an ordered range of all the locks where expirationDate &lt; &#63;.
479            *
480            * <p>
481            * 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.
482            * </p>
483            *
484            * @param expirationDate the expiration date
485            * @param start the lower bound of the range of locks
486            * @param end the upper bound of the range of locks (not inclusive)
487            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
488            * @return the ordered range of matching locks
489            * @throws SystemException if a system exception occurred
490            */
491            public static java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate(
492                    java.util.Date expirationDate, int start, int end,
493                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
494                    throws com.liferay.portal.kernel.exception.SystemException {
495                    return getPersistence()
496                                       .findByLtExpirationDate(expirationDate, start, end,
497                            orderByComparator);
498            }
499    
500            /**
501            * Returns the first lock in the ordered set where expirationDate &lt; &#63;.
502            *
503            * @param expirationDate the expiration date
504            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
505            * @return the first matching lock
506            * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found
507            * @throws SystemException if a system exception occurred
508            */
509            public static com.liferay.portal.model.Lock findByLtExpirationDate_First(
510                    java.util.Date expirationDate,
511                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
512                    throws com.liferay.portal.NoSuchLockException,
513                            com.liferay.portal.kernel.exception.SystemException {
514                    return getPersistence()
515                                       .findByLtExpirationDate_First(expirationDate,
516                            orderByComparator);
517            }
518    
519            /**
520            * Returns the first lock in the ordered set where expirationDate &lt; &#63;.
521            *
522            * @param expirationDate the expiration date
523            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
524            * @return the first 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 static com.liferay.portal.model.Lock fetchByLtExpirationDate_First(
528                    java.util.Date expirationDate,
529                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    return getPersistence()
532                                       .fetchByLtExpirationDate_First(expirationDate,
533                            orderByComparator);
534            }
535    
536            /**
537            * Returns the last lock in the ordered set where expirationDate &lt; &#63;.
538            *
539            * @param expirationDate the expiration date
540            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
541            * @return the last matching lock
542            * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found
543            * @throws SystemException if a system exception occurred
544            */
545            public static com.liferay.portal.model.Lock findByLtExpirationDate_Last(
546                    java.util.Date expirationDate,
547                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
548                    throws com.liferay.portal.NoSuchLockException,
549                            com.liferay.portal.kernel.exception.SystemException {
550                    return getPersistence()
551                                       .findByLtExpirationDate_Last(expirationDate,
552                            orderByComparator);
553            }
554    
555            /**
556            * Returns the last lock in the ordered set where expirationDate &lt; &#63;.
557            *
558            * @param expirationDate the expiration date
559            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
560            * @return the last matching lock, or <code>null</code> if a matching lock could not be found
561            * @throws SystemException if a system exception occurred
562            */
563            public static com.liferay.portal.model.Lock fetchByLtExpirationDate_Last(
564                    java.util.Date expirationDate,
565                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
566                    throws com.liferay.portal.kernel.exception.SystemException {
567                    return getPersistence()
568                                       .fetchByLtExpirationDate_Last(expirationDate,
569                            orderByComparator);
570            }
571    
572            /**
573            * Returns the locks before and after the current lock in the ordered set where expirationDate &lt; &#63;.
574            *
575            * @param lockId the primary key of the current lock
576            * @param expirationDate the expiration date
577            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
578            * @return the previous, current, and next lock
579            * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found
580            * @throws SystemException if a system exception occurred
581            */
582            public static com.liferay.portal.model.Lock[] findByLtExpirationDate_PrevAndNext(
583                    long lockId, java.util.Date expirationDate,
584                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
585                    throws com.liferay.portal.NoSuchLockException,
586                            com.liferay.portal.kernel.exception.SystemException {
587                    return getPersistence()
588                                       .findByLtExpirationDate_PrevAndNext(lockId, expirationDate,
589                            orderByComparator);
590            }
591    
592            /**
593            * Removes all the locks where expirationDate &lt; &#63; from the database.
594            *
595            * @param expirationDate the expiration date
596            * @throws SystemException if a system exception occurred
597            */
598            public static void removeByLtExpirationDate(java.util.Date expirationDate)
599                    throws com.liferay.portal.kernel.exception.SystemException {
600                    getPersistence().removeByLtExpirationDate(expirationDate);
601            }
602    
603            /**
604            * Returns the number of locks where expirationDate &lt; &#63;.
605            *
606            * @param expirationDate the expiration date
607            * @return the number of matching locks
608            * @throws SystemException if a system exception occurred
609            */
610            public static int countByLtExpirationDate(java.util.Date expirationDate)
611                    throws com.liferay.portal.kernel.exception.SystemException {
612                    return getPersistence().countByLtExpirationDate(expirationDate);
613            }
614    
615            /**
616            * Returns the lock where className = &#63; and key = &#63; or throws a {@link com.liferay.portal.NoSuchLockException} if it could not be found.
617            *
618            * @param className the class name
619            * @param key the key
620            * @return the matching lock
621            * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found
622            * @throws SystemException if a system exception occurred
623            */
624            public static com.liferay.portal.model.Lock findByC_K(
625                    java.lang.String className, java.lang.String key)
626                    throws com.liferay.portal.NoSuchLockException,
627                            com.liferay.portal.kernel.exception.SystemException {
628                    return getPersistence().findByC_K(className, key);
629            }
630    
631            /**
632            * Returns the lock where className = &#63; and key = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
633            *
634            * @param className the class name
635            * @param key the key
636            * @return the matching lock, or <code>null</code> if a matching lock could not be found
637            * @throws SystemException if a system exception occurred
638            */
639            public static com.liferay.portal.model.Lock fetchByC_K(
640                    java.lang.String className, java.lang.String key)
641                    throws com.liferay.portal.kernel.exception.SystemException {
642                    return getPersistence().fetchByC_K(className, key);
643            }
644    
645            /**
646            * 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.
647            *
648            * @param className the class name
649            * @param key the key
650            * @param retrieveFromCache whether to use the finder cache
651            * @return the matching lock, or <code>null</code> if a matching lock could not be found
652            * @throws SystemException if a system exception occurred
653            */
654            public static com.liferay.portal.model.Lock fetchByC_K(
655                    java.lang.String className, java.lang.String key,
656                    boolean retrieveFromCache)
657                    throws com.liferay.portal.kernel.exception.SystemException {
658                    return getPersistence().fetchByC_K(className, key, retrieveFromCache);
659            }
660    
661            /**
662            * Removes the lock where className = &#63; and key = &#63; from the database.
663            *
664            * @param className the class name
665            * @param key the key
666            * @return the lock that was removed
667            * @throws SystemException if a system exception occurred
668            */
669            public static com.liferay.portal.model.Lock removeByC_K(
670                    java.lang.String className, java.lang.String key)
671                    throws com.liferay.portal.NoSuchLockException,
672                            com.liferay.portal.kernel.exception.SystemException {
673                    return getPersistence().removeByC_K(className, key);
674            }
675    
676            /**
677            * Returns the number of locks where className = &#63; and key = &#63;.
678            *
679            * @param className the class name
680            * @param key the key
681            * @return the number of matching locks
682            * @throws SystemException if a system exception occurred
683            */
684            public static int countByC_K(java.lang.String className,
685                    java.lang.String key)
686                    throws com.liferay.portal.kernel.exception.SystemException {
687                    return getPersistence().countByC_K(className, key);
688            }
689    
690            /**
691            * 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.
692            *
693            * @param className the class name
694            * @param key the key
695            * @param owner the owner
696            * @return the matching lock
697            * @throws com.liferay.portal.NoSuchLockException if a matching lock could not be found
698            * @throws SystemException if a system exception occurred
699            */
700            public static com.liferay.portal.model.Lock findByC_K_O(
701                    java.lang.String className, java.lang.String key, java.lang.String owner)
702                    throws com.liferay.portal.NoSuchLockException,
703                            com.liferay.portal.kernel.exception.SystemException {
704                    return getPersistence().findByC_K_O(className, key, owner);
705            }
706    
707            /**
708            * 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.
709            *
710            * @param className the class name
711            * @param key the key
712            * @param owner the owner
713            * @return the matching lock, or <code>null</code> if a matching lock could not be found
714            * @throws SystemException if a system exception occurred
715            */
716            public static com.liferay.portal.model.Lock fetchByC_K_O(
717                    java.lang.String className, java.lang.String key, java.lang.String owner)
718                    throws com.liferay.portal.kernel.exception.SystemException {
719                    return getPersistence().fetchByC_K_O(className, key, owner);
720            }
721    
722            /**
723            * 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.
724            *
725            * @param className the class name
726            * @param key the key
727            * @param owner the owner
728            * @param retrieveFromCache whether to use the finder cache
729            * @return the matching lock, or <code>null</code> if a matching lock could not be found
730            * @throws SystemException if a system exception occurred
731            */
732            public static com.liferay.portal.model.Lock fetchByC_K_O(
733                    java.lang.String className, java.lang.String key,
734                    java.lang.String owner, boolean retrieveFromCache)
735                    throws com.liferay.portal.kernel.exception.SystemException {
736                    return getPersistence()
737                                       .fetchByC_K_O(className, key, owner, retrieveFromCache);
738            }
739    
740            /**
741            * Removes the lock where className = &#63; and key = &#63; and owner = &#63; from the database.
742            *
743            * @param className the class name
744            * @param key the key
745            * @param owner the owner
746            * @return the lock that was removed
747            * @throws SystemException if a system exception occurred
748            */
749            public static com.liferay.portal.model.Lock removeByC_K_O(
750                    java.lang.String className, java.lang.String key, java.lang.String owner)
751                    throws com.liferay.portal.NoSuchLockException,
752                            com.liferay.portal.kernel.exception.SystemException {
753                    return getPersistence().removeByC_K_O(className, key, owner);
754            }
755    
756            /**
757            * Returns the number of locks where className = &#63; and key = &#63; and owner = &#63;.
758            *
759            * @param className the class name
760            * @param key the key
761            * @param owner the owner
762            * @return the number of matching locks
763            * @throws SystemException if a system exception occurred
764            */
765            public static int countByC_K_O(java.lang.String className,
766                    java.lang.String key, java.lang.String owner)
767                    throws com.liferay.portal.kernel.exception.SystemException {
768                    return getPersistence().countByC_K_O(className, key, owner);
769            }
770    
771            /**
772            * Caches the lock in the entity cache if it is enabled.
773            *
774            * @param lock the lock
775            */
776            public static void cacheResult(com.liferay.portal.model.Lock lock) {
777                    getPersistence().cacheResult(lock);
778            }
779    
780            /**
781            * Caches the locks in the entity cache if it is enabled.
782            *
783            * @param locks the locks
784            */
785            public static void cacheResult(
786                    java.util.List<com.liferay.portal.model.Lock> locks) {
787                    getPersistence().cacheResult(locks);
788            }
789    
790            /**
791            * Creates a new lock with the primary key. Does not add the lock to the database.
792            *
793            * @param lockId the primary key for the new lock
794            * @return the new lock
795            */
796            public static com.liferay.portal.model.Lock create(long lockId) {
797                    return getPersistence().create(lockId);
798            }
799    
800            /**
801            * Removes the lock with the primary key from the database. Also notifies the appropriate model listeners.
802            *
803            * @param lockId the primary key of the lock
804            * @return the lock that was removed
805            * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found
806            * @throws SystemException if a system exception occurred
807            */
808            public static com.liferay.portal.model.Lock remove(long lockId)
809                    throws com.liferay.portal.NoSuchLockException,
810                            com.liferay.portal.kernel.exception.SystemException {
811                    return getPersistence().remove(lockId);
812            }
813    
814            public static com.liferay.portal.model.Lock updateImpl(
815                    com.liferay.portal.model.Lock lock)
816                    throws com.liferay.portal.kernel.exception.SystemException {
817                    return getPersistence().updateImpl(lock);
818            }
819    
820            /**
821            * Returns the lock with the primary key or throws a {@link com.liferay.portal.NoSuchLockException} if it could not be found.
822            *
823            * @param lockId the primary key of the lock
824            * @return the lock
825            * @throws com.liferay.portal.NoSuchLockException if a lock with the primary key could not be found
826            * @throws SystemException if a system exception occurred
827            */
828            public static com.liferay.portal.model.Lock findByPrimaryKey(long lockId)
829                    throws com.liferay.portal.NoSuchLockException,
830                            com.liferay.portal.kernel.exception.SystemException {
831                    return getPersistence().findByPrimaryKey(lockId);
832            }
833    
834            /**
835            * Returns the lock with the primary key or returns <code>null</code> if it could not be found.
836            *
837            * @param lockId the primary key of the lock
838            * @return the lock, or <code>null</code> if a lock with the primary key could not be found
839            * @throws SystemException if a system exception occurred
840            */
841            public static com.liferay.portal.model.Lock fetchByPrimaryKey(long lockId)
842                    throws com.liferay.portal.kernel.exception.SystemException {
843                    return getPersistence().fetchByPrimaryKey(lockId);
844            }
845    
846            /**
847            * Returns all the locks.
848            *
849            * @return the locks
850            * @throws SystemException if a system exception occurred
851            */
852            public static java.util.List<com.liferay.portal.model.Lock> findAll()
853                    throws com.liferay.portal.kernel.exception.SystemException {
854                    return getPersistence().findAll();
855            }
856    
857            /**
858            * Returns a range of all the locks.
859            *
860            * <p>
861            * 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.
862            * </p>
863            *
864            * @param start the lower bound of the range of locks
865            * @param end the upper bound of the range of locks (not inclusive)
866            * @return the range of locks
867            * @throws SystemException if a system exception occurred
868            */
869            public static java.util.List<com.liferay.portal.model.Lock> findAll(
870                    int start, int end)
871                    throws com.liferay.portal.kernel.exception.SystemException {
872                    return getPersistence().findAll(start, end);
873            }
874    
875            /**
876            * Returns an ordered range of all the locks.
877            *
878            * <p>
879            * 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.
880            * </p>
881            *
882            * @param start the lower bound of the range of locks
883            * @param end the upper bound of the range of locks (not inclusive)
884            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
885            * @return the ordered range of locks
886            * @throws SystemException if a system exception occurred
887            */
888            public static java.util.List<com.liferay.portal.model.Lock> findAll(
889                    int start, int end,
890                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
891                    throws com.liferay.portal.kernel.exception.SystemException {
892                    return getPersistence().findAll(start, end, orderByComparator);
893            }
894    
895            /**
896            * Removes all the locks from the database.
897            *
898            * @throws SystemException if a system exception occurred
899            */
900            public static void removeAll()
901                    throws com.liferay.portal.kernel.exception.SystemException {
902                    getPersistence().removeAll();
903            }
904    
905            /**
906            * Returns the number of locks.
907            *
908            * @return the number of locks
909            * @throws SystemException if a system exception occurred
910            */
911            public static int countAll()
912                    throws com.liferay.portal.kernel.exception.SystemException {
913                    return getPersistence().countAll();
914            }
915    
916            public static LockPersistence getPersistence() {
917                    if (_persistence == null) {
918                            _persistence = (LockPersistence)PortalBeanLocatorUtil.locate(LockPersistence.class.getName());
919    
920                            ReferenceRegistry.registerReference(LockUtil.class, "_persistence");
921                    }
922    
923                    return _persistence;
924            }
925    
926            /**
927             * @deprecated
928             */
929            public void setPersistence(LockPersistence persistence) {
930            }
931    
932            private static LockPersistence _persistence;
933    }