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 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
250 long groupId, long userId,
251 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
252 return getService().getGroupThreads(groupId, userId, queryDefinition);
253 }
254
255 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
256 long groupId, long userId, boolean subscribed,
257 boolean includeAnonymous,
258 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
259 return getService()
260 .getGroupThreads(groupId, userId, subscribed,
261 includeAnonymous, queryDefinition);
262 }
263
264 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
265 long groupId, long userId, boolean subscribed,
266 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
267 return getService()
268 .getGroupThreads(groupId, userId, subscribed, queryDefinition);
269 }
270
271 public static int getGroupThreadsCount(long groupId,
272 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
273 return getService().getGroupThreadsCount(groupId, queryDefinition);
274 }
275
276 public static int getGroupThreadsCount(long groupId, long userId,
277 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
278 return getService()
279 .getGroupThreadsCount(groupId, userId, queryDefinition);
280 }
281
282 public static int getGroupThreadsCount(long groupId, long userId,
283 boolean subscribed, boolean includeAnonymous,
284 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
285 return getService()
286 .getGroupThreadsCount(groupId, userId, subscribed,
287 includeAnonymous, queryDefinition);
288 }
289
290 public static int getGroupThreadsCount(long groupId, long userId,
291 boolean subscribed,
292 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
293 return getService()
294 .getGroupThreadsCount(groupId, userId, subscribed,
295 queryDefinition);
296 }
297
298 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
299 return getService().getIndexableActionableDynamicQuery();
300 }
301
302
309 public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
310 long threadId)
311 throws com.liferay.portal.kernel.exception.PortalException {
312 return getService().getMBThread(threadId);
313 }
314
315
323 public static com.liferay.portlet.messageboards.model.MBThread getMBThreadByUuidAndGroupId(
324 java.lang.String uuid, long groupId)
325 throws com.liferay.portal.kernel.exception.PortalException {
326 return getService().getMBThreadByUuidAndGroupId(uuid, groupId);
327 }
328
329
340 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
341 int start, int end) {
342 return getService().getMBThreads(start, end);
343 }
344
345
352 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreadsByUuidAndCompanyId(
353 java.lang.String uuid, long companyId) {
354 return getService().getMBThreadsByUuidAndCompanyId(uuid, companyId);
355 }
356
357
367 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreadsByUuidAndCompanyId(
368 java.lang.String uuid, long companyId, int start, int end,
369 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBThread> orderByComparator) {
370 return getService()
371 .getMBThreadsByUuidAndCompanyId(uuid, companyId, start, end,
372 orderByComparator);
373 }
374
375
380 public static int getMBThreadsCount() {
381 return getService().getMBThreadsCount();
382 }
383
384 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getNoAssetThreads() {
385 return getService().getNoAssetThreads();
386 }
387
388
393 public static java.lang.String getOSGiServiceIdentifier() {
394 return getService().getOSGiServiceIdentifier();
395 }
396
397 public static com.liferay.portal.model.PersistedModel getPersistedModel(
398 java.io.Serializable primaryKeyObj)
399 throws com.liferay.portal.kernel.exception.PortalException {
400 return getService().getPersistedModel(primaryKeyObj);
401 }
402
403 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
404 long categoryId, double priority)
405 throws com.liferay.portal.kernel.exception.PortalException {
406 return getService().getPriorityThreads(categoryId, priority);
407 }
408
409 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
410 long categoryId, double priority, boolean inherit)
411 throws com.liferay.portal.kernel.exception.PortalException {
412 return getService().getPriorityThreads(categoryId, priority, inherit);
413 }
414
415 public static com.liferay.portlet.messageboards.model.MBThread getThread(
416 long threadId)
417 throws com.liferay.portal.kernel.exception.PortalException {
418 return getService().getThread(threadId);
419 }
420
421 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
422 long groupId, long categoryId, int status, int start, int end) {
423 return getService().getThreads(groupId, categoryId, status, start, end);
424 }
425
426 public static int getThreadsCount(long groupId, long categoryId, int status) {
427 return getService().getThreadsCount(groupId, categoryId, status);
428 }
429
430 public static boolean hasAnswerMessage(long threadId) {
431 return getService().hasAnswerMessage(threadId);
432 }
433
434 public static void incrementViewCounter(long threadId, int increment)
435 throws com.liferay.portal.kernel.exception.PortalException {
436 getService().incrementViewCounter(threadId, increment);
437 }
438
439 public static void moveDependentsToTrash(long groupId, long threadId,
440 long trashEntryId)
441 throws com.liferay.portal.kernel.exception.PortalException {
442 getService().moveDependentsToTrash(groupId, threadId, trashEntryId);
443 }
444
445 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
446 long groupId, long categoryId, long threadId)
447 throws com.liferay.portal.kernel.exception.PortalException {
448 return getService().moveThread(groupId, categoryId, threadId);
449 }
450
451 public static com.liferay.portlet.messageboards.model.MBThread moveThreadFromTrash(
452 long userId, long categoryId, long threadId)
453 throws com.liferay.portal.kernel.exception.PortalException {
454 return getService().moveThreadFromTrash(userId, categoryId, threadId);
455 }
456
457 public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
458 long userId, com.liferay.portlet.messageboards.model.MBThread thread)
459 throws com.liferay.portal.kernel.exception.PortalException {
460 return getService().moveThreadToTrash(userId, thread);
461 }
462
463 public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
464 long userId, long threadId)
465 throws com.liferay.portal.kernel.exception.PortalException {
466 return getService().moveThreadToTrash(userId, threadId);
467 }
468
469 public static void moveThreadsToTrash(long groupId, long userId)
470 throws com.liferay.portal.kernel.exception.PortalException {
471 getService().moveThreadsToTrash(groupId, userId);
472 }
473
474 public static void restoreDependentsFromTrash(long groupId, long threadId)
475 throws com.liferay.portal.kernel.exception.PortalException {
476 getService().restoreDependentsFromTrash(groupId, threadId);
477 }
478
479
483 @Deprecated
484 public static void restoreDependentsFromTrash(long groupId, long threadId,
485 long trashEntryId)
486 throws com.liferay.portal.kernel.exception.PortalException {
487 getService().restoreDependentsFromTrash(groupId, threadId, trashEntryId);
488 }
489
490 public static void restoreThreadFromTrash(long userId, long threadId)
491 throws com.liferay.portal.kernel.exception.PortalException {
492 getService().restoreThreadFromTrash(userId, threadId);
493 }
494
495 public static com.liferay.portal.kernel.search.Hits search(long groupId,
496 long userId, long creatorUserId, long startDate, long endDate,
497 int status, int start, int end)
498 throws com.liferay.portal.kernel.exception.PortalException {
499 return getService()
500 .search(groupId, userId, creatorUserId, startDate, endDate,
501 status, start, end);
502 }
503
504 public static com.liferay.portal.kernel.search.Hits search(long groupId,
505 long userId, long creatorUserId, int status, int start, int end)
506 throws com.liferay.portal.kernel.exception.PortalException {
507 return getService()
508 .search(groupId, userId, creatorUserId, status, start, end);
509 }
510
511 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
512 long userId, long messageId, java.lang.String subject,
513 com.liferay.portal.service.ServiceContext serviceContext)
514 throws com.liferay.portal.kernel.exception.PortalException {
515 return getService()
516 .splitThread(userId, messageId, subject, serviceContext);
517 }
518
519
525 public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
526 com.liferay.portlet.messageboards.model.MBThread mbThread) {
527 return getService().updateMBThread(mbThread);
528 }
529
530 public static com.liferay.portlet.messageboards.model.MBThread updateMessageCount(
531 long threadId) {
532 return getService().updateMessageCount(threadId);
533 }
534
535 public static void updateQuestion(long threadId, boolean question)
536 throws com.liferay.portal.kernel.exception.PortalException {
537 getService().updateQuestion(threadId, question);
538 }
539
540 public static com.liferay.portlet.messageboards.model.MBThread updateStatus(
541 long userId, long threadId, int status)
542 throws com.liferay.portal.kernel.exception.PortalException {
543 return getService().updateStatus(userId, threadId, status);
544 }
545
546 public static MBThreadLocalService getService() {
547 if (_service == null) {
548 _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
549
550 ReferenceRegistry.registerReference(MBThreadLocalServiceUtil.class,
551 "_service");
552 }
553
554 return _service;
555 }
556
557 private static MBThreadLocalService _service;
558 }