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.portlet.messageboards.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="MBThreadLocalServiceUtil.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 MBThreadLocalService} 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       MBThreadLocalService
37   * @generated
38   */
39  public class MBThreadLocalServiceUtil {
40      public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
41          com.liferay.portlet.messageboards.model.MBThread mbThread)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addMBThread(mbThread);
44      }
45  
46      public static com.liferay.portlet.messageboards.model.MBThread createMBThread(
47          long threadId) {
48          return getService().createMBThread(threadId);
49      }
50  
51      public static void deleteMBThread(long threadId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteMBThread(threadId);
55      }
56  
57      public static void deleteMBThread(
58          com.liferay.portlet.messageboards.model.MBThread mbThread)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteMBThread(mbThread);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> 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      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end,
78          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79          throws com.liferay.portal.kernel.exception.SystemException {
80          return getService()
81                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82      }
83  
84      public static int dynamicQueryCount(
85          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().dynamicQueryCount(dynamicQuery);
88      }
89  
90      public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
91          long threadId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getMBThread(threadId);
95      }
96  
97      public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
98          int start, int end)
99          throws com.liferay.portal.kernel.exception.SystemException {
100         return getService().getMBThreads(start, end);
101     }
102 
103     public static int getMBThreadsCount()
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getService().getMBThreadsCount();
106     }
107 
108     public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
109         com.liferay.portlet.messageboards.model.MBThread mbThread)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService().updateMBThread(mbThread);
112     }
113 
114     public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
115         com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getService().updateMBThread(mbThread, merge);
118     }
119 
120     public static void deleteThread(long threadId)
121         throws com.liferay.portal.kernel.exception.PortalException,
122             com.liferay.portal.kernel.exception.SystemException {
123         getService().deleteThread(threadId);
124     }
125 
126     public static void deleteThread(
127         com.liferay.portlet.messageboards.model.MBThread thread)
128         throws com.liferay.portal.kernel.exception.PortalException,
129             com.liferay.portal.kernel.exception.SystemException {
130         getService().deleteThread(thread);
131     }
132 
133     public static void deleteThreads(long groupId, long categoryId)
134         throws com.liferay.portal.kernel.exception.PortalException,
135             com.liferay.portal.kernel.exception.SystemException {
136         getService().deleteThreads(groupId, categoryId);
137     }
138 
139     public static int getCategoryThreadsCount(long groupId, long categoryId,
140         int status) throws com.liferay.portal.kernel.exception.SystemException {
141         return getService().getCategoryThreadsCount(groupId, categoryId, status);
142     }
143 
144     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
145         long groupId, int status, int start, int end)
146         throws com.liferay.portal.kernel.exception.SystemException {
147         return getService().getGroupThreads(groupId, status, start, end);
148     }
149 
150     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
151         long groupId, long userId, int status, int start, int end)
152         throws com.liferay.portal.kernel.exception.PortalException,
153             com.liferay.portal.kernel.exception.SystemException {
154         return getService().getGroupThreads(groupId, userId, status, start, end);
155     }
156 
157     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
158         long groupId, long userId, int status, boolean subscribed, int start,
159         int end)
160         throws com.liferay.portal.kernel.exception.PortalException,
161             com.liferay.portal.kernel.exception.SystemException {
162         return getService()
163                    .getGroupThreads(groupId, userId, status, subscribed, start,
164             end);
165     }
166 
167     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
168         long groupId, long userId, int status, boolean subscribed,
169         boolean includeAnonymous, int start, int end)
170         throws com.liferay.portal.kernel.exception.PortalException,
171             com.liferay.portal.kernel.exception.SystemException {
172         return getService()
173                    .getGroupThreads(groupId, userId, status, subscribed,
174             includeAnonymous, start, end);
175     }
176 
177     public static int getGroupThreadsCount(long groupId, int status)
178         throws com.liferay.portal.kernel.exception.SystemException {
179         return getService().getGroupThreadsCount(groupId, status);
180     }
181 
182     public static int getGroupThreadsCount(long groupId, long userId, int status)
183         throws com.liferay.portal.kernel.exception.SystemException {
184         return getService().getGroupThreadsCount(groupId, userId, status);
185     }
186 
187     public static int getGroupThreadsCount(long groupId, long userId,
188         int status, boolean subscribed)
189         throws com.liferay.portal.kernel.exception.SystemException {
190         return getService()
191                    .getGroupThreadsCount(groupId, userId, status, subscribed);
192     }
193 
194     public static int getGroupThreadsCount(long groupId, long userId,
195         int status, boolean subscribed, boolean includeAnonymous)
196         throws com.liferay.portal.kernel.exception.SystemException {
197         return getService()
198                    .getGroupThreadsCount(groupId, userId, status, 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.kernel.exception.PortalException,
205             com.liferay.portal.kernel.exception.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.kernel.exception.PortalException,
212             com.liferay.portal.kernel.exception.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.kernel.exception.PortalException,
219             com.liferay.portal.kernel.exception.SystemException {
220         return getService().getThread(threadId);
221     }
222 
223     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
224         long groupId, long categoryId, int status, int start, int end)
225         throws com.liferay.portal.kernel.exception.SystemException {
226         return getService().getThreads(groupId, categoryId, status, start, end);
227     }
228 
229     public static int getThreadsCount(long groupId, long categoryId, int status)
230         throws com.liferay.portal.kernel.exception.SystemException {
231         return getService().getThreadsCount(groupId, categoryId, status);
232     }
233 
234     public static com.liferay.portlet.messageboards.model.MBThread moveThread(
235         long groupId, long categoryId, long threadId)
236         throws com.liferay.portal.kernel.exception.PortalException,
237             com.liferay.portal.kernel.exception.SystemException {
238         return getService().moveThread(groupId, 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.kernel.exception.PortalException,
244             com.liferay.portal.kernel.exception.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.kernel.exception.PortalException,
251             com.liferay.portal.kernel.exception.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 
260         return _service;
261     }
262 
263     public void setService(MBThreadLocalService service) {
264         _service = service;
265     }
266 
267     private static MBThreadLocalService _service;
268 }