001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
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    /**
022     * The utility for the message-boards message local service. This utility wraps {@link com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
023     *
024     * <p>
025     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see MBMessageLocalService
030     * @see com.liferay.portlet.messageboards.service.base.MBMessageLocalServiceBaseImpl
031     * @see com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl
032     * @generated
033     */
034    public class MBMessageLocalServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Adds the message-boards message to the database. Also notifies the appropriate model listeners.
043            *
044            * @param mbMessage the message-boards message
045            * @return the message-boards message that was added
046            * @throws SystemException if a system exception occurred
047            */
048            public static com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
049                    com.liferay.portlet.messageboards.model.MBMessage mbMessage)
050                    throws com.liferay.portal.kernel.exception.SystemException {
051                    return getService().addMBMessage(mbMessage);
052            }
053    
054            /**
055            * Creates a new message-boards message with the primary key. Does not add the message-boards message to the database.
056            *
057            * @param messageId the primary key for the new message-boards message
058            * @return the new message-boards message
059            */
060            public static com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
061                    long messageId) {
062                    return getService().createMBMessage(messageId);
063            }
064    
065            /**
066            * Deletes the message-boards message with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param messageId the primary key of the message-boards message
069            * @throws PortalException if a message-boards message with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public static void deleteMBMessage(long messageId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    getService().deleteMBMessage(messageId);
076            }
077    
078            /**
079            * Deletes the message-boards message from the database. Also notifies the appropriate model listeners.
080            *
081            * @param mbMessage the message-boards message
082            * @throws SystemException if a system exception occurred
083            */
084            public static void deleteMBMessage(
085                    com.liferay.portlet.messageboards.model.MBMessage mbMessage)
086                    throws com.liferay.portal.kernel.exception.SystemException {
087                    getService().deleteMBMessage(mbMessage);
088            }
089    
090            /**
091            * Performs a dynamic query on the database and returns the matching rows.
092            *
093            * @param dynamicQuery the dynamic query
094            * @return the matching rows
095            * @throws SystemException if a system exception occurred
096            */
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            /**
105            * Performs a dynamic query on the database and returns a range of the matching rows.
106            *
107            * <p>
108            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
109            * </p>
110            *
111            * @param dynamicQuery the dynamic query
112            * @param start the lower bound of the range of model instances
113            * @param end the upper bound of the range of model instances (not inclusive)
114            * @return the range of matching rows
115            * @throws SystemException if a system exception occurred
116            */
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            /**
125            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
126            *
127            * <p>
128            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
129            * </p>
130            *
131            * @param dynamicQuery the dynamic query
132            * @param start the lower bound of the range of model instances
133            * @param end the upper bound of the range of model instances (not inclusive)
134            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
135            * @return the ordered range of matching rows
136            * @throws SystemException if a system exception occurred
137            */
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            /**
149            * Returns the number of rows that match the dynamic query.
150            *
151            * @param dynamicQuery the dynamic query
152            * @return the number of rows that match the dynamic query
153            * @throws SystemException if a system exception occurred
154            */
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            /**
162            * Returns the message-boards message with the primary key.
163            *
164            * @param messageId the primary key of the message-boards message
165            * @return the message-boards message
166            * @throws PortalException if a message-boards message with the primary key could not be found
167            * @throws SystemException if a system exception occurred
168            */
169            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
170                    long messageId)
171                    throws com.liferay.portal.kernel.exception.PortalException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return getService().getMBMessage(messageId);
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            /**
184            * Returns the message-boards message with the UUID in the group.
185            *
186            * @param uuid the UUID of message-boards message
187            * @param groupId the group id of the message-boards message
188            * @return the message-boards message
189            * @throws PortalException if a message-boards message with the UUID in the group could not be found
190            * @throws SystemException if a system exception occurred
191            */
192            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
193                    java.lang.String uuid, long groupId)
194                    throws com.liferay.portal.kernel.exception.PortalException,
195                            com.liferay.portal.kernel.exception.SystemException {
196                    return getService().getMBMessageByUuidAndGroupId(uuid, groupId);
197            }
198    
199            /**
200            * Returns a range of all the message-boards messages.
201            *
202            * <p>
203            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
204            * </p>
205            *
206            * @param start the lower bound of the range of message-boards messages
207            * @param end the upper bound of the range of message-boards messages (not inclusive)
208            * @return the range of message-boards messages
209            * @throws SystemException if a system exception occurred
210            */
211            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
212                    int start, int end)
213                    throws com.liferay.portal.kernel.exception.SystemException {
214                    return getService().getMBMessages(start, end);
215            }
216    
217            /**
218            * Returns the number of message-boards messages.
219            *
220            * @return the number of message-boards messages
221            * @throws SystemException if a system exception occurred
222            */
223            public static int getMBMessagesCount()
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return getService().getMBMessagesCount();
226            }
227    
228            /**
229            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
230            *
231            * @param mbMessage the message-boards message
232            * @return the message-boards message that was updated
233            * @throws SystemException if a system exception occurred
234            */
235            public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
236                    com.liferay.portlet.messageboards.model.MBMessage mbMessage)
237                    throws com.liferay.portal.kernel.exception.SystemException {
238                    return getService().updateMBMessage(mbMessage);
239            }
240    
241            /**
242            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
243            *
244            * @param mbMessage the message-boards message
245            * @param merge whether to merge the message-boards message with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
246            * @return the message-boards message that was updated
247            * @throws SystemException if a system exception occurred
248            */
249            public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
250                    com.liferay.portlet.messageboards.model.MBMessage mbMessage,
251                    boolean merge)
252                    throws com.liferay.portal.kernel.exception.SystemException {
253                    return getService().updateMBMessage(mbMessage, merge);
254            }
255    
256            /**
257            * Returns the Spring bean ID for this bean.
258            *
259            * @return the Spring bean ID for this bean
260            */
261            public static java.lang.String getBeanIdentifier() {
262                    return getService().getBeanIdentifier();
263            }
264    
265            /**
266            * Sets the Spring bean ID for this bean.
267            *
268            * @param beanIdentifier the Spring bean ID for this bean
269            */
270            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
271                    getService().setBeanIdentifier(beanIdentifier);
272            }
273    
274            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
275                    long userId, java.lang.String userName, long groupId,
276                    java.lang.String className, long classPK, int workflowAction)
277                    throws com.liferay.portal.kernel.exception.PortalException,
278                            com.liferay.portal.kernel.exception.SystemException {
279                    return getService()
280                                       .addDiscussionMessage(userId, userName, groupId, className,
281                            classPK, workflowAction);
282            }
283    
284            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
285                    long userId, java.lang.String userName, long groupId,
286                    java.lang.String className, long classPK, long threadId,
287                    long parentMessageId, java.lang.String subject, java.lang.String body,
288                    com.liferay.portal.service.ServiceContext serviceContext)
289                    throws com.liferay.portal.kernel.exception.PortalException,
290                            com.liferay.portal.kernel.exception.SystemException {
291                    return getService()
292                                       .addDiscussionMessage(userId, userName, groupId, className,
293                            classPK, threadId, parentMessageId, subject, body, serviceContext);
294            }
295    
296            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
297                    long userId, java.lang.String userName, long groupId, long categoryId,
298                    long threadId, long parentMessageId, java.lang.String subject,
299                    java.lang.String body,
300                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
301                    boolean anonymous, double priority, boolean allowPingbacks,
302                    com.liferay.portal.service.ServiceContext serviceContext)
303                    throws com.liferay.portal.kernel.exception.PortalException,
304                            com.liferay.portal.kernel.exception.SystemException {
305                    return getService()
306                                       .addMessage(userId, userName, groupId, categoryId, threadId,
307                            parentMessageId, subject, body, files, anonymous, priority,
308                            allowPingbacks, serviceContext);
309            }
310    
311            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
312                    long userId, java.lang.String userName, long groupId, long categoryId,
313                    java.lang.String subject, java.lang.String body,
314                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
315                    boolean anonymous, double priority, boolean allowPingbacks,
316                    com.liferay.portal.service.ServiceContext serviceContext)
317                    throws com.liferay.portal.kernel.exception.PortalException,
318                            com.liferay.portal.kernel.exception.SystemException {
319                    return getService()
320                                       .addMessage(userId, userName, groupId, categoryId, subject,
321                            body, files, anonymous, priority, allowPingbacks, serviceContext);
322            }
323    
324            public static void addMessageResources(long messageId,
325                    boolean addCommunityPermissions, boolean addGuestPermissions)
326                    throws com.liferay.portal.kernel.exception.PortalException,
327                            com.liferay.portal.kernel.exception.SystemException {
328                    getService()
329                            .addMessageResources(messageId, addCommunityPermissions,
330                            addGuestPermissions);
331            }
332    
333            public static void addMessageResources(long messageId,
334                    java.lang.String[] communityPermissions,
335                    java.lang.String[] guestPermissions)
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException {
338                    getService()
339                            .addMessageResources(messageId, communityPermissions,
340                            guestPermissions);
341            }
342    
343            public static void addMessageResources(
344                    com.liferay.portlet.messageboards.model.MBMessage message,
345                    boolean addCommunityPermissions, boolean addGuestPermissions)
346                    throws com.liferay.portal.kernel.exception.PortalException,
347                            com.liferay.portal.kernel.exception.SystemException {
348                    getService()
349                            .addMessageResources(message, addCommunityPermissions,
350                            addGuestPermissions);
351            }
352    
353            public static void addMessageResources(
354                    com.liferay.portlet.messageboards.model.MBMessage message,
355                    java.lang.String[] communityPermissions,
356                    java.lang.String[] guestPermissions)
357                    throws com.liferay.portal.kernel.exception.PortalException,
358                            com.liferay.portal.kernel.exception.SystemException {
359                    getService()
360                            .addMessageResources(message, communityPermissions, guestPermissions);
361            }
362    
363            public static void deleteDiscussionMessage(long messageId)
364                    throws com.liferay.portal.kernel.exception.PortalException,
365                            com.liferay.portal.kernel.exception.SystemException {
366                    getService().deleteDiscussionMessage(messageId);
367            }
368    
369            public static void deleteDiscussionMessages(java.lang.String className,
370                    long classPK)
371                    throws com.liferay.portal.kernel.exception.PortalException,
372                            com.liferay.portal.kernel.exception.SystemException {
373                    getService().deleteDiscussionMessages(className, classPK);
374            }
375    
376            public static void deleteMessage(long messageId)
377                    throws com.liferay.portal.kernel.exception.PortalException,
378                            com.liferay.portal.kernel.exception.SystemException {
379                    getService().deleteMessage(messageId);
380            }
381    
382            public static void deleteMessage(
383                    com.liferay.portlet.messageboards.model.MBMessage message)
384                    throws com.liferay.portal.kernel.exception.PortalException,
385                            com.liferay.portal.kernel.exception.SystemException {
386                    getService().deleteMessage(message);
387            }
388    
389            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
390                    long groupId, long categoryId, int status, int start, int end)
391                    throws com.liferay.portal.kernel.exception.SystemException {
392                    return getService()
393                                       .getCategoryMessages(groupId, categoryId, status, start, end);
394            }
395    
396            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
397                    long groupId, long categoryId, int status, int start, int end,
398                    com.liferay.portal.kernel.util.OrderByComparator obc)
399                    throws com.liferay.portal.kernel.exception.SystemException {
400                    return getService()
401                                       .getCategoryMessages(groupId, categoryId, status, start,
402                            end, obc);
403            }
404    
405            public static int getCategoryMessagesCount(long groupId, long categoryId,
406                    int status) throws com.liferay.portal.kernel.exception.SystemException {
407                    return getService().getCategoryMessagesCount(groupId, categoryId, status);
408            }
409    
410            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
411                    long companyId, int status, int start, int end)
412                    throws com.liferay.portal.kernel.exception.SystemException {
413                    return getService().getCompanyMessages(companyId, status, start, end);
414            }
415    
416            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
417                    long companyId, int status, int start, int end,
418                    com.liferay.portal.kernel.util.OrderByComparator obc)
419                    throws com.liferay.portal.kernel.exception.SystemException {
420                    return getService()
421                                       .getCompanyMessages(companyId, status, start, end, obc);
422            }
423    
424            public static int getCompanyMessagesCount(long companyId, int status)
425                    throws com.liferay.portal.kernel.exception.SystemException {
426                    return getService().getCompanyMessagesCount(companyId, status);
427            }
428    
429            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
430                    long userId, long groupId, java.lang.String className, long classPK,
431                    int status)
432                    throws com.liferay.portal.kernel.exception.PortalException,
433                            com.liferay.portal.kernel.exception.SystemException {
434                    return getService()
435                                       .getDiscussionMessageDisplay(userId, groupId, className,
436                            classPK, status);
437            }
438    
439            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
440                    long userId, long groupId, java.lang.String className, long classPK,
441                    int status, java.lang.String threadView)
442                    throws com.liferay.portal.kernel.exception.PortalException,
443                            com.liferay.portal.kernel.exception.SystemException {
444                    return getService()
445                                       .getDiscussionMessageDisplay(userId, groupId, className,
446                            classPK, status, threadView);
447            }
448    
449            public static int getDiscussionMessagesCount(long classNameId,
450                    long classPK, int status)
451                    throws com.liferay.portal.kernel.exception.SystemException {
452                    return getService()
453                                       .getDiscussionMessagesCount(classNameId, classPK, status);
454            }
455    
456            public static int getDiscussionMessagesCount(java.lang.String className,
457                    long classPK, int status)
458                    throws com.liferay.portal.kernel.exception.SystemException {
459                    return getService()
460                                       .getDiscussionMessagesCount(className, classPK, status);
461            }
462    
463            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
464                    java.lang.String className)
465                    throws com.liferay.portal.kernel.exception.SystemException {
466                    return getService().getDiscussions(className);
467            }
468    
469            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
470                    long groupId, int status, int start, int end)
471                    throws com.liferay.portal.kernel.exception.SystemException {
472                    return getService().getGroupMessages(groupId, status, start, end);
473            }
474    
475            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
476                    long groupId, int status, int start, int end,
477                    com.liferay.portal.kernel.util.OrderByComparator obc)
478                    throws com.liferay.portal.kernel.exception.SystemException {
479                    return getService().getGroupMessages(groupId, status, start, end, obc);
480            }
481    
482            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
483                    long groupId, long userId, int status, int start, int end)
484                    throws com.liferay.portal.kernel.exception.SystemException {
485                    return getService().getGroupMessages(groupId, userId, status, start, end);
486            }
487    
488            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
489                    long groupId, long userId, int status, int start, int end,
490                    com.liferay.portal.kernel.util.OrderByComparator obc)
491                    throws com.liferay.portal.kernel.exception.SystemException {
492                    return getService()
493                                       .getGroupMessages(groupId, userId, status, start, end, obc);
494            }
495    
496            public static int getGroupMessagesCount(long groupId, int status)
497                    throws com.liferay.portal.kernel.exception.SystemException {
498                    return getService().getGroupMessagesCount(groupId, status);
499            }
500    
501            public static int getGroupMessagesCount(long groupId, long userId,
502                    int status) throws com.liferay.portal.kernel.exception.SystemException {
503                    return getService().getGroupMessagesCount(groupId, userId, status);
504            }
505    
506            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
507                    long messageId)
508                    throws com.liferay.portal.kernel.exception.PortalException,
509                            com.liferay.portal.kernel.exception.SystemException {
510                    return getService().getMessage(messageId);
511            }
512    
513            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
514                    long messageId, int status, java.lang.String threadView,
515                    boolean includePrevAndNext)
516                    throws com.liferay.portal.kernel.exception.PortalException,
517                            com.liferay.portal.kernel.exception.SystemException {
518                    return getService()
519                                       .getMessageDisplay(messageId, status, threadView,
520                            includePrevAndNext);
521            }
522    
523            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
524                    com.liferay.portlet.messageboards.model.MBMessage message, int status,
525                    java.lang.String threadView, boolean includePrevAndNext)
526                    throws com.liferay.portal.kernel.exception.PortalException,
527                            com.liferay.portal.kernel.exception.SystemException {
528                    return getService()
529                                       .getMessageDisplay(message, status, threadView,
530                            includePrevAndNext);
531            }
532    
533            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
534                    java.lang.String className, long classPK, int status)
535                    throws com.liferay.portal.kernel.exception.SystemException {
536                    return getService().getMessages(className, classPK, status);
537            }
538    
539            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
540                    throws com.liferay.portal.kernel.exception.SystemException {
541                    return getService().getNoAssetMessages();
542            }
543    
544            public static int getPositionInThread(long messageId)
545                    throws com.liferay.portal.kernel.exception.PortalException,
546                            com.liferay.portal.kernel.exception.SystemException {
547                    return getService().getPositionInThread(messageId);
548            }
549    
550            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
551                    long threadId, int status)
552                    throws com.liferay.portal.kernel.exception.SystemException {
553                    return getService().getThreadMessages(threadId, status);
554            }
555    
556            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
557                    long threadId, int status,
558                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
559                    throws com.liferay.portal.kernel.exception.SystemException {
560                    return getService().getThreadMessages(threadId, status, comparator);
561            }
562    
563            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
564                    long threadId, int status, int start, int end)
565                    throws com.liferay.portal.kernel.exception.SystemException {
566                    return getService().getThreadMessages(threadId, status, start, end);
567            }
568    
569            public static int getThreadMessagesCount(long threadId, int status)
570                    throws com.liferay.portal.kernel.exception.SystemException {
571                    return getService().getThreadMessagesCount(threadId, status);
572            }
573    
574            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
575                    long threadId, int status, int start, int end)
576                    throws com.liferay.portal.kernel.exception.SystemException {
577                    return getService()
578                                       .getThreadRepliesMessages(threadId, status, start, end);
579            }
580    
581            public static void subscribeMessage(long userId, long messageId)
582                    throws com.liferay.portal.kernel.exception.PortalException,
583                            com.liferay.portal.kernel.exception.SystemException {
584                    getService().subscribeMessage(userId, messageId);
585            }
586    
587            public static void unsubscribeMessage(long userId, long messageId)
588                    throws com.liferay.portal.kernel.exception.PortalException,
589                            com.liferay.portal.kernel.exception.SystemException {
590                    getService().unsubscribeMessage(userId, messageId);
591            }
592    
593            public static void updateAsset(long userId,
594                    com.liferay.portlet.messageboards.model.MBMessage message,
595                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
596                    throws com.liferay.portal.kernel.exception.PortalException,
597                            com.liferay.portal.kernel.exception.SystemException {
598                    getService()
599                            .updateAsset(userId, message, assetCategoryIds, assetTagNames);
600            }
601    
602            /**
603            * @deprecated {@link #updateDiscussionMessage(long, long, String, long,
604            String, String, ServiceContext)}
605            */
606            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
607                    long userId, long messageId, java.lang.String className, long classPK,
608                    java.lang.String subject, java.lang.String body, int workflowAction)
609                    throws com.liferay.portal.kernel.exception.PortalException,
610                            com.liferay.portal.kernel.exception.SystemException {
611                    return getService()
612                                       .updateDiscussionMessage(userId, messageId, className,
613                            classPK, subject, body, workflowAction);
614            }
615    
616            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
617                    long userId, long messageId, java.lang.String className, long classPK,
618                    java.lang.String subject, java.lang.String body,
619                    com.liferay.portal.service.ServiceContext serviceContext)
620                    throws com.liferay.portal.kernel.exception.PortalException,
621                            com.liferay.portal.kernel.exception.SystemException {
622                    return getService()
623                                       .updateDiscussionMessage(userId, messageId, className,
624                            classPK, subject, body, serviceContext);
625            }
626    
627            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
628                    long userId, long messageId, java.lang.String subject,
629                    java.lang.String body,
630                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
631                    java.util.List<java.lang.String> existingFiles, double priority,
632                    boolean allowPingbacks,
633                    com.liferay.portal.service.ServiceContext serviceContext)
634                    throws com.liferay.portal.kernel.exception.PortalException,
635                            com.liferay.portal.kernel.exception.SystemException {
636                    return getService()
637                                       .updateMessage(userId, messageId, subject, body, files,
638                            existingFiles, priority, allowPingbacks, serviceContext);
639            }
640    
641            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
642                    long messageId, java.lang.String body)
643                    throws com.liferay.portal.kernel.exception.PortalException,
644                            com.liferay.portal.kernel.exception.SystemException {
645                    return getService().updateMessage(messageId, body);
646            }
647    
648            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
649                    long userId, long messageId, int status,
650                    com.liferay.portal.service.ServiceContext serviceContext)
651                    throws com.liferay.portal.kernel.exception.PortalException,
652                            com.liferay.portal.kernel.exception.SystemException {
653                    return getService()
654                                       .updateStatus(userId, messageId, status, serviceContext);
655            }
656    
657            public static void updateUserName(long userId, java.lang.String userName)
658                    throws com.liferay.portal.kernel.exception.SystemException {
659                    getService().updateUserName(userId, userName);
660            }
661    
662            public static MBMessageLocalService getService() {
663                    if (_service == null) {
664                            _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
665    
666                            ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
667                                    "_service");
668                            MethodCache.remove(MBMessageLocalService.class);
669                    }
670    
671                    return _service;
672            }
673    
674            public void setService(MBMessageLocalService service) {
675                    MethodCache.remove(MBMessageLocalService.class);
676    
677                    _service = service;
678    
679                    ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
680                            "_service");
681                    MethodCache.remove(MBMessageLocalService.class);
682            }
683    
684            private static MBMessageLocalService _service;
685    }