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.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
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#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static Lock remove(Lock lock) throws SystemException {
65          return getPersistence().remove(lock);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
70       */
71      public static Lock update(Lock lock, boolean merge)
72          throws SystemException {
73          return getPersistence().update(lock, merge);
74      }
75  
76      public static void cacheResult(com.liferay.portal.model.Lock lock) {
77          getPersistence().cacheResult(lock);
78      }
79  
80      public static void cacheResult(
81          java.util.List<com.liferay.portal.model.Lock> locks) {
82          getPersistence().cacheResult(locks);
83      }
84  
85      public static com.liferay.portal.model.Lock create(long lockId) {
86          return getPersistence().create(lockId);
87      }
88  
89      public static com.liferay.portal.model.Lock remove(long lockId)
90          throws com.liferay.portal.NoSuchLockException,
91              com.liferay.portal.SystemException {
92          return getPersistence().remove(lockId);
93      }
94  
95      /**
96       * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
97       */
98      public static com.liferay.portal.model.Lock update(
99          com.liferay.portal.model.Lock lock)
100         throws com.liferay.portal.SystemException {
101         return getPersistence().update(lock);
102     }
103 
104     public static com.liferay.portal.model.Lock updateImpl(
105         com.liferay.portal.model.Lock lock, boolean merge)
106         throws com.liferay.portal.SystemException {
107         return getPersistence().updateImpl(lock, merge);
108     }
109 
110     public static com.liferay.portal.model.Lock findByPrimaryKey(long lockId)
111         throws com.liferay.portal.NoSuchLockException,
112             com.liferay.portal.SystemException {
113         return getPersistence().findByPrimaryKey(lockId);
114     }
115 
116     public static com.liferay.portal.model.Lock fetchByPrimaryKey(long lockId)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().fetchByPrimaryKey(lockId);
119     }
120 
121     public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
122         java.lang.String uuid) throws com.liferay.portal.SystemException {
123         return getPersistence().findByUuid(uuid);
124     }
125 
126     public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
127         java.lang.String uuid, int start, int end)
128         throws com.liferay.portal.SystemException {
129         return getPersistence().findByUuid(uuid, start, end);
130     }
131 
132     public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
133         java.lang.String uuid, int start, int end,
134         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135         throws com.liferay.portal.SystemException {
136         return getPersistence().findByUuid(uuid, start, end, orderByComparator);
137     }
138 
139     public static com.liferay.portal.model.Lock findByUuid_First(
140         java.lang.String uuid,
141         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142         throws com.liferay.portal.NoSuchLockException,
143             com.liferay.portal.SystemException {
144         return getPersistence().findByUuid_First(uuid, orderByComparator);
145     }
146 
147     public static com.liferay.portal.model.Lock findByUuid_Last(
148         java.lang.String uuid,
149         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150         throws com.liferay.portal.NoSuchLockException,
151             com.liferay.portal.SystemException {
152         return getPersistence().findByUuid_Last(uuid, orderByComparator);
153     }
154 
155     public static com.liferay.portal.model.Lock[] findByUuid_PrevAndNext(
156         long lockId, java.lang.String uuid,
157         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158         throws com.liferay.portal.NoSuchLockException,
159             com.liferay.portal.SystemException {
160         return getPersistence()
161                    .findByUuid_PrevAndNext(lockId, uuid, orderByComparator);
162     }
163 
164     public static java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
165         java.util.Date expirationDate)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findByExpirationDate(expirationDate);
168     }
169 
170     public static java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
171         java.util.Date expirationDate, int start, int end)
172         throws com.liferay.portal.SystemException {
173         return getPersistence().findByExpirationDate(expirationDate, start, end);
174     }
175 
176     public static java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
177         java.util.Date expirationDate, int start, int end,
178         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
179         throws com.liferay.portal.SystemException {
180         return getPersistence()
181                    .findByExpirationDate(expirationDate, start, end,
182             orderByComparator);
183     }
184 
185     public static com.liferay.portal.model.Lock findByExpirationDate_First(
186         java.util.Date expirationDate,
187         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
188         throws com.liferay.portal.NoSuchLockException,
189             com.liferay.portal.SystemException {
190         return getPersistence()
191                    .findByExpirationDate_First(expirationDate, orderByComparator);
192     }
193 
194     public static com.liferay.portal.model.Lock findByExpirationDate_Last(
195         java.util.Date expirationDate,
196         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
197         throws com.liferay.portal.NoSuchLockException,
198             com.liferay.portal.SystemException {
199         return getPersistence()
200                    .findByExpirationDate_Last(expirationDate, orderByComparator);
201     }
202 
203     public static com.liferay.portal.model.Lock[] findByExpirationDate_PrevAndNext(
204         long lockId, java.util.Date expirationDate,
205         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
206         throws com.liferay.portal.NoSuchLockException,
207             com.liferay.portal.SystemException {
208         return getPersistence()
209                    .findByExpirationDate_PrevAndNext(lockId, expirationDate,
210             orderByComparator);
211     }
212 
213     public static com.liferay.portal.model.Lock findByC_K(
214         java.lang.String className, java.lang.String key)
215         throws com.liferay.portal.NoSuchLockException,
216             com.liferay.portal.SystemException {
217         return getPersistence().findByC_K(className, key);
218     }
219 
220     public static com.liferay.portal.model.Lock fetchByC_K(
221         java.lang.String className, java.lang.String key)
222         throws com.liferay.portal.SystemException {
223         return getPersistence().fetchByC_K(className, key);
224     }
225 
226     public static com.liferay.portal.model.Lock fetchByC_K(
227         java.lang.String className, java.lang.String key,
228         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
229         return getPersistence().fetchByC_K(className, key, retrieveFromCache);
230     }
231 
232     public static java.util.List<com.liferay.portal.model.Lock> findAll()
233         throws com.liferay.portal.SystemException {
234         return getPersistence().findAll();
235     }
236 
237     public static java.util.List<com.liferay.portal.model.Lock> findAll(
238         int start, int end) throws com.liferay.portal.SystemException {
239         return getPersistence().findAll(start, end);
240     }
241 
242     public static java.util.List<com.liferay.portal.model.Lock> findAll(
243         int start, int end,
244         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
245         throws com.liferay.portal.SystemException {
246         return getPersistence().findAll(start, end, orderByComparator);
247     }
248 
249     public static void removeByUuid(java.lang.String uuid)
250         throws com.liferay.portal.SystemException {
251         getPersistence().removeByUuid(uuid);
252     }
253 
254     public static void removeByExpirationDate(java.util.Date expirationDate)
255         throws com.liferay.portal.SystemException {
256         getPersistence().removeByExpirationDate(expirationDate);
257     }
258 
259     public static void removeByC_K(java.lang.String className,
260         java.lang.String key)
261         throws com.liferay.portal.NoSuchLockException,
262             com.liferay.portal.SystemException {
263         getPersistence().removeByC_K(className, key);
264     }
265 
266     public static void removeAll() throws com.liferay.portal.SystemException {
267         getPersistence().removeAll();
268     }
269 
270     public static int countByUuid(java.lang.String uuid)
271         throws com.liferay.portal.SystemException {
272         return getPersistence().countByUuid(uuid);
273     }
274 
275     public static int countByExpirationDate(java.util.Date expirationDate)
276         throws com.liferay.portal.SystemException {
277         return getPersistence().countByExpirationDate(expirationDate);
278     }
279 
280     public static int countByC_K(java.lang.String className,
281         java.lang.String key) throws com.liferay.portal.SystemException {
282         return getPersistence().countByC_K(className, key);
283     }
284 
285     public static int countAll() throws com.liferay.portal.SystemException {
286         return getPersistence().countAll();
287     }
288 
289     public static LockPersistence getPersistence() {
290         if (_persistence == null) {
291             _persistence = (LockPersistence)PortalBeanLocatorUtil.locate(LockPersistence.class.getName());
292         }
293 
294         return _persistence;
295     }
296 
297     public void setPersistence(LockPersistence persistence) {
298         _persistence = persistence;
299     }
300 
301     private static LockPersistence _persistence;
302 }