001
014
015 package com.liferay.portlet.messageboards.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020 import com.liferay.portal.kernel.util.ReferenceRegistry;
021
022
036 @ProviderType
037 public class MBThreadLocalServiceUtil {
038
043
044
050 public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
051 com.liferay.portlet.messageboards.model.MBThread mbThread) {
052 return getService().addMBThread(mbThread);
053 }
054
055 public static com.liferay.portlet.messageboards.model.MBThread addThread(
056 long categoryId,
057 com.liferay.portlet.messageboards.model.MBMessage message,
058 com.liferay.portal.service.ServiceContext serviceContext)
059 throws com.liferay.portal.kernel.exception.PortalException {
060 return getService().addThread(categoryId, message, serviceContext);
061 }
062
063
069 public static com.liferay.portlet.messageboards.model.MBThread createMBThread(
070 long threadId) {
071 return getService().createMBThread(threadId);
072 }
073
074
080 public static com.liferay.portlet.messageboards.model.MBThread deleteMBThread(
081 com.liferay.portlet.messageboards.model.MBThread mbThread) {
082 return getService().deleteMBThread(mbThread);
083 }
084
085
092 public static com.liferay.portlet.messageboards.model.MBThread deleteMBThread(
093 long threadId)
094 throws com.liferay.portal.kernel.exception.PortalException {
095 return getService().deleteMBThread(threadId);
096 }
097
098
101 public static com.liferay.portal.model.PersistedModel deletePersistedModel(
102 com.liferay.portal.model.PersistedModel persistedModel)
103 throws com.liferay.portal.kernel.exception.PortalException {
104 return getService().deletePersistedModel(persistedModel);
105 }
106
107 public static void deleteThread(
108 com.liferay.portlet.messageboards.model.MBThread thread)
109 throws com.liferay.portal.kernel.exception.PortalException {
110 getService().deleteThread(thread);
111 }
112
113 public static void deleteThread(long threadId)
114 throws com.liferay.portal.kernel.exception.PortalException {
115 getService().deleteThread(threadId);
116 }
117
118 public static void deleteThreads(long groupId, long categoryId)
119 throws com.liferay.portal.kernel.exception.PortalException {
120 getService().deleteThreads(groupId, categoryId);
121 }
122
123 public static void deleteThreads(long groupId, long categoryId,
124 boolean includeTrashedEntries)
125 throws com.liferay.portal.kernel.exception.PortalException {
126 getService().deleteThreads(groupId, categoryId, includeTrashedEntries);
127 }
128
129 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
130 return getService().dynamicQuery();
131 }
132
133
139 public static <T> java.util.List<T> dynamicQuery(
140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
141 return getService().dynamicQuery(dynamicQuery);
142 }
143
144
156 public static <T> java.util.List<T> dynamicQuery(
157 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
158 int end) {
159 return getService().dynamicQuery(dynamicQuery, start, end);
160 }
161
162
175 public static <T> java.util.List<T> dynamicQuery(
176 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
177 int end,
178 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
179 return getService()
180 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
181 }
182
183
189 public static long dynamicQueryCount(
190 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
191 return getService().dynamicQueryCount(dynamicQuery);
192 }
193
194
201 public static long dynamicQueryCount(
202 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
203 com.liferay.portal.kernel.dao.orm.Projection projection) {
204 return getService().dynamicQueryCount(dynamicQuery, projection);
205 }
206
207 public static com.liferay.portlet.messageboards.model.MBThread fetchMBThread(
208 long threadId) {
209 return getService().fetchMBThread(threadId);
210 }
211
212
219 public static com.liferay.portlet.messageboards.model.MBThread fetchMBThreadByUuidAndGroupId(
220 java.lang.String uuid, long groupId) {
221 return getService().fetchMBThreadByUuidAndGroupId(uuid, groupId);
222 }
223
224 public static com.liferay.portlet.messageboards.model.MBThread fetchThread(
225 long threadId) {
226 return getService().fetchThread(threadId);
227 }
228
229 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
230 return getService().getActionableDynamicQuery();
231 }
232
233 public static int getCategoryThreadsCount(long groupId, long categoryId,
234 int status) {
235 return getService().getCategoryThreadsCount(groupId, categoryId, status);
236 }
237
238 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
239 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
240 return getService().getExportActionableDynamicQuery(portletDataContext);
241 }
242
243 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
244 long groupId,
245 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
246 return getService().getGroupThreads(groupId, queryDefinition);
247 }
248
249
253 @Deprecated
254 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
255 long groupId, int status, int start, int end) {
256 return getService().getGroupThreads(groupId, status, start, end);
257 }
258
259 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
260 long groupId, long userId,
261 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
262 return getService().getGroupThreads(groupId, userId, queryDefinition);
263 }
264
265
269 @Deprecated
270 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
271 long groupId, long userId, int status, int start, int end) {
272 return getService().getGroupThreads(groupId, userId, status, start, end);
273 }
274
275
279 @Deprecated
280 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
281 long groupId, long userId, int status, boolean subscribed,
282 boolean includeAnonymous, int start, int end) {
283 return getService()
284 .getGroupThreads(groupId, userId, status, subscribed,
285 includeAnonymous, start, end);
286 }
287
288
292 @Deprecated
293 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
294 long groupId, long userId, int status, boolean subscribed, int start,
295 int end) {
296 return getService()
297 .getGroupThreads(groupId, userId, status, subscribed, start,
298 end);
299 }
300
301 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
302 long groupId, long userId, boolean subscribed,
303 boolean includeAnonymous,
304 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
305 return getService()
306 .getGroupThreads(groupId, userId, subscribed,
307 includeAnonymous, queryDefinition);
308 }
309
310 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
311 long groupId, long userId, boolean subscribed,
312 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
313 return getService()
314 .getGroupThreads(groupId, userId, subscribed, queryDefinition);
315 }
316
317 public static int getGroupThreadsCount(long groupId,
318 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
319 return getService().getGroupThreadsCount(groupId, queryDefinition);
320 }
321
322
326 @Deprecated
327 public static int getGroupThreadsCount(long groupId, int status) {
328 return getService().getGroupThreadsCount(groupId, status);
329 }
330
331 public static int getGroupThreadsCount(long groupId, long userId,
332 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
333 return getService()
334 .getGroupThreadsCount(groupId, userId, queryDefinition);
335 }
336
337
341 @Deprecated
342 public static int getGroupThreadsCount(long groupId, long userId, int status) {
343 return getService().getGroupThreadsCount(groupId, userId, status);
344 }
345
346
350 @Deprecated
351 public static int getGroupThreadsCount(long groupId, long userId,
352 int status, boolean subscribed) {
353 return getService()
354 .getGroupThreadsCount(groupId, userId, status, subscribed);
355 }
356
357
361 @Deprecated
362 public static int getGroupThreadsCount(long groupId, long userId,
363 int status, boolean subscribed, boolean includeAnonymous) {
364 return getService()
365 .getGroupThreadsCount(groupId, userId, status, subscribed,
366 includeAnonymous);
367 }
368
369 public static int getGroupThreadsCount(long groupId, long userId,
370 boolean subscribed, boolean includeAnonymous,
371 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
372 return getService()
373 .getGroupThreadsCount(groupId, userId, subscribed,
374 includeAnonymous, queryDefinition);
375 }
376
377 public static int getGroupThreadsCount(long groupId, long userId,
378 boolean subscribed,
379 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
380 return getService()
381 .getGroupThreadsCount(groupId, userId, subscribed,
382 queryDefinition);
383 }
384
385 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
386 return getService().getIndexableActionableDynamicQuery();
387 }
388
389
396 public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
397 long threadId)
398 throws com.liferay.portal.kernel.exception.PortalException {
399 return getService().getMBThread(threadId);
400 }
401
402
410 public static com.liferay.portlet.messageboards.model.MBThread getMBThreadByUuidAndGroupId(
411 java.lang.String uuid, long groupId)
412 throws com.liferay.portal.kernel.exception.PortalException {
413 return getService().getMBThreadByUuidAndGroupId(uuid, groupId);
414 }
415
416
427 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
428 int start, int end) {
429 return getService().getMBThreads(start, end);
430 }
431
432
439 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreadsByUuidAndCompanyId(
440 java.lang.String uuid, long companyId) {
441 return getService().getMBThreadsByUuidAndCompanyId(uuid, companyId);
442 }
443
444
454 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreadsByUuidAndCompanyId(
455 java.lang.String uuid, long companyId, int start, int end,
456 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBThread> orderByComparator) {
457 return getService()
458 .getMBThreadsByUuidAndCompanyId(uuid, companyId, start, end,
459 orderByComparator);
460 }
461
462
467 public static int getMBThreadsCount() {
468 return getService().getMBThreadsCount();
469 }
470
471 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getNoAssetThreads() {
472 return getService().getNoAssetThreads();
473 }
474
475
480 public static java.lang.String getOSGiServiceIdentifier() {
481 return getService().getOSGiServiceIdentifier();
482 }
483
484 public static com.liferay.portal.model.PersistedModel getPersistedModel(
485 java.io.Serializable primaryKeyObj)
486 throws com.liferay.portal.kernel.exception.PortalException {
487 return getService().getPersistedModel(primaryKeyObj);
488 }
489
490 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
491 long categoryId, double priority)
492 throws com.liferay.portal.kernel.exception.PortalException {
493 return getService().getPriorityThreads(categoryId, priority);
494 }
495
496 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
497 long categoryId, double priority, boolean inherit)
498 throws com.liferay.portal.kernel.exception.PortalException {
499 return getService().getPriorityThreads(categoryId, priority, inherit);
500 }
501
502 public static com.liferay.portlet.messageboards.model.MBThread getThread(
503 long threadId)
504 throws com.liferay.portal.kernel.exception.PortalException {
505 return getService().getThread(threadId);
506 }
507
508 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
509 long groupId, long categoryId, int status, int start, int end) {
510 return getService().getThreads(groupId, categoryId, status, start, end);
511 }
512
513 public static int getThreadsCount(long groupId, long categoryId, int status) {
514 return getService().getThreadsCount(groupId, categoryId, status);
515 }
516
517 public static boolean hasAnswerMessage(long threadId) {
518 return getService().hasAnswerMessage(threadId);
519 }
520
521 public static void incrementViewCounter(long threadId, int increment)
522 throws com.liferay.portal.kernel.exception.PortalException {
523 getService().incrementViewCounter(threadId, increment);
524 }
525
526 public static void moveDependentsToTrash(long groupId, long threadId,
527 long trashEntryId)
528 throws com.liferay.portal.kernel.exception.PortalException {
529 getService().moveDependentsToTrash(groupId, threadId, trashEntryId);
530 }
531
532 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
533 long groupId, long categoryId, long threadId)
534 throws com.liferay.portal.kernel.exception.PortalException {
535 return getService().moveThread(groupId, categoryId, threadId);
536 }
537
538 public static com.liferay.portlet.messageboards.model.MBThread moveThreadFromTrash(
539 long userId, long categoryId, long threadId)
540 throws com.liferay.portal.kernel.exception.PortalException {
541 return getService().moveThreadFromTrash(userId, categoryId, threadId);
542 }
543
544 public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
545 long userId, com.liferay.portlet.messageboards.model.MBThread thread)
546 throws com.liferay.portal.kernel.exception.PortalException {
547 return getService().moveThreadToTrash(userId, thread);
548 }
549
550 public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
551 long userId, long threadId)
552 throws com.liferay.portal.kernel.exception.PortalException {
553 return getService().moveThreadToTrash(userId, threadId);
554 }
555
556 public static void moveThreadsToTrash(long groupId, long userId)
557 throws com.liferay.portal.kernel.exception.PortalException {
558 getService().moveThreadsToTrash(groupId, userId);
559 }
560
561 public static void restoreDependentsFromTrash(long groupId, long threadId)
562 throws com.liferay.portal.kernel.exception.PortalException {
563 getService().restoreDependentsFromTrash(groupId, threadId);
564 }
565
566
570 @Deprecated
571 public static void restoreDependentsFromTrash(long groupId, long threadId,
572 long trashEntryId)
573 throws com.liferay.portal.kernel.exception.PortalException {
574 getService().restoreDependentsFromTrash(groupId, threadId, trashEntryId);
575 }
576
577 public static void restoreThreadFromTrash(long userId, long threadId)
578 throws com.liferay.portal.kernel.exception.PortalException {
579 getService().restoreThreadFromTrash(userId, threadId);
580 }
581
582 public static com.liferay.portal.kernel.search.Hits search(long groupId,
583 long userId, long creatorUserId, long startDate, long endDate,
584 int status, int start, int end)
585 throws com.liferay.portal.kernel.exception.PortalException {
586 return getService()
587 .search(groupId, userId, creatorUserId, startDate, endDate,
588 status, start, end);
589 }
590
591 public static com.liferay.portal.kernel.search.Hits search(long groupId,
592 long userId, long creatorUserId, int status, int start, int end)
593 throws com.liferay.portal.kernel.exception.PortalException {
594 return getService()
595 .search(groupId, userId, creatorUserId, status, start, end);
596 }
597
598 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
599 long userId, long messageId, java.lang.String subject,
600 com.liferay.portal.service.ServiceContext serviceContext)
601 throws com.liferay.portal.kernel.exception.PortalException {
602 return getService()
603 .splitThread(userId, messageId, subject, serviceContext);
604 }
605
606
612 public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
613 com.liferay.portlet.messageboards.model.MBThread mbThread) {
614 return getService().updateMBThread(mbThread);
615 }
616
617 public static com.liferay.portlet.messageboards.model.MBThread updateMessageCount(
618 long threadId) {
619 return getService().updateMessageCount(threadId);
620 }
621
622 public static void updateQuestion(long threadId, boolean question)
623 throws com.liferay.portal.kernel.exception.PortalException {
624 getService().updateQuestion(threadId, question);
625 }
626
627 public static com.liferay.portlet.messageboards.model.MBThread updateStatus(
628 long userId, long threadId, int status)
629 throws com.liferay.portal.kernel.exception.PortalException {
630 return getService().updateStatus(userId, threadId, status);
631 }
632
633
637 @Deprecated
638 public static com.liferay.portlet.messageboards.model.MBThread updateThread(
639 long threadId, int viewCount)
640 throws com.liferay.portal.kernel.exception.PortalException {
641 return getService().updateThread(threadId, viewCount);
642 }
643
644 public static MBThreadLocalService getService() {
645 if (_service == null) {
646 _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
647
648 ReferenceRegistry.registerReference(MBThreadLocalServiceUtil.class,
649 "_service");
650 }
651
652 return _service;
653 }
654
655 private static MBThreadLocalService _service;
656 }