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 java.util.List<Object> dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end,
76          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
77          throws com.liferay.portal.SystemException {
78          return getService()
79                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
80      }
81  
82      public static int dynamicQueryCount(
83          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
84          throws com.liferay.portal.SystemException {
85          return getService().dynamicQueryCount(dynamicQuery);
86      }
87  
88      public static com.liferay.portal.model.Lock getLock(long lockId)
89          throws com.liferay.portal.PortalException,
90              com.liferay.portal.SystemException {
91          return getService().getLock(lockId);
92      }
93  
94      public static java.util.List<com.liferay.portal.model.Lock> getLocks(
95          int start, int end) throws com.liferay.portal.SystemException {
96          return getService().getLocks(start, end);
97      }
98  
99      public static int getLocksCount() throws com.liferay.portal.SystemException {
100         return getService().getLocksCount();
101     }
102 
103     public static com.liferay.portal.model.Lock updateLock(
104         com.liferay.portal.model.Lock lock)
105         throws com.liferay.portal.SystemException {
106         return getService().updateLock(lock);
107     }
108 
109     public static com.liferay.portal.model.Lock updateLock(
110         com.liferay.portal.model.Lock lock, boolean merge)
111         throws com.liferay.portal.SystemException {
112         return getService().updateLock(lock, merge);
113     }
114 
115     public static void clear() throws com.liferay.portal.SystemException {
116         getService().clear();
117     }
118 
119     public static com.liferay.portal.model.Lock getLock(
120         java.lang.String className, long key)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         return getService().getLock(className, key);
124     }
125 
126     public static com.liferay.portal.model.Lock getLock(
127         java.lang.String className, java.lang.String key)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException {
130         return getService().getLock(className, key);
131     }
132 
133     public static boolean hasLock(long userId, java.lang.String className,
134         long key)
135         throws com.liferay.portal.PortalException,
136             com.liferay.portal.SystemException {
137         return getService().hasLock(userId, className, key);
138     }
139 
140     public static boolean hasLock(long userId, java.lang.String className,
141         java.lang.String key)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException {
144         return getService().hasLock(userId, className, key);
145     }
146 
147     public static boolean isLocked(java.lang.String className, long key)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException {
150         return getService().isLocked(className, key);
151     }
152 
153     public static boolean isLocked(java.lang.String className,
154         java.lang.String key)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         return getService().isLocked(className, key);
158     }
159 
160     public static com.liferay.portal.model.Lock lock(long userId,
161         java.lang.String className, long key, java.lang.String owner,
162         boolean inheritable, long expirationTime)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException {
165         return getService()
166                    .lock(userId, className, key, owner, inheritable,
167             expirationTime);
168     }
169 
170     public static com.liferay.portal.model.Lock lock(long userId,
171         java.lang.String className, java.lang.String key,
172         java.lang.String owner, boolean inheritable, long expirationTime)
173         throws com.liferay.portal.PortalException,
174             com.liferay.portal.SystemException {
175         return getService()
176                    .lock(userId, className, key, owner, inheritable,
177             expirationTime);
178     }
179 
180     public static com.liferay.portal.model.Lock refresh(java.lang.String uuid,
181         long expirationTime)
182         throws com.liferay.portal.PortalException,
183             com.liferay.portal.SystemException {
184         return getService().refresh(uuid, expirationTime);
185     }
186 
187     public static void unlock(java.lang.String className, long key)
188         throws com.liferay.portal.SystemException {
189         getService().unlock(className, key);
190     }
191 
192     public static void unlock(java.lang.String className, java.lang.String key)
193         throws com.liferay.portal.SystemException {
194         getService().unlock(className, key);
195     }
196 
197     public static LockLocalService getService() {
198         if (_service == null) {
199             _service = (LockLocalService)PortalBeanLocatorUtil.locate(LockLocalService.class.getName());
200         }
201 
202         return _service;
203     }
204 
205     public void setService(LockLocalService service) {
206         _service = service;
207     }
208 
209     private static LockLocalService _service;
210 }