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  
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.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.PortalException,
53              com.liferay.portal.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.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.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.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.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.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.PortalException,
93              com.liferay.portal.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) throws com.liferay.portal.SystemException {
99          return getService().getMBThreads(start, end);
100     }
101 
102     public static int getMBThreadsCount()
103         throws com.liferay.portal.SystemException {
104         return getService().getMBThreadsCount();
105     }
106 
107     public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
108         com.liferay.portlet.messageboards.model.MBThread mbThread)
109         throws com.liferay.portal.SystemException {
110         return getService().updateMBThread(mbThread);
111     }
112 
113     public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
114         com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
115         throws com.liferay.portal.SystemException {
116         return getService().updateMBThread(mbThread, merge);
117     }
118 
119     public static void deleteThread(long threadId)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException {
122         getService().deleteThread(threadId);
123     }
124 
125     public static void deleteThread(
126         com.liferay.portlet.messageboards.model.MBThread thread)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         getService().deleteThread(thread);
130     }
131 
132     public static void deleteThreads(long categoryId)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         getService().deleteThreads(categoryId);
136     }
137 
138     public static int getCategoryThreadsCount(long categoryId)
139         throws com.liferay.portal.SystemException {
140         return getService().getCategoryThreadsCount(categoryId);
141     }
142 
143     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
144         long groupId, int start, int end)
145         throws com.liferay.portal.SystemException {
146         return getService().getGroupThreads(groupId, start, end);
147     }
148 
149     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
150         long groupId, long userId, boolean subscribed,
151         boolean includeAnonymous, int start, int end)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException {
154         return getService()
155                    .getGroupThreads(groupId, userId, subscribed,
156             includeAnonymous, start, end);
157     }
158 
159     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
160         long groupId, long userId, boolean subscribed, int start, int end)
161         throws com.liferay.portal.PortalException,
162             com.liferay.portal.SystemException {
163         return getService()
164                    .getGroupThreads(groupId, userId, subscribed, start, end);
165     }
166 
167     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
168         long groupId, long userId, int start, int end)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException {
171         return getService().getGroupThreads(groupId, userId, start, end);
172     }
173 
174     public static int getGroupThreadsCount(long groupId)
175         throws com.liferay.portal.SystemException {
176         return getService().getGroupThreadsCount(groupId);
177     }
178 
179     public static int getGroupThreadsCount(long groupId, long userId)
180         throws com.liferay.portal.SystemException {
181         return getService().getGroupThreadsCount(groupId, userId);
182     }
183 
184     public static int getGroupThreadsCount(long groupId, long userId,
185         boolean subscribed) throws com.liferay.portal.SystemException {
186         return getService().getGroupThreadsCount(groupId, userId, subscribed);
187     }
188 
189     public static int getGroupThreadsCount(long groupId, long userId,
190         boolean subscribed, boolean includeAnonymous)
191         throws com.liferay.portal.SystemException {
192         return getService()
193                    .getGroupThreadsCount(groupId, userId, subscribed,
194             includeAnonymous);
195     }
196 
197     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
198         long categoryId, double priority)
199         throws com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException {
201         return getService().getPriorityThreads(categoryId, priority);
202     }
203 
204     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
205         long categoryId, double priority, boolean inherit)
206         throws com.liferay.portal.PortalException,
207             com.liferay.portal.SystemException {
208         return getService().getPriorityThreads(categoryId, priority, inherit);
209     }
210 
211     public static com.liferay.portlet.messageboards.model.MBThread getThread(
212         long threadId)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException {
215         return getService().getThread(threadId);
216     }
217 
218     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
219         long categoryId, int start, int end)
220         throws com.liferay.portal.SystemException {
221         return getService().getThreads(categoryId, start, end);
222     }
223 
224     public static int getThreadsCount(long categoryId)
225         throws com.liferay.portal.SystemException {
226         return getService().getThreadsCount(categoryId);
227     }
228 
229     public static com.liferay.portlet.messageboards.model.MBThread moveThread(
230         long categoryId, long threadId)
231         throws com.liferay.portal.PortalException,
232             com.liferay.portal.SystemException {
233         return getService().moveThread(categoryId, threadId);
234     }
235 
236     public static com.liferay.portlet.messageboards.model.MBThread splitThread(
237         long messageId, com.liferay.portal.service.ServiceContext serviceContext)
238         throws com.liferay.portal.PortalException,
239             com.liferay.portal.SystemException {
240         return getService().splitThread(messageId, serviceContext);
241     }
242 
243     public static com.liferay.portlet.messageboards.model.MBThread updateThread(
244         long threadId, int viewCount)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException {
247         return getService().updateThread(threadId, viewCount);
248     }
249 
250     public static MBThreadLocalService getService() {
251         if (_service == null) {
252             _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
253         }
254 
255         return _service;
256     }
257 
258     public void setService(MBThreadLocalService service) {
259         _service = service;
260     }
261 
262     private static MBThreadLocalService _service;
263 }