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