1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class LockLocalServiceUtil {
42 public static com.liferay.portal.model.Lock addLock(
43 com.liferay.portal.model.Lock lock)
44 throws com.liferay.portal.SystemException {
45 return getService().addLock(lock);
46 }
47
48 public static com.liferay.portal.model.Lock createLock(long lockId) {
49 return getService().createLock(lockId);
50 }
51
52 public static void deleteLock(long lockId)
53 throws com.liferay.portal.PortalException,
54 com.liferay.portal.SystemException {
55 getService().deleteLock(lockId);
56 }
57
58 public static void deleteLock(com.liferay.portal.model.Lock lock)
59 throws com.liferay.portal.SystemException {
60 getService().deleteLock(lock);
61 }
62
63 @SuppressWarnings("rawtypes")
64 public static java.util.List dynamicQuery(
65 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66 throws com.liferay.portal.SystemException {
67 return getService().dynamicQuery(dynamicQuery);
68 }
69
70 @SuppressWarnings("rawtypes")
71 public static java.util.List dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73 int end) throws com.liferay.portal.SystemException {
74 return getService().dynamicQuery(dynamicQuery, start, end);
75 }
76
77 @SuppressWarnings("rawtypes")
78 public static java.util.List dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80 int end,
81 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82 throws com.liferay.portal.SystemException {
83 return getService()
84 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85 }
86
87 public static int dynamicQueryCount(
88 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89 throws com.liferay.portal.SystemException {
90 return getService().dynamicQueryCount(dynamicQuery);
91 }
92
93 public static com.liferay.portal.model.Lock getLock(long lockId)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 return getService().getLock(lockId);
97 }
98
99 public static java.util.List<com.liferay.portal.model.Lock> getLocks(
100 int start, int end) throws com.liferay.portal.SystemException {
101 return getService().getLocks(start, end);
102 }
103
104 public static int getLocksCount() throws com.liferay.portal.SystemException {
105 return getService().getLocksCount();
106 }
107
108 public static com.liferay.portal.model.Lock updateLock(
109 com.liferay.portal.model.Lock lock)
110 throws com.liferay.portal.SystemException {
111 return getService().updateLock(lock);
112 }
113
114 public static com.liferay.portal.model.Lock updateLock(
115 com.liferay.portal.model.Lock lock, boolean merge)
116 throws com.liferay.portal.SystemException {
117 return getService().updateLock(lock, merge);
118 }
119
120 public static void clear() throws com.liferay.portal.SystemException {
121 getService().clear();
122 }
123
124 public static com.liferay.portal.model.Lock getLock(
125 java.lang.String className, long key)
126 throws com.liferay.portal.PortalException,
127 com.liferay.portal.SystemException {
128 return getService().getLock(className, key);
129 }
130
131 public static com.liferay.portal.model.Lock getLock(
132 java.lang.String className, java.lang.String key)
133 throws com.liferay.portal.PortalException,
134 com.liferay.portal.SystemException {
135 return getService().getLock(className, key);
136 }
137
138 public static boolean hasLock(long userId, java.lang.String className,
139 long key)
140 throws com.liferay.portal.PortalException,
141 com.liferay.portal.SystemException {
142 return getService().hasLock(userId, className, key);
143 }
144
145 public static boolean hasLock(long userId, java.lang.String className,
146 java.lang.String key)
147 throws com.liferay.portal.PortalException,
148 com.liferay.portal.SystemException {
149 return getService().hasLock(userId, className, key);
150 }
151
152 public static boolean isLocked(java.lang.String className, long key)
153 throws com.liferay.portal.PortalException,
154 com.liferay.portal.SystemException {
155 return getService().isLocked(className, key);
156 }
157
158 public static boolean isLocked(java.lang.String className,
159 java.lang.String key)
160 throws com.liferay.portal.PortalException,
161 com.liferay.portal.SystemException {
162 return getService().isLocked(className, key);
163 }
164
165 public static com.liferay.portal.model.Lock lock(long userId,
166 java.lang.String className, long key, java.lang.String owner,
167 boolean inheritable, long expirationTime)
168 throws com.liferay.portal.PortalException,
169 com.liferay.portal.SystemException {
170 return getService()
171 .lock(userId, className, key, owner, inheritable,
172 expirationTime);
173 }
174
175 public static com.liferay.portal.model.Lock lock(long userId,
176 java.lang.String className, java.lang.String key,
177 java.lang.String owner, boolean inheritable, long expirationTime)
178 throws com.liferay.portal.PortalException,
179 com.liferay.portal.SystemException {
180 return getService()
181 .lock(userId, className, key, owner, inheritable,
182 expirationTime);
183 }
184
185 public static com.liferay.portal.model.Lock refresh(java.lang.String uuid,
186 long expirationTime)
187 throws com.liferay.portal.PortalException,
188 com.liferay.portal.SystemException {
189 return getService().refresh(uuid, expirationTime);
190 }
191
192 public static void unlock(java.lang.String className, long key)
193 throws com.liferay.portal.SystemException {
194 getService().unlock(className, key);
195 }
196
197 public static void unlock(java.lang.String className, java.lang.String key)
198 throws com.liferay.portal.SystemException {
199 getService().unlock(className, key);
200 }
201
202 public static LockLocalService getService() {
203 if (_service == null) {
204 _service = (LockLocalService)PortalBeanLocatorUtil.locate(LockLocalService.class.getName());
205
206 ReferenceRegistry.registerReference(LockLocalServiceUtil.class,
207 "_service");
208 MethodCache.remove(LockLocalService.class);
209 }
210
211 return _service;
212 }
213
214 public void setService(LockLocalService service) {
215 MethodCache.remove(LockLocalService.class);
216
217 _service = service;
218
219 ReferenceRegistry.registerReference(LockLocalServiceUtil.class,
220 "_service");
221 MethodCache.remove(LockLocalService.class);
222 }
223
224 private static LockLocalService _service;
225 }