1   /**
2    * Copyright (c) 2000-2008 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   * <p>
43   * <code>com.liferay.portlet.messageboards.service.MBThreadLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.messageboards.service.MBThreadLocalService
50   * @see com.liferay.portlet.messageboards.service.MBThreadLocalServiceFactory
51   *
52   */
53  public class MBThreadLocalServiceUtil {
54      public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
55          com.liferay.portlet.messageboards.model.MBThread model)
56          throws com.liferay.portal.SystemException {
57          MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
58  
59          return mbThreadLocalService.addMBThread(model);
60      }
61  
62      public static java.util.List dynamicQuery(
63          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
64          throws com.liferay.portal.SystemException {
65          MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
66  
67          return mbThreadLocalService.dynamicQuery(queryInitializer);
68      }
69  
70      public static java.util.List dynamicQuery(
71          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
72          int begin, int end) throws com.liferay.portal.SystemException {
73          MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
74  
75          return mbThreadLocalService.dynamicQuery(queryInitializer, begin, end);
76      }
77  
78      public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
79          com.liferay.portlet.messageboards.model.MBThread model)
80          throws com.liferay.portal.SystemException {
81          MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
82  
83          return mbThreadLocalService.updateMBThread(model);
84      }
85  
86      public static com.liferay.portlet.messageboards.service.persistence.MBBanPersistence getMBBanPersistence() {
87          MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
88  
89          return mbThreadLocalService.getMBBanPersistence();
90      }
91  
92      public static void setMBBanPersistence(
93          com.liferay.portlet.messageboards.service.persistence.MBBanPersistence mbBanPersistence) {
94          MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
95  
96          mbThreadLocalService.setMBBanPersistence(mbBanPersistence);
97      }
98  
99      public static com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence getMBCategoryPersistence() {
100         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
101 
102         return mbThreadLocalService.getMBCategoryPersistence();
103     }
104 
105     public static void setMBCategoryPersistence(
106         com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence mbCategoryPersistence) {
107         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
108 
109         mbThreadLocalService.setMBCategoryPersistence(mbCategoryPersistence);
110     }
111 
112     public static com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder getMBCategoryFinder() {
113         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
114 
115         return mbThreadLocalService.getMBCategoryFinder();
116     }
117 
118     public static void setMBCategoryFinder(
119         com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder mbCategoryFinder) {
120         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
121 
122         mbThreadLocalService.setMBCategoryFinder(mbCategoryFinder);
123     }
124 
125     public static com.liferay.portlet.messageboards.service.persistence.MBDiscussionPersistence getMBDiscussionPersistence() {
126         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
127 
128         return mbThreadLocalService.getMBDiscussionPersistence();
129     }
130 
131     public static void setMBDiscussionPersistence(
132         com.liferay.portlet.messageboards.service.persistence.MBDiscussionPersistence mbDiscussionPersistence) {
133         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
134 
135         mbThreadLocalService.setMBDiscussionPersistence(mbDiscussionPersistence);
136     }
137 
138     public static com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence getMBMessagePersistence() {
139         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
140 
141         return mbThreadLocalService.getMBMessagePersistence();
142     }
143 
144     public static void setMBMessagePersistence(
145         com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence mbMessagePersistence) {
146         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
147 
148         mbThreadLocalService.setMBMessagePersistence(mbMessagePersistence);
149     }
150 
151     public static com.liferay.portlet.messageboards.service.persistence.MBMessageFinder getMBMessageFinder() {
152         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
153 
154         return mbThreadLocalService.getMBMessageFinder();
155     }
156 
157     public static void setMBMessageFinder(
158         com.liferay.portlet.messageboards.service.persistence.MBMessageFinder mbMessageFinder) {
159         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
160 
161         mbThreadLocalService.setMBMessageFinder(mbMessageFinder);
162     }
163 
164     public static com.liferay.portlet.messageboards.service.persistence.MBMessageFlagPersistence getMBMessageFlagPersistence() {
165         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
166 
167         return mbThreadLocalService.getMBMessageFlagPersistence();
168     }
169 
170     public static void setMBMessageFlagPersistence(
171         com.liferay.portlet.messageboards.service.persistence.MBMessageFlagPersistence mbMessageFlagPersistence) {
172         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
173 
174         mbThreadLocalService.setMBMessageFlagPersistence(mbMessageFlagPersistence);
175     }
176 
177     public static com.liferay.portlet.messageboards.service.persistence.MBMessageFlagFinder getMBMessageFlagFinder() {
178         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
179 
180         return mbThreadLocalService.getMBMessageFlagFinder();
181     }
182 
183     public static void setMBMessageFlagFinder(
184         com.liferay.portlet.messageboards.service.persistence.MBMessageFlagFinder mbMessageFlagFinder) {
185         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
186 
187         mbThreadLocalService.setMBMessageFlagFinder(mbMessageFlagFinder);
188     }
189 
190     public static com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence getMBStatsUserPersistence() {
191         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
192 
193         return mbThreadLocalService.getMBStatsUserPersistence();
194     }
195 
196     public static void setMBStatsUserPersistence(
197         com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence mbStatsUserPersistence) {
198         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
199 
200         mbThreadLocalService.setMBStatsUserPersistence(mbStatsUserPersistence);
201     }
202 
203     public static com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence getMBThreadPersistence() {
204         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
205 
206         return mbThreadLocalService.getMBThreadPersistence();
207     }
208 
209     public static void setMBThreadPersistence(
210         com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence mbThreadPersistence) {
211         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
212 
213         mbThreadLocalService.setMBThreadPersistence(mbThreadPersistence);
214     }
215 
216     public static com.liferay.portlet.messageboards.service.persistence.MBThreadFinder getMBThreadFinder() {
217         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
218 
219         return mbThreadLocalService.getMBThreadFinder();
220     }
221 
222     public static void setMBThreadFinder(
223         com.liferay.portlet.messageboards.service.persistence.MBThreadFinder mbThreadFinder) {
224         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
225 
226         mbThreadLocalService.setMBThreadFinder(mbThreadFinder);
227     }
228 
229     public static com.liferay.portal.service.persistence.ActivityTrackerPersistence getActivityTrackerPersistence() {
230         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
231 
232         return mbThreadLocalService.getActivityTrackerPersistence();
233     }
234 
235     public static void setActivityTrackerPersistence(
236         com.liferay.portal.service.persistence.ActivityTrackerPersistence activityTrackerPersistence) {
237         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
238 
239         mbThreadLocalService.setActivityTrackerPersistence(activityTrackerPersistence);
240     }
241 
242     public static com.liferay.portal.service.persistence.ActivityTrackerFinder getActivityTrackerFinder() {
243         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
244 
245         return mbThreadLocalService.getActivityTrackerFinder();
246     }
247 
248     public static void setActivityTrackerFinder(
249         com.liferay.portal.service.persistence.ActivityTrackerFinder activityTrackerFinder) {
250         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
251 
252         mbThreadLocalService.setActivityTrackerFinder(activityTrackerFinder);
253     }
254 
255     public static com.liferay.portal.service.persistence.ResourcePersistence getResourcePersistence() {
256         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
257 
258         return mbThreadLocalService.getResourcePersistence();
259     }
260 
261     public static void setResourcePersistence(
262         com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence) {
263         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
264 
265         mbThreadLocalService.setResourcePersistence(resourcePersistence);
266     }
267 
268     public static com.liferay.portal.service.persistence.ResourceFinder getResourceFinder() {
269         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
270 
271         return mbThreadLocalService.getResourceFinder();
272     }
273 
274     public static void setResourceFinder(
275         com.liferay.portal.service.persistence.ResourceFinder resourceFinder) {
276         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
277 
278         mbThreadLocalService.setResourceFinder(resourceFinder);
279     }
280 
281     public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
282         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
283 
284         return mbThreadLocalService.getUserPersistence();
285     }
286 
287     public static void setUserPersistence(
288         com.liferay.portal.service.persistence.UserPersistence userPersistence) {
289         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
290 
291         mbThreadLocalService.setUserPersistence(userPersistence);
292     }
293 
294     public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
295         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
296 
297         return mbThreadLocalService.getUserFinder();
298     }
299 
300     public static void setUserFinder(
301         com.liferay.portal.service.persistence.UserFinder userFinder) {
302         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
303 
304         mbThreadLocalService.setUserFinder(userFinder);
305     }
306 
307     public static com.liferay.portlet.tags.service.persistence.TagsAssetPersistence getTagsAssetPersistence() {
308         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
309 
310         return mbThreadLocalService.getTagsAssetPersistence();
311     }
312 
313     public static void setTagsAssetPersistence(
314         com.liferay.portlet.tags.service.persistence.TagsAssetPersistence tagsAssetPersistence) {
315         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
316 
317         mbThreadLocalService.setTagsAssetPersistence(tagsAssetPersistence);
318     }
319 
320     public static com.liferay.portlet.tags.service.persistence.TagsAssetFinder getTagsAssetFinder() {
321         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
322 
323         return mbThreadLocalService.getTagsAssetFinder();
324     }
325 
326     public static void setTagsAssetFinder(
327         com.liferay.portlet.tags.service.persistence.TagsAssetFinder tagsAssetFinder) {
328         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
329 
330         mbThreadLocalService.setTagsAssetFinder(tagsAssetFinder);
331     }
332 
333     public static void afterPropertiesSet() {
334         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
335 
336         mbThreadLocalService.afterPropertiesSet();
337     }
338 
339     public static void deleteThread(long threadId)
340         throws com.liferay.portal.PortalException, 
341             com.liferay.portal.SystemException {
342         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
343 
344         mbThreadLocalService.deleteThread(threadId);
345     }
346 
347     public static void deleteThread(
348         com.liferay.portlet.messageboards.model.MBThread thread)
349         throws com.liferay.portal.PortalException, 
350             com.liferay.portal.SystemException {
351         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
352 
353         mbThreadLocalService.deleteThread(thread);
354     }
355 
356     public static void deleteThreads(long categoryId)
357         throws com.liferay.portal.PortalException, 
358             com.liferay.portal.SystemException {
359         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
360 
361         mbThreadLocalService.deleteThreads(categoryId);
362     }
363 
364     public static int getCategoriesThreadsCount(java.util.List categoryIds)
365         throws com.liferay.portal.SystemException {
366         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
367 
368         return mbThreadLocalService.getCategoriesThreadsCount(categoryIds);
369     }
370 
371     public static java.util.List getGroupThreads(long groupId, int begin,
372         int end) throws com.liferay.portal.SystemException {
373         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
374 
375         return mbThreadLocalService.getGroupThreads(groupId, begin, end);
376     }
377 
378     public static java.util.List getGroupThreads(long groupId, long userId,
379         int begin, int end) throws com.liferay.portal.SystemException {
380         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
381 
382         return mbThreadLocalService.getGroupThreads(groupId, userId, begin, end);
383     }
384 
385     public static java.util.List getGroupThreads(long groupId, long userId,
386         boolean subscribed, int begin, int end)
387         throws com.liferay.portal.SystemException {
388         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
389 
390         return mbThreadLocalService.getGroupThreads(groupId, userId,
391             subscribed, begin, end);
392     }
393 
394     public static int getGroupThreadsCount(long groupId)
395         throws com.liferay.portal.SystemException {
396         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
397 
398         return mbThreadLocalService.getGroupThreadsCount(groupId);
399     }
400 
401     public static int getGroupThreadsCount(long groupId, long userId)
402         throws com.liferay.portal.SystemException {
403         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
404 
405         return mbThreadLocalService.getGroupThreadsCount(groupId, userId);
406     }
407 
408     public static int getGroupThreadsCount(long groupId, long userId,
409         boolean subscribed) throws com.liferay.portal.SystemException {
410         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
411 
412         return mbThreadLocalService.getGroupThreadsCount(groupId, userId,
413             subscribed);
414     }
415 
416     public static com.liferay.portlet.messageboards.model.MBThread getThread(
417         long threadId)
418         throws com.liferay.portal.PortalException, 
419             com.liferay.portal.SystemException {
420         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
421 
422         return mbThreadLocalService.getThread(threadId);
423     }
424 
425     public static java.util.List getThreads(long categoryId, int begin, int end)
426         throws com.liferay.portal.SystemException {
427         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
428 
429         return mbThreadLocalService.getThreads(categoryId, begin, end);
430     }
431 
432     public static int getThreadsCount(long categoryId)
433         throws com.liferay.portal.SystemException {
434         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
435 
436         return mbThreadLocalService.getThreadsCount(categoryId);
437     }
438 
439     public static boolean hasReadThread(long userId, long threadId)
440         throws com.liferay.portal.PortalException, 
441             com.liferay.portal.SystemException {
442         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
443 
444         return mbThreadLocalService.hasReadThread(userId, threadId);
445     }
446 
447     public static com.liferay.portlet.messageboards.model.MBThread moveThread(
448         long categoryId, long threadId)
449         throws com.liferay.portal.PortalException, 
450             com.liferay.portal.SystemException {
451         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
452 
453         return mbThreadLocalService.moveThread(categoryId, threadId);
454     }
455 
456     public static com.liferay.portlet.messageboards.model.MBThread splitThread(
457         long messageId, javax.portlet.PortletPreferences prefs,
458         com.liferay.portal.theme.ThemeDisplay themeDisplay)
459         throws com.liferay.portal.PortalException, 
460             com.liferay.portal.SystemException {
461         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
462 
463         return mbThreadLocalService.splitThread(messageId, prefs, themeDisplay);
464     }
465 
466     public static com.liferay.portlet.messageboards.model.MBThread updateThread(
467         long threadId, int viewCount)
468         throws com.liferay.portal.PortalException, 
469             com.liferay.portal.SystemException {
470         MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
471 
472         return mbThreadLocalService.updateThread(threadId, viewCount);
473     }
474 }