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.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
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
072 public static void deleteMBThread(long threadId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().deleteMBThread(threadId);
076 }
077
078
084 public static void deleteMBThread(
085 com.liferay.portlet.messageboards.model.MBThread mbThread)
086 throws com.liferay.portal.kernel.exception.SystemException {
087 getService().deleteMBThread(mbThread);
088 }
089
090
097 @SuppressWarnings("rawtypes")
098 public static java.util.List dynamicQuery(
099 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().dynamicQuery(dynamicQuery);
102 }
103
104
117 @SuppressWarnings("rawtypes")
118 public static java.util.List dynamicQuery(
119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120 int end) throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().dynamicQuery(dynamicQuery, start, end);
122 }
123
124
138 @SuppressWarnings("rawtypes")
139 public static java.util.List dynamicQuery(
140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141 int end,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getService()
145 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146 }
147
148
155 public static long dynamicQueryCount(
156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getService().dynamicQueryCount(dynamicQuery);
159 }
160
161
169 public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
170 long threadId)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getService().getMBThread(threadId);
174 }
175
176 public static com.liferay.portal.model.PersistedModel getPersistedModel(
177 java.io.Serializable primaryKeyObj)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException {
180 return getService().getPersistedModel(primaryKeyObj);
181 }
182
183
195 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
196 int start, int end)
197 throws com.liferay.portal.kernel.exception.SystemException {
198 return getService().getMBThreads(start, end);
199 }
200
201
207 public static int getMBThreadsCount()
208 throws com.liferay.portal.kernel.exception.SystemException {
209 return getService().getMBThreadsCount();
210 }
211
212
219 public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
220 com.liferay.portlet.messageboards.model.MBThread mbThread)
221 throws com.liferay.portal.kernel.exception.SystemException {
222 return getService().updateMBThread(mbThread);
223 }
224
225
233 public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
234 com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
235 throws com.liferay.portal.kernel.exception.SystemException {
236 return getService().updateMBThread(mbThread, merge);
237 }
238
239
244 public static java.lang.String getBeanIdentifier() {
245 return getService().getBeanIdentifier();
246 }
247
248
253 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
254 getService().setBeanIdentifier(beanIdentifier);
255 }
256
257 public static com.liferay.portlet.messageboards.model.MBThread addThread(
258 long categoryId,
259 com.liferay.portlet.messageboards.model.MBMessage message)
260 throws com.liferay.portal.kernel.exception.PortalException,
261 com.liferay.portal.kernel.exception.SystemException {
262 return getService().addThread(categoryId, message);
263 }
264
265 public static void deleteThread(long threadId)
266 throws com.liferay.portal.kernel.exception.PortalException,
267 com.liferay.portal.kernel.exception.SystemException {
268 getService().deleteThread(threadId);
269 }
270
271 public static void deleteThread(
272 com.liferay.portlet.messageboards.model.MBThread thread)
273 throws com.liferay.portal.kernel.exception.PortalException,
274 com.liferay.portal.kernel.exception.SystemException {
275 getService().deleteThread(thread);
276 }
277
278 public static void deleteThreads(long groupId, long categoryId)
279 throws com.liferay.portal.kernel.exception.PortalException,
280 com.liferay.portal.kernel.exception.SystemException {
281 getService().deleteThreads(groupId, categoryId);
282 }
283
284 public static int getCategoryThreadsCount(long groupId, long categoryId,
285 int status) throws com.liferay.portal.kernel.exception.SystemException {
286 return getService().getCategoryThreadsCount(groupId, categoryId, status);
287 }
288
289 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
290 long groupId, int status, int start, int end)
291 throws com.liferay.portal.kernel.exception.SystemException {
292 return getService().getGroupThreads(groupId, status, start, end);
293 }
294
295 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
296 long groupId, long userId, int status, boolean subscribed,
297 boolean includeAnonymous, int start, int end)
298 throws com.liferay.portal.kernel.exception.PortalException,
299 com.liferay.portal.kernel.exception.SystemException {
300 return getService()
301 .getGroupThreads(groupId, userId, status, subscribed,
302 includeAnonymous, start, end);
303 }
304
305 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
306 long groupId, long userId, int status, boolean subscribed, int start,
307 int end)
308 throws com.liferay.portal.kernel.exception.PortalException,
309 com.liferay.portal.kernel.exception.SystemException {
310 return getService()
311 .getGroupThreads(groupId, userId, status, subscribed, start,
312 end);
313 }
314
315 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
316 long groupId, long userId, int status, int start, int end)
317 throws com.liferay.portal.kernel.exception.PortalException,
318 com.liferay.portal.kernel.exception.SystemException {
319 return getService().getGroupThreads(groupId, userId, status, start, end);
320 }
321
322 public static int getGroupThreadsCount(long groupId, int status)
323 throws com.liferay.portal.kernel.exception.SystemException {
324 return getService().getGroupThreadsCount(groupId, status);
325 }
326
327 public static int getGroupThreadsCount(long groupId, long userId, int status)
328 throws com.liferay.portal.kernel.exception.SystemException {
329 return getService().getGroupThreadsCount(groupId, userId, status);
330 }
331
332 public static int getGroupThreadsCount(long groupId, long userId,
333 int status, boolean subscribed)
334 throws com.liferay.portal.kernel.exception.SystemException {
335 return getService()
336 .getGroupThreadsCount(groupId, userId, status, subscribed);
337 }
338
339 public static int getGroupThreadsCount(long groupId, long userId,
340 int status, boolean subscribed, boolean includeAnonymous)
341 throws com.liferay.portal.kernel.exception.SystemException {
342 return getService()
343 .getGroupThreadsCount(groupId, userId, status, subscribed,
344 includeAnonymous);
345 }
346
347 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getNoAssetThreads()
348 throws com.liferay.portal.kernel.exception.SystemException {
349 return getService().getNoAssetThreads();
350 }
351
352 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
353 long categoryId, double priority)
354 throws com.liferay.portal.kernel.exception.PortalException,
355 com.liferay.portal.kernel.exception.SystemException {
356 return getService().getPriorityThreads(categoryId, priority);
357 }
358
359 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
360 long categoryId, double priority, boolean inherit)
361 throws com.liferay.portal.kernel.exception.PortalException,
362 com.liferay.portal.kernel.exception.SystemException {
363 return getService().getPriorityThreads(categoryId, priority, inherit);
364 }
365
366 public static com.liferay.portlet.messageboards.model.MBThread getThread(
367 long threadId)
368 throws com.liferay.portal.kernel.exception.PortalException,
369 com.liferay.portal.kernel.exception.SystemException {
370 return getService().getThread(threadId);
371 }
372
373 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
374 long groupId, long categoryId, int status, int start, int end)
375 throws com.liferay.portal.kernel.exception.SystemException {
376 return getService().getThreads(groupId, categoryId, status, start, end);
377 }
378
379 public static int getThreadsCount(long groupId, long categoryId, int status)
380 throws com.liferay.portal.kernel.exception.SystemException {
381 return getService().getThreadsCount(groupId, categoryId, status);
382 }
383
384 public static boolean hasAnswerMessage(long threadId)
385 throws com.liferay.portal.kernel.exception.SystemException {
386 return getService().hasAnswerMessage(threadId);
387 }
388
389 public static com.liferay.portlet.messageboards.model.MBThread incrementViewCounter(
390 long threadId, int increment)
391 throws com.liferay.portal.kernel.exception.PortalException,
392 com.liferay.portal.kernel.exception.SystemException {
393 return getService().incrementViewCounter(threadId, increment);
394 }
395
396 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
397 long groupId, long categoryId, long threadId)
398 throws com.liferay.portal.kernel.exception.PortalException,
399 com.liferay.portal.kernel.exception.SystemException {
400 return getService().moveThread(groupId, categoryId, threadId);
401 }
402
403 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
404 long messageId, java.lang.String subject,
405 com.liferay.portal.service.ServiceContext serviceContext)
406 throws com.liferay.portal.kernel.exception.PortalException,
407 com.liferay.portal.kernel.exception.SystemException {
408 return getService().splitThread(messageId, subject, serviceContext);
409 }
410
411 public static void updateQuestion(long threadId, boolean question)
412 throws com.liferay.portal.kernel.exception.PortalException,
413 com.liferay.portal.kernel.exception.SystemException {
414 getService().updateQuestion(threadId, question);
415 }
416
417
420 public static com.liferay.portlet.messageboards.model.MBThread updateThread(
421 long threadId, int viewCount)
422 throws com.liferay.portal.kernel.exception.PortalException,
423 com.liferay.portal.kernel.exception.SystemException {
424 return getService().updateThread(threadId, viewCount);
425 }
426
427 public static MBThreadLocalService getService() {
428 if (_service == null) {
429 _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
430
431 ReferenceRegistry.registerReference(MBThreadLocalServiceUtil.class,
432 "_service");
433 MethodCache.remove(MBThreadLocalService.class);
434 }
435
436 return _service;
437 }
438
439 public void setService(MBThreadLocalService service) {
440 MethodCache.remove(MBThreadLocalService.class);
441
442 _service = service;
443
444 ReferenceRegistry.registerReference(MBThreadLocalServiceUtil.class,
445 "_service");
446 MethodCache.remove(MBThreadLocalService.class);
447 }
448
449 private static MBThreadLocalService _service;
450 }