001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
036 public class LockLocalServiceUtil {
037
044 public static com.liferay.portal.model.Lock addLock(
045 com.liferay.portal.model.Lock lock)
046 throws com.liferay.portal.kernel.exception.SystemException {
047 return getService().addLock(lock);
048 }
049
050
056 public static com.liferay.portal.model.Lock createLock(long lockId) {
057 return getService().createLock(lockId);
058 }
059
060
067 public static void deleteLock(long lockId)
068 throws com.liferay.portal.kernel.exception.PortalException,
069 com.liferay.portal.kernel.exception.SystemException {
070 getService().deleteLock(lockId);
071 }
072
073
079 public static void deleteLock(com.liferay.portal.model.Lock lock)
080 throws com.liferay.portal.kernel.exception.SystemException {
081 getService().deleteLock(lock);
082 }
083
084
091 @SuppressWarnings("rawtypes")
092 public static java.util.List dynamicQuery(
093 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
094 throws com.liferay.portal.kernel.exception.SystemException {
095 return getService().dynamicQuery(dynamicQuery);
096 }
097
098
111 @SuppressWarnings("rawtypes")
112 public static java.util.List dynamicQuery(
113 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
114 int end) throws com.liferay.portal.kernel.exception.SystemException {
115 return getService().dynamicQuery(dynamicQuery, start, end);
116 }
117
118
132 @SuppressWarnings("rawtypes")
133 public static java.util.List dynamicQuery(
134 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
135 int end,
136 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
137 throws com.liferay.portal.kernel.exception.SystemException {
138 return getService()
139 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
140 }
141
142
149 public static long dynamicQueryCount(
150 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
151 throws com.liferay.portal.kernel.exception.SystemException {
152 return getService().dynamicQueryCount(dynamicQuery);
153 }
154
155
163 public static com.liferay.portal.model.Lock getLock(long lockId)
164 throws com.liferay.portal.kernel.exception.PortalException,
165 com.liferay.portal.kernel.exception.SystemException {
166 return getService().getLock(lockId);
167 }
168
169
181 public static java.util.List<com.liferay.portal.model.Lock> getLocks(
182 int start, int end)
183 throws com.liferay.portal.kernel.exception.SystemException {
184 return getService().getLocks(start, end);
185 }
186
187
193 public static int getLocksCount()
194 throws com.liferay.portal.kernel.exception.SystemException {
195 return getService().getLocksCount();
196 }
197
198
205 public static com.liferay.portal.model.Lock updateLock(
206 com.liferay.portal.model.Lock lock)
207 throws com.liferay.portal.kernel.exception.SystemException {
208 return getService().updateLock(lock);
209 }
210
211
219 public static com.liferay.portal.model.Lock updateLock(
220 com.liferay.portal.model.Lock lock, boolean merge)
221 throws com.liferay.portal.kernel.exception.SystemException {
222 return getService().updateLock(lock, merge);
223 }
224
225 public static void clear()
226 throws com.liferay.portal.kernel.exception.SystemException {
227 getService().clear();
228 }
229
230 public static com.liferay.portal.model.Lock getLock(
231 java.lang.String className, long key)
232 throws com.liferay.portal.kernel.exception.PortalException,
233 com.liferay.portal.kernel.exception.SystemException {
234 return getService().getLock(className, key);
235 }
236
237 public static com.liferay.portal.model.Lock getLock(
238 java.lang.String className, java.lang.String key)
239 throws com.liferay.portal.kernel.exception.PortalException,
240 com.liferay.portal.kernel.exception.SystemException {
241 return getService().getLock(className, key);
242 }
243
244 public static boolean hasLock(long userId, java.lang.String className,
245 long key)
246 throws com.liferay.portal.kernel.exception.PortalException,
247 com.liferay.portal.kernel.exception.SystemException {
248 return getService().hasLock(userId, className, key);
249 }
250
251 public static boolean hasLock(long userId, java.lang.String className,
252 java.lang.String key)
253 throws com.liferay.portal.kernel.exception.PortalException,
254 com.liferay.portal.kernel.exception.SystemException {
255 return getService().hasLock(userId, className, key);
256 }
257
258 public static boolean isLocked(java.lang.String className, long key)
259 throws com.liferay.portal.kernel.exception.PortalException,
260 com.liferay.portal.kernel.exception.SystemException {
261 return getService().isLocked(className, key);
262 }
263
264 public static boolean isLocked(java.lang.String className,
265 java.lang.String key)
266 throws com.liferay.portal.kernel.exception.PortalException,
267 com.liferay.portal.kernel.exception.SystemException {
268 return getService().isLocked(className, key);
269 }
270
271 public static com.liferay.portal.model.Lock lock(long userId,
272 java.lang.String className, long key, java.lang.String owner,
273 boolean inheritable, long expirationTime)
274 throws com.liferay.portal.kernel.exception.PortalException,
275 com.liferay.portal.kernel.exception.SystemException {
276 return getService()
277 .lock(userId, className, key, owner, inheritable,
278 expirationTime);
279 }
280
281 public static com.liferay.portal.model.Lock lock(long userId,
282 java.lang.String className, java.lang.String key,
283 java.lang.String owner, boolean inheritable, long expirationTime)
284 throws com.liferay.portal.kernel.exception.PortalException,
285 com.liferay.portal.kernel.exception.SystemException {
286 return getService()
287 .lock(userId, className, key, owner, inheritable,
288 expirationTime);
289 }
290
291 public static com.liferay.portal.model.Lock refresh(java.lang.String uuid,
292 long expirationTime)
293 throws com.liferay.portal.kernel.exception.PortalException,
294 com.liferay.portal.kernel.exception.SystemException {
295 return getService().refresh(uuid, expirationTime);
296 }
297
298 public static void unlock(java.lang.String className, long key)
299 throws com.liferay.portal.kernel.exception.SystemException {
300 getService().unlock(className, key);
301 }
302
303 public static void unlock(java.lang.String className, java.lang.String key)
304 throws com.liferay.portal.kernel.exception.SystemException {
305 getService().unlock(className, key);
306 }
307
308 public static LockLocalService getService() {
309 if (_service == null) {
310 _service = (LockLocalService)PortalBeanLocatorUtil.locate(LockLocalService.class.getName());
311 }
312
313 return _service;
314 }
315
316 public void setService(LockLocalService service) {
317 _service = service;
318 }
319
320 private static LockLocalService _service;
321 }