1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="LockLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link LockLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       LockLocalService
37   * @generated
38   */
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.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.PortalException,
52              com.liferay.portal.SystemException {
53          getService().deleteLock(lockId);
54      }
55  
56      public static void deleteLock(com.liferay.portal.model.Lock lock)
57          throws com.liferay.portal.SystemException {
58          getService().deleteLock(lock);
59      }
60  
61      public static java.util.List<Object> dynamicQuery(
62          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
63          throws com.liferay.portal.SystemException {
64          return getService().dynamicQuery(dynamicQuery);
65      }
66  
67      public static java.util.List<Object> dynamicQuery(
68          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
69          int end) throws com.liferay.portal.SystemException {
70          return getService().dynamicQuery(dynamicQuery, start, end);
71      }
72  
73      public static com.liferay.portal.model.Lock getLock(long lockId)
74          throws com.liferay.portal.PortalException,
75              com.liferay.portal.SystemException {
76          return getService().getLock(lockId);
77      }
78  
79      public static java.util.List<com.liferay.portal.model.Lock> getLocks(
80          int start, int end) throws com.liferay.portal.SystemException {
81          return getService().getLocks(start, end);
82      }
83  
84      public static int getLocksCount() throws com.liferay.portal.SystemException {
85          return getService().getLocksCount();
86      }
87  
88      public static com.liferay.portal.model.Lock updateLock(
89          com.liferay.portal.model.Lock lock)
90          throws com.liferay.portal.SystemException {
91          return getService().updateLock(lock);
92      }
93  
94      public static com.liferay.portal.model.Lock updateLock(
95          com.liferay.portal.model.Lock lock, boolean merge)
96          throws com.liferay.portal.SystemException {
97          return getService().updateLock(lock, merge);
98      }
99  
100     public static void clear() throws com.liferay.portal.SystemException {
101         getService().clear();
102     }
103 
104     public static com.liferay.portal.model.Lock getLock(
105         java.lang.String className, long key)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException {
108         return getService().getLock(className, key);
109     }
110 
111     public static com.liferay.portal.model.Lock getLock(
112         java.lang.String className, java.lang.String key)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException {
115         return getService().getLock(className, key);
116     }
117 
118     public static boolean hasLock(long userId, java.lang.String className,
119         long key)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException {
122         return getService().hasLock(userId, className, key);
123     }
124 
125     public static boolean hasLock(long userId, java.lang.String className,
126         java.lang.String key)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         return getService().hasLock(userId, className, key);
130     }
131 
132     public static boolean isLocked(java.lang.String className, long key)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         return getService().isLocked(className, key);
136     }
137 
138     public static boolean isLocked(java.lang.String className,
139         java.lang.String key)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         return getService().isLocked(className, key);
143     }
144 
145     public static com.liferay.portal.model.Lock lock(long userId,
146         java.lang.String className, long key, java.lang.String owner,
147         boolean inheritable, long expirationTime)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException {
150         return getService()
151                    .lock(userId, className, key, owner, inheritable,
152             expirationTime);
153     }
154 
155     public static com.liferay.portal.model.Lock lock(long userId,
156         java.lang.String className, java.lang.String key,
157         java.lang.String owner, boolean inheritable, long expirationTime)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException {
160         return getService()
161                    .lock(userId, className, key, owner, inheritable,
162             expirationTime);
163     }
164 
165     public static com.liferay.portal.model.Lock refresh(java.lang.String uuid,
166         long expirationTime)
167         throws com.liferay.portal.PortalException,
168             com.liferay.portal.SystemException {
169         return getService().refresh(uuid, expirationTime);
170     }
171 
172     public static void unlock(java.lang.String className, long key)
173         throws com.liferay.portal.SystemException {
174         getService().unlock(className, key);
175     }
176 
177     public static void unlock(java.lang.String className, java.lang.String key)
178         throws com.liferay.portal.SystemException {
179         getService().unlock(className, key);
180     }
181 
182     public static LockLocalService getService() {
183         if (_service == null) {
184             _service = (LockLocalService)PortalBeanLocatorUtil.locate(LockLocalService.class.getName());
185         }
186 
187         return _service;
188     }
189 
190     public void setService(LockLocalService service) {
191         _service = service;
192     }
193 
194     private static LockLocalService _service;
195 }