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
238 public static java.lang.String getBeanIdentifier() {
239 return getService().getBeanIdentifier();
240 }
241
242 public static int getCategoryThreadsCount(long groupId, long categoryId,
243 int status) {
244 return getService().getCategoryThreadsCount(groupId, categoryId, status);
245 }
246
247 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
248 com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
249 return getService().getExportActionableDynamicQuery(portletDataContext);
250 }
251
252 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
253 long groupId,
254 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
255 return getService().getGroupThreads(groupId, queryDefinition);
256 }
257
258
262 @Deprecated
263 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
264 long groupId, int status, int start, int end) {
265 return getService().getGroupThreads(groupId, status, start, end);
266 }
267
268 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
269 long groupId, long userId,
270 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
271 return getService().getGroupThreads(groupId, userId, queryDefinition);
272 }
273
274
278 @Deprecated
279 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
280 long groupId, long userId, int status, int start, int end) {
281 return getService().getGroupThreads(groupId, userId, status, start, end);
282 }
283
284
288 @Deprecated
289 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
290 long groupId, long userId, int status, boolean subscribed,
291 boolean includeAnonymous, int start, int end) {
292 return getService()
293 .getGroupThreads(groupId, userId, status, subscribed,
294 includeAnonymous, start, end);
295 }
296
297
301 @Deprecated
302 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
303 long groupId, long userId, int status, boolean subscribed, int start,
304 int end) {
305 return getService()
306 .getGroupThreads(groupId, userId, status, subscribed, start,
307 end);
308 }
309
310 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
311 long groupId, long userId, boolean subscribed,
312 boolean includeAnonymous,
313 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
314 return getService()
315 .getGroupThreads(groupId, userId, subscribed,
316 includeAnonymous, queryDefinition);
317 }
318
319 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
320 long groupId, long userId, boolean subscribed,
321 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
322 return getService()
323 .getGroupThreads(groupId, userId, subscribed, queryDefinition);
324 }
325
326 public static int getGroupThreadsCount(long groupId,
327 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
328 return getService().getGroupThreadsCount(groupId, queryDefinition);
329 }
330
331
335 @Deprecated
336 public static int getGroupThreadsCount(long groupId, int status) {
337 return getService().getGroupThreadsCount(groupId, status);
338 }
339
340 public static int getGroupThreadsCount(long groupId, long userId,
341 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
342 return getService()
343 .getGroupThreadsCount(groupId, userId, queryDefinition);
344 }
345
346
350 @Deprecated
351 public static int getGroupThreadsCount(long groupId, long userId, int status) {
352 return getService().getGroupThreadsCount(groupId, userId, status);
353 }
354
355
359 @Deprecated
360 public static int getGroupThreadsCount(long groupId, long userId,
361 int status, boolean subscribed) {
362 return getService()
363 .getGroupThreadsCount(groupId, userId, status, subscribed);
364 }
365
366
370 @Deprecated
371 public static int getGroupThreadsCount(long groupId, long userId,
372 int status, boolean subscribed, boolean includeAnonymous) {
373 return getService()
374 .getGroupThreadsCount(groupId, userId, status, subscribed,
375 includeAnonymous);
376 }
377
378 public static int getGroupThreadsCount(long groupId, long userId,
379 boolean subscribed, boolean includeAnonymous,
380 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
381 return getService()
382 .getGroupThreadsCount(groupId, userId, subscribed,
383 includeAnonymous, queryDefinition);
384 }
385
386 public static int getGroupThreadsCount(long groupId, long userId,
387 boolean subscribed,
388 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
389 return getService()
390 .getGroupThreadsCount(groupId, userId, subscribed,
391 queryDefinition);
392 }
393
394
401 public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
402 long threadId)
403 throws com.liferay.portal.kernel.exception.PortalException {
404 return getService().getMBThread(threadId);
405 }
406
407
415 public static com.liferay.portlet.messageboards.model.MBThread getMBThreadByUuidAndGroupId(
416 java.lang.String uuid, long groupId)
417 throws com.liferay.portal.kernel.exception.PortalException {
418 return getService().getMBThreadByUuidAndGroupId(uuid, groupId);
419 }
420
421
432 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
433 int start, int end) {
434 return getService().getMBThreads(start, end);
435 }
436
437 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreadsByUuidAndCompanyId(
438 java.lang.String uuid, long companyId) {
439 return getService().getMBThreadsByUuidAndCompanyId(uuid, companyId);
440 }
441
442 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreadsByUuidAndCompanyId(
443 java.lang.String uuid, long companyId, int start, int end,
444 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBThread> orderByComparator) {
445 return getService()
446 .getMBThreadsByUuidAndCompanyId(uuid, companyId, start, end,
447 orderByComparator);
448 }
449
450
455 public static int getMBThreadsCount() {
456 return getService().getMBThreadsCount();
457 }
458
459 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getNoAssetThreads() {
460 return getService().getNoAssetThreads();
461 }
462
463 public static com.liferay.portal.model.PersistedModel getPersistedModel(
464 java.io.Serializable primaryKeyObj)
465 throws com.liferay.portal.kernel.exception.PortalException {
466 return getService().getPersistedModel(primaryKeyObj);
467 }
468
469 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
470 long categoryId, double priority)
471 throws com.liferay.portal.kernel.exception.PortalException {
472 return getService().getPriorityThreads(categoryId, priority);
473 }
474
475 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
476 long categoryId, double priority, boolean inherit)
477 throws com.liferay.portal.kernel.exception.PortalException {
478 return getService().getPriorityThreads(categoryId, priority, inherit);
479 }
480
481 public static com.liferay.portlet.messageboards.model.MBThread getThread(
482 long threadId)
483 throws com.liferay.portal.kernel.exception.PortalException {
484 return getService().getThread(threadId);
485 }
486
487 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
488 long groupId, long categoryId, int status, int start, int end) {
489 return getService().getThreads(groupId, categoryId, status, start, end);
490 }
491
492 public static int getThreadsCount(long groupId, long categoryId, int status) {
493 return getService().getThreadsCount(groupId, categoryId, status);
494 }
495
496 public static boolean hasAnswerMessage(long threadId) {
497 return getService().hasAnswerMessage(threadId);
498 }
499
500 public static void incrementViewCounter(long threadId, int increment)
501 throws com.liferay.portal.kernel.exception.PortalException {
502 getService().incrementViewCounter(threadId, increment);
503 }
504
505 public static void moveDependentsToTrash(long groupId, long threadId,
506 long trashEntryId)
507 throws com.liferay.portal.kernel.exception.PortalException {
508 getService().moveDependentsToTrash(groupId, threadId, trashEntryId);
509 }
510
511 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
512 long groupId, long categoryId, long threadId)
513 throws com.liferay.portal.kernel.exception.PortalException {
514 return getService().moveThread(groupId, categoryId, threadId);
515 }
516
517 public static com.liferay.portlet.messageboards.model.MBThread moveThreadFromTrash(
518 long userId, long categoryId, long threadId)
519 throws com.liferay.portal.kernel.exception.PortalException {
520 return getService().moveThreadFromTrash(userId, categoryId, threadId);
521 }
522
523 public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
524 long userId, com.liferay.portlet.messageboards.model.MBThread thread)
525 throws com.liferay.portal.kernel.exception.PortalException {
526 return getService().moveThreadToTrash(userId, thread);
527 }
528
529 public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
530 long userId, long threadId)
531 throws com.liferay.portal.kernel.exception.PortalException {
532 return getService().moveThreadToTrash(userId, threadId);
533 }
534
535 public static void moveThreadsToTrash(long groupId, long userId)
536 throws com.liferay.portal.kernel.exception.PortalException {
537 getService().moveThreadsToTrash(groupId, userId);
538 }
539
540 public static void restoreDependentsFromTrash(long groupId, long threadId)
541 throws com.liferay.portal.kernel.exception.PortalException {
542 getService().restoreDependentsFromTrash(groupId, threadId);
543 }
544
545
549 @Deprecated
550 public static void restoreDependentsFromTrash(long groupId, long threadId,
551 long trashEntryId)
552 throws com.liferay.portal.kernel.exception.PortalException {
553 getService().restoreDependentsFromTrash(groupId, threadId, trashEntryId);
554 }
555
556 public static void restoreThreadFromTrash(long userId, long threadId)
557 throws com.liferay.portal.kernel.exception.PortalException {
558 getService().restoreThreadFromTrash(userId, threadId);
559 }
560
561 public static com.liferay.portal.kernel.search.Hits search(long groupId,
562 long userId, long creatorUserId, long startDate, long endDate,
563 int status, int start, int end)
564 throws com.liferay.portal.kernel.exception.PortalException {
565 return getService()
566 .search(groupId, userId, creatorUserId, startDate, endDate,
567 status, start, end);
568 }
569
570 public static com.liferay.portal.kernel.search.Hits search(long groupId,
571 long userId, long creatorUserId, int status, int start, int end)
572 throws com.liferay.portal.kernel.exception.PortalException {
573 return getService()
574 .search(groupId, userId, creatorUserId, status, start, end);
575 }
576
577
582 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
583 getService().setBeanIdentifier(beanIdentifier);
584 }
585
586 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
587 long messageId, java.lang.String subject,
588 com.liferay.portal.service.ServiceContext serviceContext)
589 throws com.liferay.portal.kernel.exception.PortalException {
590 return getService().splitThread(messageId, subject, serviceContext);
591 }
592
593
599 public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
600 com.liferay.portlet.messageboards.model.MBThread mbThread) {
601 return getService().updateMBThread(mbThread);
602 }
603
604 public static void updateQuestion(long threadId, boolean question)
605 throws com.liferay.portal.kernel.exception.PortalException {
606 getService().updateQuestion(threadId, question);
607 }
608
609 public static com.liferay.portlet.messageboards.model.MBThread updateStatus(
610 long userId, long threadId, int status)
611 throws com.liferay.portal.kernel.exception.PortalException {
612 return getService().updateStatus(userId, threadId, status);
613 }
614
615
619 @Deprecated
620 public static com.liferay.portlet.messageboards.model.MBThread updateThread(
621 long threadId, int viewCount)
622 throws com.liferay.portal.kernel.exception.PortalException {
623 return getService().updateThread(threadId, viewCount);
624 }
625
626 public static MBThreadLocalService getService() {
627 if (_service == null) {
628 _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
629
630 ReferenceRegistry.registerReference(MBThreadLocalServiceUtil.class,
631 "_service");
632 }
633
634 return _service;
635 }
636
637
640 @Deprecated
641 public void setService(MBThreadLocalService service) {
642 }
643
644 private static MBThreadLocalService _service;
645 }