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