1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.Lock;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="LockUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       LockPersistence
34   * @see       LockPersistenceImpl
35   * @generated
36   */
37  public class LockUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(Lock)
47       */
48      public static void clearCache(Lock lock) {
49          getPersistence().clearCache(lock);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<Lock> findWithDynamicQuery(DynamicQuery dynamicQuery)
64          throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<Lock> findWithDynamicQuery(DynamicQuery dynamicQuery,
72          int start, int end) throws SystemException {
73          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
74      }
75  
76      /**
77       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
78       */
79      public static Lock remove(Lock lock) throws SystemException {
80          return getPersistence().remove(lock);
81      }
82  
83      /**
84       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
85       */
86      public static Lock update(Lock lock, boolean merge)
87          throws SystemException {
88          return getPersistence().update(lock, merge);
89      }
90  
91      public static void cacheResult(com.liferay.portal.model.Lock lock) {
92          getPersistence().cacheResult(lock);
93      }
94  
95      public static void cacheResult(
96          java.util.List<com.liferay.portal.model.Lock> locks) {
97          getPersistence().cacheResult(locks);
98      }
99  
100     public static com.liferay.portal.model.Lock create(long lockId) {
101         return getPersistence().create(lockId);
102     }
103 
104     public static com.liferay.portal.model.Lock remove(long lockId)
105         throws com.liferay.portal.NoSuchLockException,
106             com.liferay.portal.kernel.exception.SystemException {
107         return getPersistence().remove(lockId);
108     }
109 
110     public static com.liferay.portal.model.Lock updateImpl(
111         com.liferay.portal.model.Lock lock, boolean merge)
112         throws com.liferay.portal.kernel.exception.SystemException {
113         return getPersistence().updateImpl(lock, merge);
114     }
115 
116     public static com.liferay.portal.model.Lock findByPrimaryKey(long lockId)
117         throws com.liferay.portal.NoSuchLockException,
118             com.liferay.portal.kernel.exception.SystemException {
119         return getPersistence().findByPrimaryKey(lockId);
120     }
121 
122     public static com.liferay.portal.model.Lock fetchByPrimaryKey(long lockId)
123         throws com.liferay.portal.kernel.exception.SystemException {
124         return getPersistence().fetchByPrimaryKey(lockId);
125     }
126 
127     public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
128         java.lang.String uuid)
129         throws com.liferay.portal.kernel.exception.SystemException {
130         return getPersistence().findByUuid(uuid);
131     }
132 
133     public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
134         java.lang.String uuid, int start, int end)
135         throws com.liferay.portal.kernel.exception.SystemException {
136         return getPersistence().findByUuid(uuid, start, end);
137     }
138 
139     public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
140         java.lang.String uuid, int start, int end,
141         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142         throws com.liferay.portal.kernel.exception.SystemException {
143         return getPersistence().findByUuid(uuid, start, end, orderByComparator);
144     }
145 
146     public static com.liferay.portal.model.Lock findByUuid_First(
147         java.lang.String uuid,
148         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149         throws com.liferay.portal.NoSuchLockException,
150             com.liferay.portal.kernel.exception.SystemException {
151         return getPersistence().findByUuid_First(uuid, orderByComparator);
152     }
153 
154     public static com.liferay.portal.model.Lock findByUuid_Last(
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         return getPersistence().findByUuid_Last(uuid, orderByComparator);
160     }
161 
162     public static com.liferay.portal.model.Lock[] findByUuid_PrevAndNext(
163         long lockId, java.lang.String uuid,
164         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165         throws com.liferay.portal.NoSuchLockException,
166             com.liferay.portal.kernel.exception.SystemException {
167         return getPersistence()
168                    .findByUuid_PrevAndNext(lockId, uuid, orderByComparator);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
172         java.util.Date expirationDate)
173         throws com.liferay.portal.kernel.exception.SystemException {
174         return getPersistence().findByExpirationDate(expirationDate);
175     }
176 
177     public static java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
178         java.util.Date expirationDate, int start, int end)
179         throws com.liferay.portal.kernel.exception.SystemException {
180         return getPersistence().findByExpirationDate(expirationDate, start, end);
181     }
182 
183     public static java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
184         java.util.Date expirationDate, int start, int end,
185         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
186         throws com.liferay.portal.kernel.exception.SystemException {
187         return getPersistence()
188                    .findByExpirationDate(expirationDate, start, end,
189             orderByComparator);
190     }
191 
192     public static com.liferay.portal.model.Lock findByExpirationDate_First(
193         java.util.Date expirationDate,
194         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195         throws com.liferay.portal.NoSuchLockException,
196             com.liferay.portal.kernel.exception.SystemException {
197         return getPersistence()
198                    .findByExpirationDate_First(expirationDate, orderByComparator);
199     }
200 
201     public static com.liferay.portal.model.Lock findByExpirationDate_Last(
202         java.util.Date expirationDate,
203         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204         throws com.liferay.portal.NoSuchLockException,
205             com.liferay.portal.kernel.exception.SystemException {
206         return getPersistence()
207                    .findByExpirationDate_Last(expirationDate, orderByComparator);
208     }
209 
210     public static com.liferay.portal.model.Lock[] findByExpirationDate_PrevAndNext(
211         long lockId, java.util.Date expirationDate,
212         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
213         throws com.liferay.portal.NoSuchLockException,
214             com.liferay.portal.kernel.exception.SystemException {
215         return getPersistence()
216                    .findByExpirationDate_PrevAndNext(lockId, expirationDate,
217             orderByComparator);
218     }
219 
220     public static com.liferay.portal.model.Lock findByC_K(
221         java.lang.String className, java.lang.String key)
222         throws com.liferay.portal.NoSuchLockException,
223             com.liferay.portal.kernel.exception.SystemException {
224         return getPersistence().findByC_K(className, key);
225     }
226 
227     public static com.liferay.portal.model.Lock fetchByC_K(
228         java.lang.String className, java.lang.String key)
229         throws com.liferay.portal.kernel.exception.SystemException {
230         return getPersistence().fetchByC_K(className, key);
231     }
232 
233     public static com.liferay.portal.model.Lock fetchByC_K(
234         java.lang.String className, java.lang.String key,
235         boolean retrieveFromCache)
236         throws com.liferay.portal.kernel.exception.SystemException {
237         return getPersistence().fetchByC_K(className, key, retrieveFromCache);
238     }
239 
240     public static java.util.List<com.liferay.portal.model.Lock> findAll()
241         throws com.liferay.portal.kernel.exception.SystemException {
242         return getPersistence().findAll();
243     }
244 
245     public static java.util.List<com.liferay.portal.model.Lock> findAll(
246         int start, int end)
247         throws com.liferay.portal.kernel.exception.SystemException {
248         return getPersistence().findAll(start, end);
249     }
250 
251     public static java.util.List<com.liferay.portal.model.Lock> findAll(
252         int start, int end,
253         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
254         throws com.liferay.portal.kernel.exception.SystemException {
255         return getPersistence().findAll(start, end, orderByComparator);
256     }
257 
258     public static void removeByUuid(java.lang.String uuid)
259         throws com.liferay.portal.kernel.exception.SystemException {
260         getPersistence().removeByUuid(uuid);
261     }
262 
263     public static void removeByExpirationDate(java.util.Date expirationDate)
264         throws com.liferay.portal.kernel.exception.SystemException {
265         getPersistence().removeByExpirationDate(expirationDate);
266     }
267 
268     public static void removeByC_K(java.lang.String className,
269         java.lang.String key)
270         throws com.liferay.portal.NoSuchLockException,
271             com.liferay.portal.kernel.exception.SystemException {
272         getPersistence().removeByC_K(className, key);
273     }
274 
275     public static void removeAll()
276         throws com.liferay.portal.kernel.exception.SystemException {
277         getPersistence().removeAll();
278     }
279 
280     public static int countByUuid(java.lang.String uuid)
281         throws com.liferay.portal.kernel.exception.SystemException {
282         return getPersistence().countByUuid(uuid);
283     }
284 
285     public static int countByExpirationDate(java.util.Date expirationDate)
286         throws com.liferay.portal.kernel.exception.SystemException {
287         return getPersistence().countByExpirationDate(expirationDate);
288     }
289 
290     public static int countByC_K(java.lang.String className,
291         java.lang.String key)
292         throws com.liferay.portal.kernel.exception.SystemException {
293         return getPersistence().countByC_K(className, key);
294     }
295 
296     public static int countAll()
297         throws com.liferay.portal.kernel.exception.SystemException {
298         return getPersistence().countAll();
299     }
300 
301     public static LockPersistence getPersistence() {
302         if (_persistence == null) {
303             _persistence = (LockPersistence)PortalBeanLocatorUtil.locate(LockPersistence.class.getName());
304         }
305 
306         return _persistence;
307     }
308 
309     public void setPersistence(LockPersistence persistence) {
310         _persistence = persistence;
311     }
312 
313     private static LockPersistence _persistence;
314 }