001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
034 public class MBThreadLocalServiceUtil {
035
040
041
048 public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
049 com.liferay.portlet.messageboards.model.MBThread mbThread)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addMBThread(mbThread);
052 }
053
054
060 public static com.liferay.portlet.messageboards.model.MBThread createMBThread(
061 long threadId) {
062 return getService().createMBThread(threadId);
063 }
064
065
073 public static com.liferay.portlet.messageboards.model.MBThread deleteMBThread(
074 long threadId)
075 throws com.liferay.portal.kernel.exception.PortalException,
076 com.liferay.portal.kernel.exception.SystemException {
077 return getService().deleteMBThread(threadId);
078 }
079
080
087 public static com.liferay.portlet.messageboards.model.MBThread deleteMBThread(
088 com.liferay.portlet.messageboards.model.MBThread mbThread)
089 throws com.liferay.portal.kernel.exception.SystemException {
090 return getService().deleteMBThread(mbThread);
091 }
092
093 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
094 return getService().dynamicQuery();
095 }
096
097
104 @SuppressWarnings("rawtypes")
105 public static java.util.List dynamicQuery(
106 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
107 throws com.liferay.portal.kernel.exception.SystemException {
108 return getService().dynamicQuery(dynamicQuery);
109 }
110
111
124 @SuppressWarnings("rawtypes")
125 public static java.util.List dynamicQuery(
126 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
127 int end) throws com.liferay.portal.kernel.exception.SystemException {
128 return getService().dynamicQuery(dynamicQuery, start, end);
129 }
130
131
145 @SuppressWarnings("rawtypes")
146 public static java.util.List dynamicQuery(
147 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
148 int end,
149 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150 throws com.liferay.portal.kernel.exception.SystemException {
151 return getService()
152 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
153 }
154
155
162 public static long dynamicQueryCount(
163 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
164 throws com.liferay.portal.kernel.exception.SystemException {
165 return getService().dynamicQueryCount(dynamicQuery);
166 }
167
168
176 public static long dynamicQueryCount(
177 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
178 com.liferay.portal.kernel.dao.orm.Projection projection)
179 throws com.liferay.portal.kernel.exception.SystemException {
180 return getService().dynamicQueryCount(dynamicQuery, projection);
181 }
182
183 public static com.liferay.portlet.messageboards.model.MBThread fetchMBThread(
184 long threadId)
185 throws com.liferay.portal.kernel.exception.SystemException {
186 return getService().fetchMBThread(threadId);
187 }
188
189
197 public static com.liferay.portlet.messageboards.model.MBThread fetchMBThreadByUuidAndCompanyId(
198 java.lang.String uuid, long companyId)
199 throws com.liferay.portal.kernel.exception.SystemException {
200 return getService().fetchMBThreadByUuidAndCompanyId(uuid, companyId);
201 }
202
203
211 public static com.liferay.portlet.messageboards.model.MBThread fetchMBThreadByUuidAndGroupId(
212 java.lang.String uuid, long groupId)
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getService().fetchMBThreadByUuidAndGroupId(uuid, groupId);
215 }
216
217
225 public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
226 long threadId)
227 throws com.liferay.portal.kernel.exception.PortalException,
228 com.liferay.portal.kernel.exception.SystemException {
229 return getService().getMBThread(threadId);
230 }
231
232 public static com.liferay.portal.model.PersistedModel getPersistedModel(
233 java.io.Serializable primaryKeyObj)
234 throws com.liferay.portal.kernel.exception.PortalException,
235 com.liferay.portal.kernel.exception.SystemException {
236 return getService().getPersistedModel(primaryKeyObj);
237 }
238
239
248 public static com.liferay.portlet.messageboards.model.MBThread getMBThreadByUuidAndCompanyId(
249 java.lang.String uuid, long companyId)
250 throws com.liferay.portal.kernel.exception.PortalException,
251 com.liferay.portal.kernel.exception.SystemException {
252 return getService().getMBThreadByUuidAndCompanyId(uuid, companyId);
253 }
254
255
264 public static com.liferay.portlet.messageboards.model.MBThread getMBThreadByUuidAndGroupId(
265 java.lang.String uuid, long groupId)
266 throws com.liferay.portal.kernel.exception.PortalException,
267 com.liferay.portal.kernel.exception.SystemException {
268 return getService().getMBThreadByUuidAndGroupId(uuid, groupId);
269 }
270
271
283 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
284 int start, int end)
285 throws com.liferay.portal.kernel.exception.SystemException {
286 return getService().getMBThreads(start, end);
287 }
288
289
295 public static int getMBThreadsCount()
296 throws com.liferay.portal.kernel.exception.SystemException {
297 return getService().getMBThreadsCount();
298 }
299
300
307 public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
308 com.liferay.portlet.messageboards.model.MBThread mbThread)
309 throws com.liferay.portal.kernel.exception.SystemException {
310 return getService().updateMBThread(mbThread);
311 }
312
313
318 public static java.lang.String getBeanIdentifier() {
319 return getService().getBeanIdentifier();
320 }
321
322
327 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
328 getService().setBeanIdentifier(beanIdentifier);
329 }
330
331 public static com.liferay.portlet.messageboards.model.MBThread addThread(
332 long categoryId,
333 com.liferay.portlet.messageboards.model.MBMessage message,
334 com.liferay.portal.service.ServiceContext serviceContext)
335 throws com.liferay.portal.kernel.exception.PortalException,
336 com.liferay.portal.kernel.exception.SystemException {
337 return getService().addThread(categoryId, message, serviceContext);
338 }
339
340 public static void deleteThread(long threadId)
341 throws com.liferay.portal.kernel.exception.PortalException,
342 com.liferay.portal.kernel.exception.SystemException {
343 getService().deleteThread(threadId);
344 }
345
346 public static void deleteThread(
347 com.liferay.portlet.messageboards.model.MBThread thread)
348 throws com.liferay.portal.kernel.exception.PortalException,
349 com.liferay.portal.kernel.exception.SystemException {
350 getService().deleteThread(thread);
351 }
352
353 public static void deleteThreads(long groupId, long categoryId)
354 throws com.liferay.portal.kernel.exception.PortalException,
355 com.liferay.portal.kernel.exception.SystemException {
356 getService().deleteThreads(groupId, categoryId);
357 }
358
359 public static void deleteThreads(long groupId, long categoryId,
360 boolean includeTrashedEntries)
361 throws com.liferay.portal.kernel.exception.PortalException,
362 com.liferay.portal.kernel.exception.SystemException {
363 getService().deleteThreads(groupId, categoryId, includeTrashedEntries);
364 }
365
366 public static com.liferay.portlet.messageboards.model.MBThread fetchThread(
367 long threadId)
368 throws com.liferay.portal.kernel.exception.SystemException {
369 return getService().fetchThread(threadId);
370 }
371
372 public static int getCategoryThreadsCount(long groupId, long categoryId,
373 int status) throws com.liferay.portal.kernel.exception.SystemException {
374 return getService().getCategoryThreadsCount(groupId, categoryId, status);
375 }
376
377
381 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
382 long groupId, int status, int start, int end)
383 throws com.liferay.portal.kernel.exception.SystemException {
384 return getService().getGroupThreads(groupId, status, start, end);
385 }
386
387 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
388 long groupId, long userId, boolean subscribed,
389 boolean includeAnonymous,
390 com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
391 throws com.liferay.portal.kernel.exception.SystemException {
392 return getService()
393 .getGroupThreads(groupId, userId, subscribed,
394 includeAnonymous, queryDefinition);
395 }
396
397 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
398 long groupId, long userId, boolean subscribed,
399 com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
400 throws com.liferay.portal.kernel.exception.SystemException {
401 return getService()
402 .getGroupThreads(groupId, userId, subscribed, queryDefinition);
403 }
404
405
409 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
410 long groupId, long userId, int status, boolean subscribed,
411 boolean includeAnonymous, int start, int end)
412 throws com.liferay.portal.kernel.exception.SystemException {
413 return getService()
414 .getGroupThreads(groupId, userId, status, subscribed,
415 includeAnonymous, start, end);
416 }
417
418
422 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
423 long groupId, long userId, int status, boolean subscribed, int start,
424 int end) throws com.liferay.portal.kernel.exception.SystemException {
425 return getService()
426 .getGroupThreads(groupId, userId, status, subscribed, start,
427 end);
428 }
429
430
434 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
435 long groupId, long userId, int status, int start, int end)
436 throws com.liferay.portal.kernel.exception.SystemException {
437 return getService().getGroupThreads(groupId, userId, status, start, end);
438 }
439
440 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
441 long groupId, long userId,
442 com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
443 throws com.liferay.portal.kernel.exception.SystemException {
444 return getService().getGroupThreads(groupId, userId, queryDefinition);
445 }
446
447 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
448 long groupId,
449 com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
450 throws com.liferay.portal.kernel.exception.SystemException {
451 return getService().getGroupThreads(groupId, queryDefinition);
452 }
453
454
458 public static int getGroupThreadsCount(long groupId, int status)
459 throws com.liferay.portal.kernel.exception.SystemException {
460 return getService().getGroupThreadsCount(groupId, status);
461 }
462
463 public static int getGroupThreadsCount(long groupId, long userId,
464 boolean subscribed, boolean includeAnonymous,
465 com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
466 throws com.liferay.portal.kernel.exception.SystemException {
467 return getService()
468 .getGroupThreadsCount(groupId, userId, subscribed,
469 includeAnonymous, queryDefinition);
470 }
471
472 public static int getGroupThreadsCount(long groupId, long userId,
473 boolean subscribed,
474 com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
475 throws com.liferay.portal.kernel.exception.SystemException {
476 return getService()
477 .getGroupThreadsCount(groupId, userId, subscribed,
478 queryDefinition);
479 }
480
481
485 public static int getGroupThreadsCount(long groupId, long userId, int status)
486 throws com.liferay.portal.kernel.exception.SystemException {
487 return getService().getGroupThreadsCount(groupId, userId, status);
488 }
489
490
494 public static int getGroupThreadsCount(long groupId, long userId,
495 int status, boolean subscribed)
496 throws com.liferay.portal.kernel.exception.SystemException {
497 return getService()
498 .getGroupThreadsCount(groupId, userId, status, subscribed);
499 }
500
501
505 public static int getGroupThreadsCount(long groupId, long userId,
506 int status, boolean subscribed, boolean includeAnonymous)
507 throws com.liferay.portal.kernel.exception.SystemException {
508 return getService()
509 .getGroupThreadsCount(groupId, userId, status, subscribed,
510 includeAnonymous);
511 }
512
513 public static int getGroupThreadsCount(long groupId, long userId,
514 com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
515 throws com.liferay.portal.kernel.exception.SystemException {
516 return getService()
517 .getGroupThreadsCount(groupId, userId, queryDefinition);
518 }
519
520 public static int getGroupThreadsCount(long groupId,
521 com.liferay.portal.kernel.dao.orm.QueryDefinition queryDefinition)
522 throws com.liferay.portal.kernel.exception.SystemException {
523 return getService().getGroupThreadsCount(groupId, queryDefinition);
524 }
525
526 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getNoAssetThreads()
527 throws com.liferay.portal.kernel.exception.SystemException {
528 return getService().getNoAssetThreads();
529 }
530
531 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
532 long categoryId, double priority)
533 throws com.liferay.portal.kernel.exception.PortalException,
534 com.liferay.portal.kernel.exception.SystemException {
535 return getService().getPriorityThreads(categoryId, priority);
536 }
537
538 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
539 long categoryId, double priority, boolean inherit)
540 throws com.liferay.portal.kernel.exception.PortalException,
541 com.liferay.portal.kernel.exception.SystemException {
542 return getService().getPriorityThreads(categoryId, priority, inherit);
543 }
544
545 public static com.liferay.portlet.messageboards.model.MBThread getThread(
546 long threadId)
547 throws com.liferay.portal.kernel.exception.PortalException,
548 com.liferay.portal.kernel.exception.SystemException {
549 return getService().getThread(threadId);
550 }
551
552 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
553 long groupId, long categoryId, int status, int start, int end)
554 throws com.liferay.portal.kernel.exception.SystemException {
555 return getService().getThreads(groupId, categoryId, status, start, end);
556 }
557
558 public static int getThreadsCount(long groupId, long categoryId, int status)
559 throws com.liferay.portal.kernel.exception.SystemException {
560 return getService().getThreadsCount(groupId, categoryId, status);
561 }
562
563 public static boolean hasAnswerMessage(long threadId)
564 throws com.liferay.portal.kernel.exception.SystemException {
565 return getService().hasAnswerMessage(threadId);
566 }
567
568 public static com.liferay.portlet.messageboards.model.MBThread incrementViewCounter(
569 long threadId, int increment)
570 throws com.liferay.portal.kernel.exception.PortalException,
571 com.liferay.portal.kernel.exception.SystemException {
572 return getService().incrementViewCounter(threadId, increment);
573 }
574
575 public static void moveDependentsToTrash(long groupId, long threadId,
576 long trashEntryId)
577 throws com.liferay.portal.kernel.exception.PortalException,
578 com.liferay.portal.kernel.exception.SystemException {
579 getService().moveDependentsToTrash(groupId, threadId, trashEntryId);
580 }
581
582 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
583 long groupId, long categoryId, long threadId)
584 throws com.liferay.portal.kernel.exception.PortalException,
585 com.liferay.portal.kernel.exception.SystemException {
586 return getService().moveThread(groupId, categoryId, threadId);
587 }
588
589 public static com.liferay.portlet.messageboards.model.MBThread moveThreadFromTrash(
590 long userId, long categoryId, long threadId)
591 throws com.liferay.portal.kernel.exception.PortalException,
592 com.liferay.portal.kernel.exception.SystemException {
593 return getService().moveThreadFromTrash(userId, categoryId, threadId);
594 }
595
596 public static void moveThreadsToTrash(long groupId, long userId)
597 throws com.liferay.portal.kernel.exception.PortalException,
598 com.liferay.portal.kernel.exception.SystemException {
599 getService().moveThreadsToTrash(groupId, userId);
600 }
601
602 public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
603 long userId, long threadId)
604 throws com.liferay.portal.kernel.exception.PortalException,
605 com.liferay.portal.kernel.exception.SystemException {
606 return getService().moveThreadToTrash(userId, threadId);
607 }
608
609 public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
610 long userId, com.liferay.portlet.messageboards.model.MBThread thread)
611 throws com.liferay.portal.kernel.exception.PortalException,
612 com.liferay.portal.kernel.exception.SystemException {
613 return getService().moveThreadToTrash(userId, thread);
614 }
615
616 public static void restoreDependentsFromTrash(long groupId, long threadId,
617 long trashEntryId)
618 throws com.liferay.portal.kernel.exception.PortalException,
619 com.liferay.portal.kernel.exception.SystemException {
620 getService().restoreDependentsFromTrash(groupId, threadId, trashEntryId);
621 }
622
623 public static void restoreThreadFromTrash(long userId, long threadId)
624 throws com.liferay.portal.kernel.exception.PortalException,
625 com.liferay.portal.kernel.exception.SystemException {
626 getService().restoreThreadFromTrash(userId, threadId);
627 }
628
629 public static com.liferay.portal.kernel.search.Hits search(long groupId,
630 long userId, long creatorUserId, int status, int start, int end)
631 throws com.liferay.portal.kernel.exception.PortalException,
632 com.liferay.portal.kernel.exception.SystemException {
633 return getService()
634 .search(groupId, userId, creatorUserId, status, start, end);
635 }
636
637 public static com.liferay.portal.kernel.search.Hits search(long groupId,
638 long userId, long creatorUserId, long startDate, long endDate,
639 int status, int start, int end)
640 throws com.liferay.portal.kernel.exception.PortalException,
641 com.liferay.portal.kernel.exception.SystemException {
642 return getService()
643 .search(groupId, userId, creatorUserId, startDate, endDate,
644 status, start, end);
645 }
646
647 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
648 long messageId, java.lang.String subject,
649 com.liferay.portal.service.ServiceContext serviceContext)
650 throws com.liferay.portal.kernel.exception.PortalException,
651 com.liferay.portal.kernel.exception.SystemException {
652 return getService().splitThread(messageId, subject, serviceContext);
653 }
654
655 public static void updateQuestion(long threadId, boolean question)
656 throws com.liferay.portal.kernel.exception.PortalException,
657 com.liferay.portal.kernel.exception.SystemException {
658 getService().updateQuestion(threadId, question);
659 }
660
661 public static com.liferay.portlet.messageboards.model.MBThread updateStatus(
662 long userId, long threadId, int status)
663 throws com.liferay.portal.kernel.exception.PortalException,
664 com.liferay.portal.kernel.exception.SystemException {
665 return getService().updateStatus(userId, threadId, status);
666 }
667
668
672 public static com.liferay.portlet.messageboards.model.MBThread updateThread(
673 long threadId, int viewCount)
674 throws com.liferay.portal.kernel.exception.PortalException,
675 com.liferay.portal.kernel.exception.SystemException {
676 return getService().updateThread(threadId, viewCount);
677 }
678
679 public static MBThreadLocalService getService() {
680 if (_service == null) {
681 _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
682
683 ReferenceRegistry.registerReference(MBThreadLocalServiceUtil.class,
684 "_service");
685 }
686
687 return _service;
688 }
689
690
693 public void setService(MBThreadLocalService service) {
694 }
695
696 private static MBThreadLocalService _service;
697 }