001
014
015 package com.liferay.message.boards.kernel.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 public static boolean hasAnswerMessage(long threadId) {
044 return getService().hasAnswerMessage(threadId);
045 }
046
047
053 public static com.liferay.message.boards.kernel.model.MBThread addMBThread(
054 com.liferay.message.boards.kernel.model.MBThread mbThread) {
055 return getService().addMBThread(mbThread);
056 }
057
058 public static com.liferay.message.boards.kernel.model.MBThread addThread(
059 long categoryId,
060 com.liferay.message.boards.kernel.model.MBMessage message,
061 com.liferay.portal.kernel.service.ServiceContext serviceContext)
062 throws com.liferay.portal.kernel.exception.PortalException {
063 return getService().addThread(categoryId, message, serviceContext);
064 }
065
066
072 public static com.liferay.message.boards.kernel.model.MBThread createMBThread(
073 long threadId) {
074 return getService().createMBThread(threadId);
075 }
076
077
083 public static com.liferay.message.boards.kernel.model.MBThread deleteMBThread(
084 com.liferay.message.boards.kernel.model.MBThread mbThread) {
085 return getService().deleteMBThread(mbThread);
086 }
087
088
095 public static com.liferay.message.boards.kernel.model.MBThread deleteMBThread(
096 long threadId)
097 throws com.liferay.portal.kernel.exception.PortalException {
098 return getService().deleteMBThread(threadId);
099 }
100
101 public static com.liferay.message.boards.kernel.model.MBThread fetchMBThread(
102 long threadId) {
103 return getService().fetchMBThread(threadId);
104 }
105
106
113 public static com.liferay.message.boards.kernel.model.MBThread fetchMBThreadByUuidAndGroupId(
114 java.lang.String uuid, long groupId) {
115 return getService().fetchMBThreadByUuidAndGroupId(uuid, groupId);
116 }
117
118 public static com.liferay.message.boards.kernel.model.MBThread fetchThread(
119 long threadId) {
120 return getService().fetchThread(threadId);
121 }
122
123
130 public static com.liferay.message.boards.kernel.model.MBThread getMBThread(
131 long threadId)
132 throws com.liferay.portal.kernel.exception.PortalException {
133 return getService().getMBThread(threadId);
134 }
135
136
144 public static com.liferay.message.boards.kernel.model.MBThread getMBThreadByUuidAndGroupId(
145 java.lang.String uuid, long groupId)
146 throws com.liferay.portal.kernel.exception.PortalException {
147 return getService().getMBThreadByUuidAndGroupId(uuid, groupId);
148 }
149
150 public static com.liferay.message.boards.kernel.model.MBThread getThread(
151 long threadId)
152 throws com.liferay.portal.kernel.exception.PortalException {
153 return getService().getThread(threadId);
154 }
155
156 public static com.liferay.message.boards.kernel.model.MBThread moveThread(
157 long groupId, long categoryId, long threadId)
158 throws com.liferay.portal.kernel.exception.PortalException {
159 return getService().moveThread(groupId, categoryId, threadId);
160 }
161
162 public static com.liferay.message.boards.kernel.model.MBThread moveThreadFromTrash(
163 long userId, long categoryId, long threadId)
164 throws com.liferay.portal.kernel.exception.PortalException {
165 return getService().moveThreadFromTrash(userId, categoryId, threadId);
166 }
167
168 public static com.liferay.message.boards.kernel.model.MBThread moveThreadToTrash(
169 long userId, com.liferay.message.boards.kernel.model.MBThread thread)
170 throws com.liferay.portal.kernel.exception.PortalException {
171 return getService().moveThreadToTrash(userId, thread);
172 }
173
174 public static com.liferay.message.boards.kernel.model.MBThread moveThreadToTrash(
175 long userId, long threadId)
176 throws com.liferay.portal.kernel.exception.PortalException {
177 return getService().moveThreadToTrash(userId, threadId);
178 }
179
180 public static com.liferay.message.boards.kernel.model.MBThread splitThread(
181 long userId, long messageId, java.lang.String subject,
182 com.liferay.portal.kernel.service.ServiceContext serviceContext)
183 throws com.liferay.portal.kernel.exception.PortalException {
184 return getService()
185 .splitThread(userId, messageId, subject, serviceContext);
186 }
187
188
194 public static com.liferay.message.boards.kernel.model.MBThread updateMBThread(
195 com.liferay.message.boards.kernel.model.MBThread mbThread) {
196 return getService().updateMBThread(mbThread);
197 }
198
199 public static com.liferay.message.boards.kernel.model.MBThread updateMessageCount(
200 long threadId) {
201 return getService().updateMessageCount(threadId);
202 }
203
204 public static com.liferay.message.boards.kernel.model.MBThread updateStatus(
205 long userId, long threadId, int status)
206 throws com.liferay.portal.kernel.exception.PortalException {
207 return getService().updateStatus(userId, threadId, status);
208 }
209
210 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
211 return getService().getActionableDynamicQuery();
212 }
213
214 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
215 return getService().dynamicQuery();
216 }
217
218 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
219 com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) {
220 return getService().getExportActionableDynamicQuery(portletDataContext);
221 }
222
223 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
224 return getService().getIndexableActionableDynamicQuery();
225 }
226
227
230 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
231 com.liferay.portal.kernel.model.PersistedModel persistedModel)
232 throws com.liferay.portal.kernel.exception.PortalException {
233 return getService().deletePersistedModel(persistedModel);
234 }
235
236 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
237 java.io.Serializable primaryKeyObj)
238 throws com.liferay.portal.kernel.exception.PortalException {
239 return getService().getPersistedModel(primaryKeyObj);
240 }
241
242 public static com.liferay.portal.kernel.search.Hits search(long groupId,
243 long userId, long creatorUserId, int status, int start, int end)
244 throws com.liferay.portal.kernel.exception.PortalException {
245 return getService()
246 .search(groupId, userId, creatorUserId, status, start, end);
247 }
248
249 public static com.liferay.portal.kernel.search.Hits search(long groupId,
250 long userId, long creatorUserId, long startDate, long endDate,
251 int status, int start, int end)
252 throws com.liferay.portal.kernel.exception.PortalException {
253 return getService()
254 .search(groupId, userId, creatorUserId, startDate, endDate,
255 status, start, end);
256 }
257
258 public static int getCategoryThreadsCount(long groupId, long categoryId,
259 int status) {
260 return getService().getCategoryThreadsCount(groupId, categoryId, status);
261 }
262
263 public static int getGroupThreadsCount(long groupId,
264 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.message.boards.kernel.model.MBThread> queryDefinition) {
265 return getService().getGroupThreadsCount(groupId, queryDefinition);
266 }
267
268 public static int getGroupThreadsCount(long groupId, long userId,
269 boolean subscribed, boolean includeAnonymous,
270 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.message.boards.kernel.model.MBThread> queryDefinition) {
271 return getService()
272 .getGroupThreadsCount(groupId, userId, subscribed,
273 includeAnonymous, queryDefinition);
274 }
275
276 public static int getGroupThreadsCount(long groupId, long userId,
277 boolean subscribed,
278 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.message.boards.kernel.model.MBThread> queryDefinition) {
279 return getService()
280 .getGroupThreadsCount(groupId, userId, subscribed,
281 queryDefinition);
282 }
283
284 public static int getGroupThreadsCount(long groupId, long userId,
285 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.message.boards.kernel.model.MBThread> queryDefinition) {
286 return getService()
287 .getGroupThreadsCount(groupId, userId, queryDefinition);
288 }
289
290
295 public static int getMBThreadsCount() {
296 return getService().getMBThreadsCount();
297 }
298
299 public static int getThreadsCount(long groupId, long categoryId, int status) {
300 return getService().getThreadsCount(groupId, categoryId, status);
301 }
302
303
308 public static java.lang.String getOSGiServiceIdentifier() {
309 return getService().getOSGiServiceIdentifier();
310 }
311
312
318 public static <T> java.util.List<T> dynamicQuery(
319 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
320 return getService().dynamicQuery(dynamicQuery);
321 }
322
323
335 public static <T> java.util.List<T> dynamicQuery(
336 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
337 int end) {
338 return getService().dynamicQuery(dynamicQuery, start, end);
339 }
340
341
354 public static <T> java.util.List<T> dynamicQuery(
355 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
356 int end,
357 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
358 return getService()
359 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
360 }
361
362 public static java.util.List<com.liferay.message.boards.kernel.model.MBThread> getGroupThreads(
363 long groupId,
364 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.message.boards.kernel.model.MBThread> queryDefinition) {
365 return getService().getGroupThreads(groupId, queryDefinition);
366 }
367
368 public static java.util.List<com.liferay.message.boards.kernel.model.MBThread> getGroupThreads(
369 long groupId, long userId, boolean subscribed,
370 boolean includeAnonymous,
371 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.message.boards.kernel.model.MBThread> queryDefinition) {
372 return getService()
373 .getGroupThreads(groupId, userId, subscribed,
374 includeAnonymous, queryDefinition);
375 }
376
377 public static java.util.List<com.liferay.message.boards.kernel.model.MBThread> getGroupThreads(
378 long groupId, long userId, boolean subscribed,
379 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.message.boards.kernel.model.MBThread> queryDefinition) {
380 return getService()
381 .getGroupThreads(groupId, userId, subscribed, queryDefinition);
382 }
383
384 public static java.util.List<com.liferay.message.boards.kernel.model.MBThread> getGroupThreads(
385 long groupId, long userId,
386 com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.message.boards.kernel.model.MBThread> queryDefinition) {
387 return getService().getGroupThreads(groupId, userId, queryDefinition);
388 }
389
390
401 public static java.util.List<com.liferay.message.boards.kernel.model.MBThread> getMBThreads(
402 int start, int end) {
403 return getService().getMBThreads(start, end);
404 }
405
406
413 public static java.util.List<com.liferay.message.boards.kernel.model.MBThread> getMBThreadsByUuidAndCompanyId(
414 java.lang.String uuid, long companyId) {
415 return getService().getMBThreadsByUuidAndCompanyId(uuid, companyId);
416 }
417
418
428 public static java.util.List<com.liferay.message.boards.kernel.model.MBThread> getMBThreadsByUuidAndCompanyId(
429 java.lang.String uuid, long companyId, int start, int end,
430 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.message.boards.kernel.model.MBThread> orderByComparator) {
431 return getService()
432 .getMBThreadsByUuidAndCompanyId(uuid, companyId, start, end,
433 orderByComparator);
434 }
435
436 public static java.util.List<com.liferay.message.boards.kernel.model.MBThread> getNoAssetThreads() {
437 return getService().getNoAssetThreads();
438 }
439
440 public static java.util.List<com.liferay.message.boards.kernel.model.MBThread> getPriorityThreads(
441 long categoryId, double priority)
442 throws com.liferay.portal.kernel.exception.PortalException {
443 return getService().getPriorityThreads(categoryId, priority);
444 }
445
446 public static java.util.List<com.liferay.message.boards.kernel.model.MBThread> getPriorityThreads(
447 long categoryId, double priority, boolean inherit)
448 throws com.liferay.portal.kernel.exception.PortalException {
449 return getService().getPriorityThreads(categoryId, priority, inherit);
450 }
451
452 public static java.util.List<com.liferay.message.boards.kernel.model.MBThread> getThreads(
453 long groupId, long categoryId, int status, int start, int end) {
454 return getService().getThreads(groupId, categoryId, status, start, end);
455 }
456
457
463 public static long dynamicQueryCount(
464 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
465 return getService().dynamicQueryCount(dynamicQuery);
466 }
467
468
475 public static long dynamicQueryCount(
476 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
477 com.liferay.portal.kernel.dao.orm.Projection projection) {
478 return getService().dynamicQueryCount(dynamicQuery, projection);
479 }
480
481 public static void deleteThread(
482 com.liferay.message.boards.kernel.model.MBThread thread)
483 throws com.liferay.portal.kernel.exception.PortalException {
484 getService().deleteThread(thread);
485 }
486
487 public static void deleteThread(long threadId)
488 throws com.liferay.portal.kernel.exception.PortalException {
489 getService().deleteThread(threadId);
490 }
491
492 public static void deleteThreads(long groupId, long categoryId)
493 throws com.liferay.portal.kernel.exception.PortalException {
494 getService().deleteThreads(groupId, categoryId);
495 }
496
497 public static void deleteThreads(long groupId, long categoryId,
498 boolean includeTrashedEntries)
499 throws com.liferay.portal.kernel.exception.PortalException {
500 getService().deleteThreads(groupId, categoryId, includeTrashedEntries);
501 }
502
503 public static void incrementViewCounter(long threadId, int increment)
504 throws com.liferay.portal.kernel.exception.PortalException {
505 getService().incrementViewCounter(threadId, increment);
506 }
507
508 public static void moveDependentsToTrash(long groupId, long threadId,
509 long trashEntryId)
510 throws com.liferay.portal.kernel.exception.PortalException {
511 getService().moveDependentsToTrash(groupId, threadId, trashEntryId);
512 }
513
514 public static void moveThreadsToTrash(long groupId, long userId)
515 throws com.liferay.portal.kernel.exception.PortalException {
516 getService().moveThreadsToTrash(groupId, userId);
517 }
518
519 public static void restoreDependentsFromTrash(long groupId, long threadId)
520 throws com.liferay.portal.kernel.exception.PortalException {
521 getService().restoreDependentsFromTrash(groupId, threadId);
522 }
523
524
528 @Deprecated
529 public static void restoreDependentsFromTrash(long groupId, long threadId,
530 long trashEntryId)
531 throws com.liferay.portal.kernel.exception.PortalException {
532 getService().restoreDependentsFromTrash(groupId, threadId, trashEntryId);
533 }
534
535 public static void restoreThreadFromTrash(long userId, long threadId)
536 throws com.liferay.portal.kernel.exception.PortalException {
537 getService().restoreThreadFromTrash(userId, threadId);
538 }
539
540 public static void updateQuestion(long threadId, boolean question)
541 throws com.liferay.portal.kernel.exception.PortalException {
542 getService().updateQuestion(threadId, question);
543 }
544
545 public static MBThreadLocalService getService() {
546 if (_service == null) {
547 _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
548
549 ReferenceRegistry.registerReference(MBThreadLocalServiceUtil.class,
550 "_service");
551 }
552
553 return _service;
554 }
555
556 private static MBThreadLocalService _service;
557 }