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