1
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
37 public class LockUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49 throws SystemException {
50 return getPersistence().findWithDynamicQuery(dynamicQuery);
51 }
52
53
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
64 public static Lock remove(Lock lock) throws SystemException {
65 return getPersistence().remove(lock);
66 }
67
68
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
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 obc)
135 throws com.liferay.portal.SystemException {
136 return getPersistence().findByUuid(uuid, start, end, obc);
137 }
138
139 public static com.liferay.portal.model.Lock findByUuid_First(
140 java.lang.String uuid,
141 com.liferay.portal.kernel.util.OrderByComparator obc)
142 throws com.liferay.portal.NoSuchLockException,
143 com.liferay.portal.SystemException {
144 return getPersistence().findByUuid_First(uuid, obc);
145 }
146
147 public static com.liferay.portal.model.Lock findByUuid_Last(
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_Last(uuid, obc);
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 obc)
158 throws com.liferay.portal.NoSuchLockException,
159 com.liferay.portal.SystemException {
160 return getPersistence().findByUuid_PrevAndNext(lockId, uuid, obc);
161 }
162
163 public static java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
164 java.util.Date expirationDate)
165 throws com.liferay.portal.SystemException {
166 return getPersistence().findByExpirationDate(expirationDate);
167 }
168
169 public static java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
170 java.util.Date expirationDate, int start, int end)
171 throws com.liferay.portal.SystemException {
172 return getPersistence().findByExpirationDate(expirationDate, start, end);
173 }
174
175 public static java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
176 java.util.Date expirationDate, int start, int end,
177 com.liferay.portal.kernel.util.OrderByComparator obc)
178 throws com.liferay.portal.SystemException {
179 return getPersistence()
180 .findByExpirationDate(expirationDate, start, end, obc);
181 }
182
183 public static com.liferay.portal.model.Lock findByExpirationDate_First(
184 java.util.Date expirationDate,
185 com.liferay.portal.kernel.util.OrderByComparator obc)
186 throws com.liferay.portal.NoSuchLockException,
187 com.liferay.portal.SystemException {
188 return getPersistence().findByExpirationDate_First(expirationDate, obc);
189 }
190
191 public static com.liferay.portal.model.Lock findByExpirationDate_Last(
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_Last(expirationDate, obc);
197 }
198
199 public static com.liferay.portal.model.Lock[] findByExpirationDate_PrevAndNext(
200 long lockId, 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()
205 .findByExpirationDate_PrevAndNext(lockId, expirationDate, obc);
206 }
207
208 public static com.liferay.portal.model.Lock findByC_K(
209 java.lang.String className, java.lang.String key)
210 throws com.liferay.portal.NoSuchLockException,
211 com.liferay.portal.SystemException {
212 return getPersistence().findByC_K(className, key);
213 }
214
215 public static com.liferay.portal.model.Lock fetchByC_K(
216 java.lang.String className, java.lang.String key)
217 throws com.liferay.portal.SystemException {
218 return getPersistence().fetchByC_K(className, key);
219 }
220
221 public static com.liferay.portal.model.Lock fetchByC_K(
222 java.lang.String className, java.lang.String key,
223 boolean retrieveFromCache) throws com.liferay.portal.SystemException {
224 return getPersistence().fetchByC_K(className, key, retrieveFromCache);
225 }
226
227 public static java.util.List<com.liferay.portal.model.Lock> findAll()
228 throws com.liferay.portal.SystemException {
229 return getPersistence().findAll();
230 }
231
232 public static java.util.List<com.liferay.portal.model.Lock> findAll(
233 int start, int end) throws com.liferay.portal.SystemException {
234 return getPersistence().findAll(start, end);
235 }
236
237 public static java.util.List<com.liferay.portal.model.Lock> findAll(
238 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
239 throws com.liferay.portal.SystemException {
240 return getPersistence().findAll(start, end, obc);
241 }
242
243 public static void removeByUuid(java.lang.String uuid)
244 throws com.liferay.portal.SystemException {
245 getPersistence().removeByUuid(uuid);
246 }
247
248 public static void removeByExpirationDate(java.util.Date expirationDate)
249 throws com.liferay.portal.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.SystemException {
257 getPersistence().removeByC_K(className, key);
258 }
259
260 public static void removeAll() throws com.liferay.portal.SystemException {
261 getPersistence().removeAll();
262 }
263
264 public static int countByUuid(java.lang.String uuid)
265 throws com.liferay.portal.SystemException {
266 return getPersistence().countByUuid(uuid);
267 }
268
269 public static int countByExpirationDate(java.util.Date expirationDate)
270 throws com.liferay.portal.SystemException {
271 return getPersistence().countByExpirationDate(expirationDate);
272 }
273
274 public static int countByC_K(java.lang.String className,
275 java.lang.String key) throws com.liferay.portal.SystemException {
276 return getPersistence().countByC_K(className, key);
277 }
278
279 public static int countAll() throws com.liferay.portal.SystemException {
280 return getPersistence().countAll();
281 }
282
283 public static LockPersistence getPersistence() {
284 if (_persistence == null) {
285 _persistence = (LockPersistence)PortalBeanLocatorUtil.locate(LockPersistence.class.getName());
286 }
287
288 return _persistence;
289 }
290
291 public void setPersistence(LockPersistence persistence) {
292 _persistence = persistence;
293 }
294
295 private static LockPersistence _persistence;
296 }