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