001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class LockLocalServiceUtil {
033 public static com.liferay.portal.model.Lock addLock(
034 com.liferay.portal.model.Lock lock)
035 throws com.liferay.portal.kernel.exception.SystemException {
036 return getService().addLock(lock);
037 }
038
039 public static com.liferay.portal.model.Lock createLock(long lockId) {
040 return getService().createLock(lockId);
041 }
042
043 public static void deleteLock(long lockId)
044 throws com.liferay.portal.kernel.exception.PortalException,
045 com.liferay.portal.kernel.exception.SystemException {
046 getService().deleteLock(lockId);
047 }
048
049 public static void deleteLock(com.liferay.portal.model.Lock lock)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 getService().deleteLock(lock);
052 }
053
054 @SuppressWarnings("unchecked")
055 public static java.util.List dynamicQuery(
056 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
057 throws com.liferay.portal.kernel.exception.SystemException {
058 return getService().dynamicQuery(dynamicQuery);
059 }
060
061 @SuppressWarnings("unchecked")
062 public static java.util.List dynamicQuery(
063 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
064 int end) throws com.liferay.portal.kernel.exception.SystemException {
065 return getService().dynamicQuery(dynamicQuery, start, end);
066 }
067
068 @SuppressWarnings("unchecked")
069 public static java.util.List dynamicQuery(
070 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
071 int end,
072 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
073 throws com.liferay.portal.kernel.exception.SystemException {
074 return getService()
075 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
076 }
077
078 public static long dynamicQueryCount(
079 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
080 throws com.liferay.portal.kernel.exception.SystemException {
081 return getService().dynamicQueryCount(dynamicQuery);
082 }
083
084 public static com.liferay.portal.model.Lock getLock(long lockId)
085 throws com.liferay.portal.kernel.exception.PortalException,
086 com.liferay.portal.kernel.exception.SystemException {
087 return getService().getLock(lockId);
088 }
089
090 public static java.util.List<com.liferay.portal.model.Lock> getLocks(
091 int start, int end)
092 throws com.liferay.portal.kernel.exception.SystemException {
093 return getService().getLocks(start, end);
094 }
095
096 public static int getLocksCount()
097 throws com.liferay.portal.kernel.exception.SystemException {
098 return getService().getLocksCount();
099 }
100
101 public static com.liferay.portal.model.Lock updateLock(
102 com.liferay.portal.model.Lock lock)
103 throws com.liferay.portal.kernel.exception.SystemException {
104 return getService().updateLock(lock);
105 }
106
107 public static com.liferay.portal.model.Lock updateLock(
108 com.liferay.portal.model.Lock lock, boolean merge)
109 throws com.liferay.portal.kernel.exception.SystemException {
110 return getService().updateLock(lock, merge);
111 }
112
113 public static void clear()
114 throws com.liferay.portal.kernel.exception.SystemException {
115 getService().clear();
116 }
117
118 public static com.liferay.portal.model.Lock getLock(
119 java.lang.String className, long key)
120 throws com.liferay.portal.kernel.exception.PortalException,
121 com.liferay.portal.kernel.exception.SystemException {
122 return getService().getLock(className, key);
123 }
124
125 public static com.liferay.portal.model.Lock getLock(
126 java.lang.String className, java.lang.String 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 boolean hasLock(long userId, java.lang.String className,
133 long key)
134 throws com.liferay.portal.kernel.exception.PortalException,
135 com.liferay.portal.kernel.exception.SystemException {
136 return getService().hasLock(userId, className, key);
137 }
138
139 public static boolean hasLock(long userId, java.lang.String className,
140 java.lang.String 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 isLocked(java.lang.String className, long key)
147 throws com.liferay.portal.kernel.exception.PortalException,
148 com.liferay.portal.kernel.exception.SystemException {
149 return getService().isLocked(className, key);
150 }
151
152 public static boolean isLocked(java.lang.String className,
153 java.lang.String 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 com.liferay.portal.model.Lock lock(long userId,
160 java.lang.String className, long key, java.lang.String owner,
161 boolean inheritable, long expirationTime)
162 throws com.liferay.portal.kernel.exception.PortalException,
163 com.liferay.portal.kernel.exception.SystemException {
164 return getService()
165 .lock(userId, className, key, owner, inheritable,
166 expirationTime);
167 }
168
169 public static com.liferay.portal.model.Lock lock(long userId,
170 java.lang.String className, java.lang.String key,
171 java.lang.String owner, boolean inheritable, long expirationTime)
172 throws com.liferay.portal.kernel.exception.PortalException,
173 com.liferay.portal.kernel.exception.SystemException {
174 return getService()
175 .lock(userId, className, key, owner, inheritable,
176 expirationTime);
177 }
178
179 public static com.liferay.portal.model.Lock refresh(java.lang.String uuid,
180 long expirationTime)
181 throws com.liferay.portal.kernel.exception.PortalException,
182 com.liferay.portal.kernel.exception.SystemException {
183 return getService().refresh(uuid, expirationTime);
184 }
185
186 public static void unlock(java.lang.String className, long key)
187 throws com.liferay.portal.kernel.exception.SystemException {
188 getService().unlock(className, key);
189 }
190
191 public static void unlock(java.lang.String className, java.lang.String key)
192 throws com.liferay.portal.kernel.exception.SystemException {
193 getService().unlock(className, key);
194 }
195
196 public static LockLocalService getService() {
197 if (_service == null) {
198 _service = (LockLocalService)PortalBeanLocatorUtil.locate(LockLocalService.class.getName());
199 }
200
201 return _service;
202 }
203
204 public void setService(LockLocalService service) {
205 _service = service;
206 }
207
208 private static LockLocalService _service;
209 }