1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.messageboards.service;
24  
25  
26  /**
27   * <a href="MBThreadLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.messageboards.service.MBThreadLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.messageboards.service.MBThreadLocalService
45   *
46   */
47  public class MBThreadLocalServiceUtil {
48      public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
49          com.liferay.portlet.messageboards.model.MBThread mbThread)
50          throws com.liferay.portal.SystemException {
51          return getService().addMBThread(mbThread);
52      }
53  
54      public static com.liferay.portlet.messageboards.model.MBThread createMBThread(
55          long threadId) {
56          return getService().createMBThread(threadId);
57      }
58  
59      public static void deleteMBThread(long threadId)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          getService().deleteMBThread(threadId);
63      }
64  
65      public static void deleteMBThread(
66          com.liferay.portlet.messageboards.model.MBThread mbThread)
67          throws com.liferay.portal.SystemException {
68          getService().deleteMBThread(mbThread);
69      }
70  
71      public static java.util.List<Object> dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
73          throws com.liferay.portal.SystemException {
74          return getService().dynamicQuery(dynamicQuery);
75      }
76  
77      public static java.util.List<Object> dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end) throws com.liferay.portal.SystemException {
80          return getService().dynamicQuery(dynamicQuery, start, end);
81      }
82  
83      public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
84          long threadId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getMBThread(threadId);
88      }
89  
90      public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
91          int start, int end) throws com.liferay.portal.SystemException {
92          return getService().getMBThreads(start, end);
93      }
94  
95      public static int getMBThreadsCount()
96          throws com.liferay.portal.SystemException {
97          return getService().getMBThreadsCount();
98      }
99  
100     public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
101         com.liferay.portlet.messageboards.model.MBThread mbThread)
102         throws com.liferay.portal.SystemException {
103         return getService().updateMBThread(mbThread);
104     }
105 
106     public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
107         com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
108         throws com.liferay.portal.SystemException {
109         return getService().updateMBThread(mbThread, merge);
110     }
111 
112     public static void deleteThread(long threadId)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException {
115         getService().deleteThread(threadId);
116     }
117 
118     public static void deleteThread(
119         com.liferay.portlet.messageboards.model.MBThread thread)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException {
122         getService().deleteThread(thread);
123     }
124 
125     public static void deleteThreads(long categoryId)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         getService().deleteThreads(categoryId);
129     }
130 
131     public static int getCategoryThreadsCount(long categoryId)
132         throws com.liferay.portal.SystemException {
133         return getService().getCategoryThreadsCount(categoryId);
134     }
135 
136     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
137         long groupId, int start, int end)
138         throws com.liferay.portal.SystemException {
139         return getService().getGroupThreads(groupId, start, end);
140     }
141 
142     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
143         long groupId, long userId, int start, int end)
144         throws com.liferay.portal.PortalException,
145             com.liferay.portal.SystemException {
146         return getService().getGroupThreads(groupId, userId, start, end);
147     }
148 
149     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
150         long groupId, long userId, boolean subscribed, int start, int end)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException {
153         return getService()
154                    .getGroupThreads(groupId, userId, subscribed, start, end);
155     }
156 
157     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
158         long groupId, long userId, boolean subscribed,
159         boolean includeAnonymous, int start, int end)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException {
162         return getService()
163                    .getGroupThreads(groupId, userId, subscribed,
164             includeAnonymous, start, end);
165     }
166 
167     public static int getGroupThreadsCount(long groupId)
168         throws com.liferay.portal.SystemException {
169         return getService().getGroupThreadsCount(groupId);
170     }
171 
172     public static int getGroupThreadsCount(long groupId, long userId)
173         throws com.liferay.portal.SystemException {
174         return getService().getGroupThreadsCount(groupId, userId);
175     }
176 
177     public static int getGroupThreadsCount(long groupId, long userId,
178         boolean subscribed) throws com.liferay.portal.SystemException {
179         return getService().getGroupThreadsCount(groupId, userId, subscribed);
180     }
181 
182     public static int getGroupThreadsCount(long groupId, long userId,
183         boolean subscribed, boolean includeAnonymous)
184         throws com.liferay.portal.SystemException {
185         return getService()
186                    .getGroupThreadsCount(groupId, userId, subscribed,
187             includeAnonymous);
188     }
189 
190     public static com.liferay.portlet.messageboards.model.MBThread getThread(
191         long threadId)
192         throws com.liferay.portal.PortalException,
193             com.liferay.portal.SystemException {
194         return getService().getThread(threadId);
195     }
196 
197     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
198         long categoryId, int start, int end)
199         throws com.liferay.portal.SystemException {
200         return getService().getThreads(categoryId, start, end);
201     }
202 
203     public static int getThreadsCount(long categoryId)
204         throws com.liferay.portal.SystemException {
205         return getService().getThreadsCount(categoryId);
206     }
207 
208     public static com.liferay.portlet.messageboards.model.MBThread moveThread(
209         long categoryId, long threadId)
210         throws com.liferay.portal.PortalException,
211             com.liferay.portal.SystemException {
212         return getService().moveThread(categoryId, threadId);
213     }
214 
215     public static com.liferay.portlet.messageboards.model.MBThread splitThread(
216         long messageId, com.liferay.portal.service.ServiceContext serviceContext)
217         throws com.liferay.portal.PortalException,
218             com.liferay.portal.SystemException {
219         return getService().splitThread(messageId, serviceContext);
220     }
221 
222     public static com.liferay.portlet.messageboards.model.MBThread updateThread(
223         long threadId, int viewCount)
224         throws com.liferay.portal.PortalException,
225             com.liferay.portal.SystemException {
226         return getService().updateThread(threadId, viewCount);
227     }
228 
229     public static MBThreadLocalService getService() {
230         if (_service == null) {
231             throw new RuntimeException("MBThreadLocalService is not set");
232         }
233 
234         return _service;
235     }
236 
237     public void setService(MBThreadLocalService service) {
238         _service = service;
239     }
240 
241     private static MBThreadLocalService _service;
242 }