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