001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.messageboards.service;
022:
023: /**
024: * <a href="MBThreadLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.messageboards.service.MBThreadLocalService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.messageboards.service.MBThreadLocalServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.messageboards.service.MBThreadLocalService
047: * @see com.liferay.portlet.messageboards.service.MBThreadLocalServiceFactory
048: *
049: */
050: public class MBThreadLocalServiceUtil {
051: public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
052: com.liferay.portlet.messageboards.model.MBThread model)
053: throws com.liferay.portal.SystemException {
054: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
055: .getService();
056:
057: return mbThreadLocalService.addMBThread(model);
058: }
059:
060: public static java.util.List dynamicQuery(
061: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
062: throws com.liferay.portal.SystemException {
063: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
064: .getService();
065:
066: return mbThreadLocalService.dynamicQuery(queryInitializer);
067: }
068:
069: public static java.util.List dynamicQuery(
070: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
071: int begin, int end)
072: throws com.liferay.portal.SystemException {
073: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
074: .getService();
075:
076: return mbThreadLocalService.dynamicQuery(queryInitializer,
077: begin, end);
078: }
079:
080: public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
081: com.liferay.portlet.messageboards.model.MBThread model)
082: throws com.liferay.portal.SystemException {
083: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
084: .getService();
085:
086: return mbThreadLocalService.updateMBThread(model);
087: }
088:
089: public static com.liferay.portlet.messageboards.service.persistence.MBBanPersistence getMBBanPersistence() {
090: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
091: .getService();
092:
093: return mbThreadLocalService.getMBBanPersistence();
094: }
095:
096: public static void setMBBanPersistence(
097: com.liferay.portlet.messageboards.service.persistence.MBBanPersistence mbBanPersistence) {
098: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
099: .getService();
100:
101: mbThreadLocalService.setMBBanPersistence(mbBanPersistence);
102: }
103:
104: public static com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence getMBCategoryPersistence() {
105: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
106: .getService();
107:
108: return mbThreadLocalService.getMBCategoryPersistence();
109: }
110:
111: public static void setMBCategoryPersistence(
112: com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence mbCategoryPersistence) {
113: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
114: .getService();
115:
116: mbThreadLocalService
117: .setMBCategoryPersistence(mbCategoryPersistence);
118: }
119:
120: public static com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder getMBCategoryFinder() {
121: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
122: .getService();
123:
124: return mbThreadLocalService.getMBCategoryFinder();
125: }
126:
127: public static void setMBCategoryFinder(
128: com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder mbCategoryFinder) {
129: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
130: .getService();
131:
132: mbThreadLocalService.setMBCategoryFinder(mbCategoryFinder);
133: }
134:
135: public static com.liferay.portlet.messageboards.service.persistence.MBDiscussionPersistence getMBDiscussionPersistence() {
136: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
137: .getService();
138:
139: return mbThreadLocalService.getMBDiscussionPersistence();
140: }
141:
142: public static void setMBDiscussionPersistence(
143: com.liferay.portlet.messageboards.service.persistence.MBDiscussionPersistence mbDiscussionPersistence) {
144: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
145: .getService();
146:
147: mbThreadLocalService
148: .setMBDiscussionPersistence(mbDiscussionPersistence);
149: }
150:
151: public static com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence getMBMessagePersistence() {
152: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
153: .getService();
154:
155: return mbThreadLocalService.getMBMessagePersistence();
156: }
157:
158: public static void setMBMessagePersistence(
159: com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence mbMessagePersistence) {
160: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
161: .getService();
162:
163: mbThreadLocalService
164: .setMBMessagePersistence(mbMessagePersistence);
165: }
166:
167: public static com.liferay.portlet.messageboards.service.persistence.MBMessageFinder getMBMessageFinder() {
168: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
169: .getService();
170:
171: return mbThreadLocalService.getMBMessageFinder();
172: }
173:
174: public static void setMBMessageFinder(
175: com.liferay.portlet.messageboards.service.persistence.MBMessageFinder mbMessageFinder) {
176: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
177: .getService();
178:
179: mbThreadLocalService.setMBMessageFinder(mbMessageFinder);
180: }
181:
182: public static com.liferay.portlet.messageboards.service.persistence.MBMessageFlagPersistence getMBMessageFlagPersistence() {
183: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
184: .getService();
185:
186: return mbThreadLocalService.getMBMessageFlagPersistence();
187: }
188:
189: public static void setMBMessageFlagPersistence(
190: com.liferay.portlet.messageboards.service.persistence.MBMessageFlagPersistence mbMessageFlagPersistence) {
191: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
192: .getService();
193:
194: mbThreadLocalService
195: .setMBMessageFlagPersistence(mbMessageFlagPersistence);
196: }
197:
198: public static com.liferay.portlet.messageboards.service.persistence.MBMessageFlagFinder getMBMessageFlagFinder() {
199: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
200: .getService();
201:
202: return mbThreadLocalService.getMBMessageFlagFinder();
203: }
204:
205: public static void setMBMessageFlagFinder(
206: com.liferay.portlet.messageboards.service.persistence.MBMessageFlagFinder mbMessageFlagFinder) {
207: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
208: .getService();
209:
210: mbThreadLocalService
211: .setMBMessageFlagFinder(mbMessageFlagFinder);
212: }
213:
214: public static com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence getMBStatsUserPersistence() {
215: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
216: .getService();
217:
218: return mbThreadLocalService.getMBStatsUserPersistence();
219: }
220:
221: public static void setMBStatsUserPersistence(
222: com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence mbStatsUserPersistence) {
223: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
224: .getService();
225:
226: mbThreadLocalService
227: .setMBStatsUserPersistence(mbStatsUserPersistence);
228: }
229:
230: public static com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence getMBThreadPersistence() {
231: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
232: .getService();
233:
234: return mbThreadLocalService.getMBThreadPersistence();
235: }
236:
237: public static void setMBThreadPersistence(
238: com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence mbThreadPersistence) {
239: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
240: .getService();
241:
242: mbThreadLocalService
243: .setMBThreadPersistence(mbThreadPersistence);
244: }
245:
246: public static com.liferay.portlet.messageboards.service.persistence.MBThreadFinder getMBThreadFinder() {
247: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
248: .getService();
249:
250: return mbThreadLocalService.getMBThreadFinder();
251: }
252:
253: public static void setMBThreadFinder(
254: com.liferay.portlet.messageboards.service.persistence.MBThreadFinder mbThreadFinder) {
255: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
256: .getService();
257:
258: mbThreadLocalService.setMBThreadFinder(mbThreadFinder);
259: }
260:
261: public static com.liferay.portal.service.persistence.ActivityTrackerPersistence getActivityTrackerPersistence() {
262: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
263: .getService();
264:
265: return mbThreadLocalService.getActivityTrackerPersistence();
266: }
267:
268: public static void setActivityTrackerPersistence(
269: com.liferay.portal.service.persistence.ActivityTrackerPersistence activityTrackerPersistence) {
270: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
271: .getService();
272:
273: mbThreadLocalService
274: .setActivityTrackerPersistence(activityTrackerPersistence);
275: }
276:
277: public static com.liferay.portal.service.persistence.ActivityTrackerFinder getActivityTrackerFinder() {
278: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
279: .getService();
280:
281: return mbThreadLocalService.getActivityTrackerFinder();
282: }
283:
284: public static void setActivityTrackerFinder(
285: com.liferay.portal.service.persistence.ActivityTrackerFinder activityTrackerFinder) {
286: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
287: .getService();
288:
289: mbThreadLocalService
290: .setActivityTrackerFinder(activityTrackerFinder);
291: }
292:
293: public static com.liferay.portal.service.persistence.ResourcePersistence getResourcePersistence() {
294: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
295: .getService();
296:
297: return mbThreadLocalService.getResourcePersistence();
298: }
299:
300: public static void setResourcePersistence(
301: com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence) {
302: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
303: .getService();
304:
305: mbThreadLocalService
306: .setResourcePersistence(resourcePersistence);
307: }
308:
309: public static com.liferay.portal.service.persistence.ResourceFinder getResourceFinder() {
310: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
311: .getService();
312:
313: return mbThreadLocalService.getResourceFinder();
314: }
315:
316: public static void setResourceFinder(
317: com.liferay.portal.service.persistence.ResourceFinder resourceFinder) {
318: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
319: .getService();
320:
321: mbThreadLocalService.setResourceFinder(resourceFinder);
322: }
323:
324: public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
325: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
326: .getService();
327:
328: return mbThreadLocalService.getUserPersistence();
329: }
330:
331: public static void setUserPersistence(
332: com.liferay.portal.service.persistence.UserPersistence userPersistence) {
333: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
334: .getService();
335:
336: mbThreadLocalService.setUserPersistence(userPersistence);
337: }
338:
339: public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
340: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
341: .getService();
342:
343: return mbThreadLocalService.getUserFinder();
344: }
345:
346: public static void setUserFinder(
347: com.liferay.portal.service.persistence.UserFinder userFinder) {
348: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
349: .getService();
350:
351: mbThreadLocalService.setUserFinder(userFinder);
352: }
353:
354: public static com.liferay.portlet.tags.service.persistence.TagsAssetPersistence getTagsAssetPersistence() {
355: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
356: .getService();
357:
358: return mbThreadLocalService.getTagsAssetPersistence();
359: }
360:
361: public static void setTagsAssetPersistence(
362: com.liferay.portlet.tags.service.persistence.TagsAssetPersistence tagsAssetPersistence) {
363: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
364: .getService();
365:
366: mbThreadLocalService
367: .setTagsAssetPersistence(tagsAssetPersistence);
368: }
369:
370: public static com.liferay.portlet.tags.service.persistence.TagsAssetFinder getTagsAssetFinder() {
371: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
372: .getService();
373:
374: return mbThreadLocalService.getTagsAssetFinder();
375: }
376:
377: public static void setTagsAssetFinder(
378: com.liferay.portlet.tags.service.persistence.TagsAssetFinder tagsAssetFinder) {
379: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
380: .getService();
381:
382: mbThreadLocalService.setTagsAssetFinder(tagsAssetFinder);
383: }
384:
385: public static void afterPropertiesSet() {
386: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
387: .getService();
388:
389: mbThreadLocalService.afterPropertiesSet();
390: }
391:
392: public static void deleteThread(long threadId)
393: throws com.liferay.portal.PortalException,
394: com.liferay.portal.SystemException {
395: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
396: .getService();
397:
398: mbThreadLocalService.deleteThread(threadId);
399: }
400:
401: public static void deleteThread(
402: com.liferay.portlet.messageboards.model.MBThread thread)
403: throws com.liferay.portal.PortalException,
404: com.liferay.portal.SystemException {
405: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
406: .getService();
407:
408: mbThreadLocalService.deleteThread(thread);
409: }
410:
411: public static void deleteThreads(long categoryId)
412: throws com.liferay.portal.PortalException,
413: com.liferay.portal.SystemException {
414: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
415: .getService();
416:
417: mbThreadLocalService.deleteThreads(categoryId);
418: }
419:
420: public static int getCategoriesThreadsCount(
421: java.util.List categoryIds)
422: throws com.liferay.portal.SystemException {
423: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
424: .getService();
425:
426: return mbThreadLocalService
427: .getCategoriesThreadsCount(categoryIds);
428: }
429:
430: public static java.util.List getGroupThreads(long groupId,
431: int begin, int end)
432: throws com.liferay.portal.SystemException {
433: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
434: .getService();
435:
436: return mbThreadLocalService
437: .getGroupThreads(groupId, begin, end);
438: }
439:
440: public static java.util.List getGroupThreads(long groupId,
441: long userId, int begin, int end)
442: throws com.liferay.portal.SystemException {
443: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
444: .getService();
445:
446: return mbThreadLocalService.getGroupThreads(groupId, userId,
447: begin, end);
448: }
449:
450: public static java.util.List getGroupThreads(long groupId,
451: long userId, boolean subscribed, int begin, int end)
452: throws com.liferay.portal.SystemException {
453: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
454: .getService();
455:
456: return mbThreadLocalService.getGroupThreads(groupId, userId,
457: subscribed, begin, end);
458: }
459:
460: public static int getGroupThreadsCount(long groupId)
461: throws com.liferay.portal.SystemException {
462: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
463: .getService();
464:
465: return mbThreadLocalService.getGroupThreadsCount(groupId);
466: }
467:
468: public static int getGroupThreadsCount(long groupId, long userId)
469: throws com.liferay.portal.SystemException {
470: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
471: .getService();
472:
473: return mbThreadLocalService.getGroupThreadsCount(groupId,
474: userId);
475: }
476:
477: public static int getGroupThreadsCount(long groupId, long userId,
478: boolean subscribed)
479: throws com.liferay.portal.SystemException {
480: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
481: .getService();
482:
483: return mbThreadLocalService.getGroupThreadsCount(groupId,
484: userId, subscribed);
485: }
486:
487: public static com.liferay.portlet.messageboards.model.MBThread getThread(
488: long threadId) throws com.liferay.portal.PortalException,
489: com.liferay.portal.SystemException {
490: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
491: .getService();
492:
493: return mbThreadLocalService.getThread(threadId);
494: }
495:
496: public static java.util.List getThreads(long categoryId, int begin,
497: int end) throws com.liferay.portal.SystemException {
498: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
499: .getService();
500:
501: return mbThreadLocalService.getThreads(categoryId, begin, end);
502: }
503:
504: public static int getThreadsCount(long categoryId)
505: throws com.liferay.portal.SystemException {
506: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
507: .getService();
508:
509: return mbThreadLocalService.getThreadsCount(categoryId);
510: }
511:
512: public static boolean hasReadThread(long userId, long threadId)
513: throws com.liferay.portal.PortalException,
514: com.liferay.portal.SystemException {
515: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
516: .getService();
517:
518: return mbThreadLocalService.hasReadThread(userId, threadId);
519: }
520:
521: public static com.liferay.portlet.messageboards.model.MBThread moveThread(
522: long categoryId, long threadId)
523: throws com.liferay.portal.PortalException,
524: com.liferay.portal.SystemException {
525: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
526: .getService();
527:
528: return mbThreadLocalService.moveThread(categoryId, threadId);
529: }
530:
531: public static com.liferay.portlet.messageboards.model.MBThread splitThread(
532: long messageId, javax.portlet.PortletPreferences prefs,
533: com.liferay.portal.theme.ThemeDisplay themeDisplay)
534: throws com.liferay.portal.PortalException,
535: com.liferay.portal.SystemException {
536: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
537: .getService();
538:
539: return mbThreadLocalService.splitThread(messageId, prefs,
540: themeDisplay);
541: }
542:
543: public static com.liferay.portlet.messageboards.model.MBThread updateThread(
544: long threadId, int viewCount)
545: throws com.liferay.portal.PortalException,
546: com.liferay.portal.SystemException {
547: MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory
548: .getService();
549:
550: return mbThreadLocalService.updateThread(threadId, viewCount);
551: }
552: }
|