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.ReferenceRegistry;
019
020
033 public class MBThreadLocalServiceUtil {
034
039
040
047 public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
048 com.liferay.portlet.messageboards.model.MBThread mbThread)
049 throws com.liferay.portal.kernel.exception.SystemException {
050 return getService().addMBThread(mbThread);
051 }
052
053
059 public static com.liferay.portlet.messageboards.model.MBThread createMBThread(
060 long threadId) {
061 return getService().createMBThread(threadId);
062 }
063
064
072 public static com.liferay.portlet.messageboards.model.MBThread deleteMBThread(
073 long threadId)
074 throws com.liferay.portal.kernel.exception.PortalException,
075 com.liferay.portal.kernel.exception.SystemException {
076 return getService().deleteMBThread(threadId);
077 }
078
079
086 public static com.liferay.portlet.messageboards.model.MBThread deleteMBThread(
087 com.liferay.portlet.messageboards.model.MBThread mbThread)
088 throws com.liferay.portal.kernel.exception.SystemException {
089 return getService().deleteMBThread(mbThread);
090 }
091
092 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
093 return getService().dynamicQuery();
094 }
095
096
103 @SuppressWarnings("rawtypes")
104 public static java.util.List dynamicQuery(
105 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
106 throws com.liferay.portal.kernel.exception.SystemException {
107 return getService().dynamicQuery(dynamicQuery);
108 }
109
110
123 @SuppressWarnings("rawtypes")
124 public static java.util.List dynamicQuery(
125 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
126 int end) throws com.liferay.portal.kernel.exception.SystemException {
127 return getService().dynamicQuery(dynamicQuery, start, end);
128 }
129
130
144 @SuppressWarnings("rawtypes")
145 public static java.util.List dynamicQuery(
146 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
147 int end,
148 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149 throws com.liferay.portal.kernel.exception.SystemException {
150 return getService()
151 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
152 }
153
154
161 public static long dynamicQueryCount(
162 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getService().dynamicQueryCount(dynamicQuery);
165 }
166
167 public static com.liferay.portlet.messageboards.model.MBThread fetchMBThread(
168 long threadId)
169 throws com.liferay.portal.kernel.exception.SystemException {
170 return getService().fetchMBThread(threadId);
171 }
172
173
181 public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
182 long threadId)
183 throws com.liferay.portal.kernel.exception.PortalException,
184 com.liferay.portal.kernel.exception.SystemException {
185 return getService().getMBThread(threadId);
186 }
187
188 public static com.liferay.portal.model.PersistedModel getPersistedModel(
189 java.io.Serializable primaryKeyObj)
190 throws com.liferay.portal.kernel.exception.PortalException,
191 com.liferay.portal.kernel.exception.SystemException {
192 return getService().getPersistedModel(primaryKeyObj);
193 }
194
195
207 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
208 int start, int end)
209 throws com.liferay.portal.kernel.exception.SystemException {
210 return getService().getMBThreads(start, end);
211 }
212
213
219 public static int getMBThreadsCount()
220 throws com.liferay.portal.kernel.exception.SystemException {
221 return getService().getMBThreadsCount();
222 }
223
224
231 public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
232 com.liferay.portlet.messageboards.model.MBThread mbThread)
233 throws com.liferay.portal.kernel.exception.SystemException {
234 return getService().updateMBThread(mbThread);
235 }
236
237
245 public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
246 com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
247 throws com.liferay.portal.kernel.exception.SystemException {
248 return getService().updateMBThread(mbThread, merge);
249 }
250
251
256 public static java.lang.String getBeanIdentifier() {
257 return getService().getBeanIdentifier();
258 }
259
260
265 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
266 getService().setBeanIdentifier(beanIdentifier);
267 }
268
269 public static com.liferay.portlet.messageboards.model.MBThread addThread(
270 long categoryId,
271 com.liferay.portlet.messageboards.model.MBMessage message)
272 throws com.liferay.portal.kernel.exception.PortalException,
273 com.liferay.portal.kernel.exception.SystemException {
274 return getService().addThread(categoryId, message);
275 }
276
277 public static void deleteThread(long threadId)
278 throws com.liferay.portal.kernel.exception.PortalException,
279 com.liferay.portal.kernel.exception.SystemException {
280 getService().deleteThread(threadId);
281 }
282
283 public static void deleteThread(
284 com.liferay.portlet.messageboards.model.MBThread thread)
285 throws com.liferay.portal.kernel.exception.PortalException,
286 com.liferay.portal.kernel.exception.SystemException {
287 getService().deleteThread(thread);
288 }
289
290 public static void deleteThreads(long groupId, long categoryId)
291 throws com.liferay.portal.kernel.exception.PortalException,
292 com.liferay.portal.kernel.exception.SystemException {
293 getService().deleteThreads(groupId, categoryId);
294 }
295
296 public static com.liferay.portlet.messageboards.model.MBThread fetchThread(
297 long threadId)
298 throws com.liferay.portal.kernel.exception.SystemException {
299 return getService().fetchThread(threadId);
300 }
301
302 public static int getCategoryThreadsCount(long groupId, long categoryId,
303 int status) throws com.liferay.portal.kernel.exception.SystemException {
304 return getService().getCategoryThreadsCount(groupId, categoryId, status);
305 }
306
307 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
308 long groupId, int status, int start, int end)
309 throws com.liferay.portal.kernel.exception.SystemException {
310 return getService().getGroupThreads(groupId, status, start, end);
311 }
312
313 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
314 long groupId, long userId, int status, boolean subscribed,
315 boolean includeAnonymous, int start, int end)
316 throws com.liferay.portal.kernel.exception.PortalException,
317 com.liferay.portal.kernel.exception.SystemException {
318 return getService()
319 .getGroupThreads(groupId, userId, status, subscribed,
320 includeAnonymous, start, end);
321 }
322
323 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
324 long groupId, long userId, int status, boolean subscribed, int start,
325 int end)
326 throws com.liferay.portal.kernel.exception.PortalException,
327 com.liferay.portal.kernel.exception.SystemException {
328 return getService()
329 .getGroupThreads(groupId, userId, status, subscribed, start,
330 end);
331 }
332
333 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
334 long groupId, long userId, int status, int start, int end)
335 throws com.liferay.portal.kernel.exception.PortalException,
336 com.liferay.portal.kernel.exception.SystemException {
337 return getService().getGroupThreads(groupId, userId, status, start, end);
338 }
339
340 public static int getGroupThreadsCount(long groupId, int status)
341 throws com.liferay.portal.kernel.exception.SystemException {
342 return getService().getGroupThreadsCount(groupId, status);
343 }
344
345 public static int getGroupThreadsCount(long groupId, long userId, int status)
346 throws com.liferay.portal.kernel.exception.SystemException {
347 return getService().getGroupThreadsCount(groupId, userId, status);
348 }
349
350 public static int getGroupThreadsCount(long groupId, long userId,
351 int status, boolean subscribed)
352 throws com.liferay.portal.kernel.exception.SystemException {
353 return getService()
354 .getGroupThreadsCount(groupId, userId, status, subscribed);
355 }
356
357 public static int getGroupThreadsCount(long groupId, long userId,
358 int status, boolean subscribed, boolean includeAnonymous)
359 throws com.liferay.portal.kernel.exception.SystemException {
360 return getService()
361 .getGroupThreadsCount(groupId, userId, status, subscribed,
362 includeAnonymous);
363 }
364
365 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getNoAssetThreads()
366 throws com.liferay.portal.kernel.exception.SystemException {
367 return getService().getNoAssetThreads();
368 }
369
370 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
371 long categoryId, double priority)
372 throws com.liferay.portal.kernel.exception.PortalException,
373 com.liferay.portal.kernel.exception.SystemException {
374 return getService().getPriorityThreads(categoryId, priority);
375 }
376
377 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
378 long categoryId, double priority, boolean inherit)
379 throws com.liferay.portal.kernel.exception.PortalException,
380 com.liferay.portal.kernel.exception.SystemException {
381 return getService().getPriorityThreads(categoryId, priority, inherit);
382 }
383
384 public static com.liferay.portlet.messageboards.model.MBThread getThread(
385 long threadId)
386 throws com.liferay.portal.kernel.exception.PortalException,
387 com.liferay.portal.kernel.exception.SystemException {
388 return getService().getThread(threadId);
389 }
390
391 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
392 long groupId, long categoryId, int status, int start, int end)
393 throws com.liferay.portal.kernel.exception.SystemException {
394 return getService().getThreads(groupId, categoryId, status, start, end);
395 }
396
397 public static int getThreadsCount(long groupId, long categoryId, int status)
398 throws com.liferay.portal.kernel.exception.SystemException {
399 return getService().getThreadsCount(groupId, categoryId, status);
400 }
401
402 public static boolean hasAnswerMessage(long threadId)
403 throws com.liferay.portal.kernel.exception.SystemException {
404 return getService().hasAnswerMessage(threadId);
405 }
406
407 public static com.liferay.portlet.messageboards.model.MBThread incrementViewCounter(
408 long threadId, int increment)
409 throws com.liferay.portal.kernel.exception.PortalException,
410 com.liferay.portal.kernel.exception.SystemException {
411 return getService().incrementViewCounter(threadId, increment);
412 }
413
414 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
415 long groupId, long categoryId, long threadId)
416 throws com.liferay.portal.kernel.exception.PortalException,
417 com.liferay.portal.kernel.exception.SystemException {
418 return getService().moveThread(groupId, categoryId, threadId);
419 }
420
421 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
422 long messageId, java.lang.String subject,
423 com.liferay.portal.service.ServiceContext serviceContext)
424 throws com.liferay.portal.kernel.exception.PortalException,
425 com.liferay.portal.kernel.exception.SystemException {
426 return getService().splitThread(messageId, subject, serviceContext);
427 }
428
429 public static void updateQuestion(long threadId, boolean question)
430 throws com.liferay.portal.kernel.exception.PortalException,
431 com.liferay.portal.kernel.exception.SystemException {
432 getService().updateQuestion(threadId, question);
433 }
434
435
438 public static com.liferay.portlet.messageboards.model.MBThread updateThread(
439 long threadId, int viewCount)
440 throws com.liferay.portal.kernel.exception.PortalException,
441 com.liferay.portal.kernel.exception.SystemException {
442 return getService().updateThread(threadId, viewCount);
443 }
444
445 public static MBThreadLocalService getService() {
446 if (_service == null) {
447 _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
448
449 ReferenceRegistry.registerReference(MBThreadLocalServiceUtil.class,
450 "_service");
451 }
452
453 return _service;
454 }
455
456
459 public void setService(MBThreadLocalService service) {
460 }
461
462 private static MBThreadLocalService _service;
463 }