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