1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.messageboards.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  /**
22   * <a href="MBThreadLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link MBThreadLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       MBThreadLocalService
39   * @generated
40   */
41  public class MBThreadLocalServiceUtil {
42      public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
43          com.liferay.portlet.messageboards.model.MBThread mbThread)
44          throws com.liferay.portal.SystemException {
45          return getService().addMBThread(mbThread);
46      }
47  
48      public static com.liferay.portlet.messageboards.model.MBThread createMBThread(
49          long threadId) {
50          return getService().createMBThread(threadId);
51      }
52  
53      public static void deleteMBThread(long threadId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteMBThread(threadId);
57      }
58  
59      public static void deleteMBThread(
60          com.liferay.portlet.messageboards.model.MBThread mbThread)
61          throws com.liferay.portal.SystemException {
62          getService().deleteMBThread(mbThread);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
96          long threadId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getMBThread(threadId);
100     }
101 
102     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getMBThreads(start, end);
105     }
106 
107     public static int getMBThreadsCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getMBThreadsCount();
110     }
111 
112     public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
113         com.liferay.portlet.messageboards.model.MBThread mbThread)
114         throws com.liferay.portal.SystemException {
115         return getService().updateMBThread(mbThread);
116     }
117 
118     public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
119         com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
120         throws com.liferay.portal.SystemException {
121         return getService().updateMBThread(mbThread, merge);
122     }
123 
124     public static void deleteThread(long threadId)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException {
127         getService().deleteThread(threadId);
128     }
129 
130     public static void deleteThread(
131         com.liferay.portlet.messageboards.model.MBThread thread)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException {
134         getService().deleteThread(thread);
135     }
136 
137     public static void deleteThreads(long categoryId)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException {
140         getService().deleteThreads(categoryId);
141     }
142 
143     public static int getCategoryThreadsCount(long categoryId)
144         throws com.liferay.portal.SystemException {
145         return getService().getCategoryThreadsCount(categoryId);
146     }
147 
148     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
149         long groupId, int start, int end)
150         throws com.liferay.portal.SystemException {
151         return getService().getGroupThreads(groupId, start, end);
152     }
153 
154     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
155         long groupId, long userId, boolean subscribed,
156         boolean includeAnonymous, int start, int end)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException {
159         return getService()
160                    .getGroupThreads(groupId, userId, subscribed,
161             includeAnonymous, start, end);
162     }
163 
164     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
165         long groupId, long userId, boolean subscribed, int start, int end)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         return getService()
169                    .getGroupThreads(groupId, userId, subscribed, start, end);
170     }
171 
172     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
173         long groupId, long userId, int start, int end)
174         throws com.liferay.portal.PortalException,
175             com.liferay.portal.SystemException {
176         return getService().getGroupThreads(groupId, userId, start, end);
177     }
178 
179     public static int getGroupThreadsCount(long groupId)
180         throws com.liferay.portal.SystemException {
181         return getService().getGroupThreadsCount(groupId);
182     }
183 
184     public static int getGroupThreadsCount(long groupId, long userId)
185         throws com.liferay.portal.SystemException {
186         return getService().getGroupThreadsCount(groupId, userId);
187     }
188 
189     public static int getGroupThreadsCount(long groupId, long userId,
190         boolean subscribed) throws com.liferay.portal.SystemException {
191         return getService().getGroupThreadsCount(groupId, userId, subscribed);
192     }
193 
194     public static int getGroupThreadsCount(long groupId, long userId,
195         boolean subscribed, boolean includeAnonymous)
196         throws com.liferay.portal.SystemException {
197         return getService()
198                    .getGroupThreadsCount(groupId, userId, subscribed,
199             includeAnonymous);
200     }
201 
202     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
203         long categoryId, double priority)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         return getService().getPriorityThreads(categoryId, priority);
207     }
208 
209     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
210         long categoryId, double priority, boolean inherit)
211         throws com.liferay.portal.PortalException,
212             com.liferay.portal.SystemException {
213         return getService().getPriorityThreads(categoryId, priority, inherit);
214     }
215 
216     public static com.liferay.portlet.messageboards.model.MBThread getThread(
217         long threadId)
218         throws com.liferay.portal.PortalException,
219             com.liferay.portal.SystemException {
220         return getService().getThread(threadId);
221     }
222 
223     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
224         long categoryId, int start, int end)
225         throws com.liferay.portal.SystemException {
226         return getService().getThreads(categoryId, start, end);
227     }
228 
229     public static int getThreadsCount(long categoryId)
230         throws com.liferay.portal.SystemException {
231         return getService().getThreadsCount(categoryId);
232     }
233 
234     public static com.liferay.portlet.messageboards.model.MBThread moveThread(
235         long categoryId, long threadId)
236         throws com.liferay.portal.PortalException,
237             com.liferay.portal.SystemException {
238         return getService().moveThread(categoryId, threadId);
239     }
240 
241     public static com.liferay.portlet.messageboards.model.MBThread splitThread(
242         long messageId, com.liferay.portal.service.ServiceContext serviceContext)
243         throws com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException {
245         return getService().splitThread(messageId, serviceContext);
246     }
247 
248     public static com.liferay.portlet.messageboards.model.MBThread updateThread(
249         long threadId, int viewCount)
250         throws com.liferay.portal.PortalException,
251             com.liferay.portal.SystemException {
252         return getService().updateThread(threadId, viewCount);
253     }
254 
255     public static MBThreadLocalService getService() {
256         if (_service == null) {
257             _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
258 
259             ReferenceRegistry.registerReference(MBThreadLocalServiceUtil.class,
260                 "_service");
261             MethodCache.remove(MBThreadLocalService.class);
262         }
263 
264         return _service;
265     }
266 
267     public void setService(MBThreadLocalService service) {
268         MethodCache.remove(MBThreadLocalService.class);
269 
270         _service = service;
271 
272         ReferenceRegistry.registerReference(MBThreadLocalServiceUtil.class,
273             "_service");
274         MethodCache.remove(MBThreadLocalService.class);
275     }
276 
277     private static MBThreadLocalService _service;
278 }