001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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    /**
023     * Provides the local service utility for MBMessage. This utility wraps
024     * {@link com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see MBMessageLocalService
032     * @see com.liferay.portlet.messageboards.service.base.MBMessageLocalServiceBaseImpl
033     * @see com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class MBMessageLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * 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.
042             */
043            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
044                    long userId, java.lang.String userName, long groupId,
045                    java.lang.String className, long classPK, long threadId,
046                    long parentMessageId, java.lang.String subject, java.lang.String body,
047                    com.liferay.portal.service.ServiceContext serviceContext)
048                    throws com.liferay.portal.kernel.exception.PortalException {
049                    return getService()
050                                       .addDiscussionMessage(userId, userName, groupId, className,
051                            classPK, threadId, parentMessageId, subject, body, serviceContext);
052            }
053    
054            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
055                    long userId, java.lang.String userName, long groupId,
056                    java.lang.String className, long classPK, int workflowAction)
057                    throws com.liferay.portal.kernel.exception.PortalException {
058                    return getService()
059                                       .addDiscussionMessage(userId, userName, groupId, className,
060                            classPK, workflowAction);
061            }
062    
063            /**
064            * Adds the message-boards message to the database. Also notifies the appropriate model listeners.
065            *
066            * @param mbMessage the message-boards message
067            * @return the message-boards message that was added
068            */
069            public static com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
070                    com.liferay.portlet.messageboards.model.MBMessage mbMessage) {
071                    return getService().addMBMessage(mbMessage);
072            }
073    
074            /**
075            * @deprecated As of 7.0.0, replaced by {@link #addMessage(long, String,
076            long, long, String, String, ServiceContext)}
077            */
078            @Deprecated
079            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
080                    long userId, java.lang.String userName, long categoryId,
081                    java.lang.String subject, java.lang.String body,
082                    com.liferay.portal.service.ServiceContext serviceContext)
083                    throws com.liferay.portal.kernel.exception.PortalException {
084                    return getService()
085                                       .addMessage(userId, userName, categoryId, subject, body,
086                            serviceContext);
087            }
088    
089            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
090                    long userId, java.lang.String userName, long groupId, long categoryId,
091                    java.lang.String subject, java.lang.String body,
092                    java.lang.String format,
093                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
094                    boolean anonymous, double priority, boolean allowPingbacks,
095                    com.liferay.portal.service.ServiceContext serviceContext)
096                    throws com.liferay.portal.kernel.exception.PortalException {
097                    return getService()
098                                       .addMessage(userId, userName, groupId, categoryId, subject,
099                            body, format, inputStreamOVPs, anonymous, priority, allowPingbacks,
100                            serviceContext);
101            }
102    
103            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
104                    long userId, java.lang.String userName, long groupId, long categoryId,
105                    java.lang.String subject, java.lang.String body,
106                    com.liferay.portal.service.ServiceContext serviceContext)
107                    throws com.liferay.portal.kernel.exception.PortalException {
108                    return getService()
109                                       .addMessage(userId, userName, groupId, categoryId, subject,
110                            body, serviceContext);
111            }
112    
113            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
114                    long userId, java.lang.String userName, long groupId, long categoryId,
115                    long threadId, long parentMessageId, java.lang.String subject,
116                    java.lang.String body, java.lang.String format,
117                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
118                    boolean anonymous, double priority, boolean allowPingbacks,
119                    com.liferay.portal.service.ServiceContext serviceContext)
120                    throws com.liferay.portal.kernel.exception.PortalException {
121                    return getService()
122                                       .addMessage(userId, userName, groupId, categoryId, threadId,
123                            parentMessageId, subject, body, format, inputStreamOVPs, anonymous,
124                            priority, allowPingbacks, serviceContext);
125            }
126    
127            public static void addMessageResources(
128                    com.liferay.portlet.messageboards.model.MBMessage message,
129                    boolean addGroupPermissions, boolean addGuestPermissions)
130                    throws com.liferay.portal.kernel.exception.PortalException {
131                    getService()
132                            .addMessageResources(message, addGroupPermissions,
133                            addGuestPermissions);
134            }
135    
136            public static void addMessageResources(
137                    com.liferay.portlet.messageboards.model.MBMessage message,
138                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
139                    throws com.liferay.portal.kernel.exception.PortalException {
140                    getService()
141                            .addMessageResources(message, groupPermissions, guestPermissions);
142            }
143    
144            public static void addMessageResources(long messageId,
145                    boolean addGroupPermissions, boolean addGuestPermissions)
146                    throws com.liferay.portal.kernel.exception.PortalException {
147                    getService()
148                            .addMessageResources(messageId, addGroupPermissions,
149                            addGuestPermissions);
150            }
151    
152            public static void addMessageResources(long messageId,
153                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
154                    throws com.liferay.portal.kernel.exception.PortalException {
155                    getService()
156                            .addMessageResources(messageId, groupPermissions, guestPermissions);
157            }
158    
159            /**
160            * Creates a new message-boards message with the primary key. Does not add the message-boards message to the database.
161            *
162            * @param messageId the primary key for the new message-boards message
163            * @return the new message-boards message
164            */
165            public static com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
166                    long messageId) {
167                    return getService().createMBMessage(messageId);
168            }
169    
170            public static com.liferay.portlet.messageboards.model.MBMessage deleteDiscussionMessage(
171                    long messageId)
172                    throws com.liferay.portal.kernel.exception.PortalException {
173                    return getService().deleteDiscussionMessage(messageId);
174            }
175    
176            public static void deleteDiscussionMessages(java.lang.String className,
177                    long classPK)
178                    throws com.liferay.portal.kernel.exception.PortalException {
179                    getService().deleteDiscussionMessages(className, classPK);
180            }
181    
182            /**
183            * Deletes the message-boards message from the database. Also notifies the appropriate model listeners.
184            *
185            * @param mbMessage the message-boards message
186            * @return the message-boards message that was removed
187            */
188            public static com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
189                    com.liferay.portlet.messageboards.model.MBMessage mbMessage) {
190                    return getService().deleteMBMessage(mbMessage);
191            }
192    
193            /**
194            * Deletes the message-boards message with the primary key from the database. Also notifies the appropriate model listeners.
195            *
196            * @param messageId the primary key of the message-boards message
197            * @return the message-boards message that was removed
198            * @throws PortalException if a message-boards message with the primary key could not be found
199            */
200            public static com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
201                    long messageId)
202                    throws com.liferay.portal.kernel.exception.PortalException {
203                    return getService().deleteMBMessage(messageId);
204            }
205    
206            public static com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
207                    com.liferay.portlet.messageboards.model.MBMessage message)
208                    throws com.liferay.portal.kernel.exception.PortalException {
209                    return getService().deleteMessage(message);
210            }
211    
212            public static com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
213                    long messageId)
214                    throws com.liferay.portal.kernel.exception.PortalException {
215                    return getService().deleteMessage(messageId);
216            }
217    
218            public static void deleteMessageAttachment(long messageId,
219                    java.lang.String fileName)
220                    throws com.liferay.portal.kernel.exception.PortalException {
221                    getService().deleteMessageAttachment(messageId, fileName);
222            }
223    
224            public static void deleteMessageAttachments(long messageId)
225                    throws com.liferay.portal.kernel.exception.PortalException {
226                    getService().deleteMessageAttachments(messageId);
227            }
228    
229            /**
230            * @throws PortalException
231            */
232            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
233                    com.liferay.portal.model.PersistedModel persistedModel)
234                    throws com.liferay.portal.kernel.exception.PortalException {
235                    return getService().deletePersistedModel(persistedModel);
236            }
237    
238            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
239                    return getService().dynamicQuery();
240            }
241    
242            /**
243            * Performs a dynamic query on the database and returns the matching rows.
244            *
245            * @param dynamicQuery the dynamic query
246            * @return the matching rows
247            */
248            public static <T> java.util.List<T> dynamicQuery(
249                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
250                    return getService().dynamicQuery(dynamicQuery);
251            }
252    
253            /**
254            * Performs a dynamic query on the database and returns a range of the matching rows.
255            *
256            * <p>
257            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBMessageModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
258            * </p>
259            *
260            * @param dynamicQuery the dynamic query
261            * @param start the lower bound of the range of model instances
262            * @param end the upper bound of the range of model instances (not inclusive)
263            * @return the range of matching rows
264            */
265            public static <T> java.util.List<T> dynamicQuery(
266                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
267                    int end) {
268                    return getService().dynamicQuery(dynamicQuery, start, end);
269            }
270    
271            /**
272            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
273            *
274            * <p>
275            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBMessageModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
276            * </p>
277            *
278            * @param dynamicQuery the dynamic query
279            * @param start the lower bound of the range of model instances
280            * @param end the upper bound of the range of model instances (not inclusive)
281            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
282            * @return the ordered range of matching rows
283            */
284            public static <T> java.util.List<T> dynamicQuery(
285                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
286                    int end,
287                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
288                    return getService()
289                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
290            }
291    
292            /**
293            * Returns the number of rows that match the dynamic query.
294            *
295            * @param dynamicQuery the dynamic query
296            * @return the number of rows that match the dynamic query
297            */
298            public static long dynamicQueryCount(
299                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
300                    return getService().dynamicQueryCount(dynamicQuery);
301            }
302    
303            /**
304            * Returns the number of rows that match the dynamic query.
305            *
306            * @param dynamicQuery the dynamic query
307            * @param projection the projection to apply to the query
308            * @return the number of rows that match the dynamic query
309            */
310            public static long dynamicQueryCount(
311                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
312                    com.liferay.portal.kernel.dao.orm.Projection projection) {
313                    return getService().dynamicQueryCount(dynamicQuery, projection);
314            }
315    
316            public static com.liferay.portlet.messageboards.model.MBMessage fetchMBMessage(
317                    long messageId) {
318                    return getService().fetchMBMessage(messageId);
319            }
320    
321            /**
322            * Returns the message-boards message matching the UUID and group.
323            *
324            * @param uuid the message-boards message's UUID
325            * @param groupId the primary key of the group
326            * @return the matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
327            */
328            public static com.liferay.portlet.messageboards.model.MBMessage fetchMBMessageByUuidAndGroupId(
329                    java.lang.String uuid, long groupId) {
330                    return getService().fetchMBMessageByUuidAndGroupId(uuid, groupId);
331            }
332    
333            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
334                    return getService().getActionableDynamicQuery();
335            }
336    
337            /**
338            * Returns the Spring bean ID for this bean.
339            *
340            * @return the Spring bean ID for this bean
341            */
342            public static java.lang.String getBeanIdentifier() {
343                    return getService().getBeanIdentifier();
344            }
345    
346            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
347                    long groupId, long categoryId, int status, int start, int end) {
348                    return getService()
349                                       .getCategoryMessages(groupId, categoryId, status, start, end);
350            }
351    
352            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
353                    long groupId, long categoryId, int status, int start, int end,
354                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
355                    return getService()
356                                       .getCategoryMessages(groupId, categoryId, status, start,
357                            end, obc);
358            }
359    
360            public static int getCategoryMessagesCount(long groupId, long categoryId,
361                    int status) {
362                    return getService().getCategoryMessagesCount(groupId, categoryId, status);
363            }
364    
365            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
366                    long companyId, int status, int start, int end) {
367                    return getService().getCompanyMessages(companyId, status, start, end);
368            }
369    
370            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
371                    long companyId, int status, int start, int end,
372                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
373                    return getService()
374                                       .getCompanyMessages(companyId, status, start, end, obc);
375            }
376    
377            public static int getCompanyMessagesCount(long companyId, int status) {
378                    return getService().getCompanyMessagesCount(companyId, status);
379            }
380    
381            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
382                    long userId, long groupId, java.lang.String className, long classPK,
383                    int status) throws com.liferay.portal.kernel.exception.PortalException {
384                    return getService()
385                                       .getDiscussionMessageDisplay(userId, groupId, className,
386                            classPK, status);
387            }
388    
389            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
390                    long userId, long groupId, java.lang.String className, long classPK,
391                    int status, java.lang.String threadView)
392                    throws com.liferay.portal.kernel.exception.PortalException {
393                    return getService()
394                                       .getDiscussionMessageDisplay(userId, groupId, className,
395                            classPK, status, threadView);
396            }
397    
398            public static int getDiscussionMessagesCount(java.lang.String className,
399                    long classPK, int status) {
400                    return getService()
401                                       .getDiscussionMessagesCount(className, classPK, status);
402            }
403    
404            public static int getDiscussionMessagesCount(long classNameId,
405                    long classPK, int status) {
406                    return getService()
407                                       .getDiscussionMessagesCount(classNameId, classPK, status);
408            }
409    
410            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
411                    java.lang.String className) {
412                    return getService().getDiscussions(className);
413            }
414    
415            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
416                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
417                    return getService().getExportActionableDynamicQuery(portletDataContext);
418            }
419    
420            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
421                    long groupId, int status, int start, int end) {
422                    return getService().getGroupMessages(groupId, status, start, end);
423            }
424    
425            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
426                    long groupId, int status, int start, int end,
427                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
428                    return getService().getGroupMessages(groupId, status, start, end, obc);
429            }
430    
431            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
432                    long groupId, long userId, int status, int start, int end) {
433                    return getService().getGroupMessages(groupId, userId, status, start, end);
434            }
435    
436            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
437                    long groupId, long userId, int status, int start, int end,
438                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
439                    return getService()
440                                       .getGroupMessages(groupId, userId, status, start, end, obc);
441            }
442    
443            public static int getGroupMessagesCount(long groupId, int status) {
444                    return getService().getGroupMessagesCount(groupId, status);
445            }
446    
447            public static int getGroupMessagesCount(long groupId, long userId,
448                    int status) {
449                    return getService().getGroupMessagesCount(groupId, userId, status);
450            }
451    
452            /**
453            * Returns the message-boards message with the primary key.
454            *
455            * @param messageId the primary key of the message-boards message
456            * @return the message-boards message
457            * @throws PortalException if a message-boards message with the primary key could not be found
458            */
459            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
460                    long messageId)
461                    throws com.liferay.portal.kernel.exception.PortalException {
462                    return getService().getMBMessage(messageId);
463            }
464    
465            /**
466            * Returns the message-boards message matching the UUID and group.
467            *
468            * @param uuid the message-boards message's UUID
469            * @param groupId the primary key of the group
470            * @return the matching message-boards message
471            * @throws PortalException if a matching message-boards message could not be found
472            */
473            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
474                    java.lang.String uuid, long groupId)
475                    throws com.liferay.portal.kernel.exception.PortalException {
476                    return getService().getMBMessageByUuidAndGroupId(uuid, groupId);
477            }
478    
479            /**
480            * Returns a range of all the message-boards messages.
481            *
482            * <p>
483            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBMessageModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
484            * </p>
485            *
486            * @param start the lower bound of the range of message-boards messages
487            * @param end the upper bound of the range of message-boards messages (not inclusive)
488            * @return the range of message-boards messages
489            */
490            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
491                    int start, int end) {
492                    return getService().getMBMessages(start, end);
493            }
494    
495            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
496                    java.lang.String uuid, long companyId) {
497                    return getService().getMBMessagesByUuidAndCompanyId(uuid, companyId);
498            }
499    
500            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
501                    java.lang.String uuid, long companyId, int start, int end,
502                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> orderByComparator) {
503                    return getService()
504                                       .getMBMessagesByUuidAndCompanyId(uuid, companyId, start,
505                            end, orderByComparator);
506            }
507    
508            /**
509            * Returns the number of message-boards messages.
510            *
511            * @return the number of message-boards messages
512            */
513            public static int getMBMessagesCount() {
514                    return getService().getMBMessagesCount();
515            }
516    
517            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
518                    long messageId)
519                    throws com.liferay.portal.kernel.exception.PortalException {
520                    return getService().getMessage(messageId);
521            }
522    
523            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
524                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
525                    int status, java.lang.String threadView, boolean includePrevAndNext)
526                    throws com.liferay.portal.kernel.exception.PortalException {
527                    return getService()
528                                       .getMessageDisplay(userId, message, status, threadView,
529                            includePrevAndNext);
530            }
531    
532            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
533                    long userId, long messageId, int status, java.lang.String threadView,
534                    boolean includePrevAndNext)
535                    throws com.liferay.portal.kernel.exception.PortalException {
536                    return getService()
537                                       .getMessageDisplay(userId, messageId, status, threadView,
538                            includePrevAndNext);
539            }
540    
541            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
542                    java.lang.String className, long classPK, int status) {
543                    return getService().getMessages(className, classPK, status);
544            }
545    
546            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages() {
547                    return getService().getNoAssetMessages();
548            }
549    
550            public static com.liferay.portal.model.PersistedModel getPersistedModel(
551                    java.io.Serializable primaryKeyObj)
552                    throws com.liferay.portal.kernel.exception.PortalException {
553                    return getService().getPersistedModel(primaryKeyObj);
554            }
555    
556            public static int getPositionInThread(long messageId)
557                    throws com.liferay.portal.kernel.exception.PortalException {
558                    return getService().getPositionInThread(messageId);
559            }
560    
561            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
562                    long threadId, int status) {
563                    return getService().getThreadMessages(threadId, status);
564            }
565    
566            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
567                    long threadId, int status,
568                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator) {
569                    return getService().getThreadMessages(threadId, status, comparator);
570            }
571    
572            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
573                    long threadId, int status, int start, int end) {
574                    return getService().getThreadMessages(threadId, status, start, end);
575            }
576    
577            public static int getThreadMessagesCount(long threadId, int status) {
578                    return getService().getThreadMessagesCount(threadId, status);
579            }
580    
581            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
582                    long threadId, int status, int start, int end) {
583                    return getService()
584                                       .getThreadRepliesMessages(threadId, status, start, end);
585            }
586    
587            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
588                    long userId, java.lang.String className, long classPK, int status,
589                    int start, int end,
590                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
591                    return getService()
592                                       .getUserDiscussionMessages(userId, className, classPK,
593                            status, start, end, obc);
594            }
595    
596            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
597                    long userId, long classNameId, long classPK, int status, int start,
598                    int end,
599                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
600                    return getService()
601                                       .getUserDiscussionMessages(userId, classNameId, classPK,
602                            status, start, end, obc);
603            }
604    
605            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
606                    long userId, long[] classNameIds, int status, int start, int end,
607                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
608                    return getService()
609                                       .getUserDiscussionMessages(userId, classNameIds, status,
610                            start, end, obc);
611            }
612    
613            public static int getUserDiscussionMessagesCount(long userId,
614                    java.lang.String className, long classPK, int status) {
615                    return getService()
616                                       .getUserDiscussionMessagesCount(userId, className, classPK,
617                            status);
618            }
619    
620            public static int getUserDiscussionMessagesCount(long userId,
621                    long classNameId, long classPK, int status) {
622                    return getService()
623                                       .getUserDiscussionMessagesCount(userId, classNameId,
624                            classPK, status);
625            }
626    
627            public static int getUserDiscussionMessagesCount(long userId,
628                    long[] classNameIds, int status) {
629                    return getService()
630                                       .getUserDiscussionMessagesCount(userId, classNameIds, status);
631            }
632    
633            public static long moveMessageAttachmentToTrash(long userId,
634                    long messageId, java.lang.String fileName)
635                    throws com.liferay.portal.kernel.exception.PortalException {
636                    return getService()
637                                       .moveMessageAttachmentToTrash(userId, messageId, fileName);
638            }
639    
640            public static void restoreMessageAttachmentFromTrash(long userId,
641                    long messageId, java.lang.String deletedFileName)
642                    throws com.liferay.portal.kernel.exception.PortalException {
643                    getService()
644                            .restoreMessageAttachmentFromTrash(userId, messageId,
645                            deletedFileName);
646            }
647    
648            /**
649            * Sets the Spring bean ID for this bean.
650            *
651            * @param beanIdentifier the Spring bean ID for this bean
652            */
653            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
654                    getService().setBeanIdentifier(beanIdentifier);
655            }
656    
657            public static void subscribeMessage(long userId, long messageId)
658                    throws com.liferay.portal.kernel.exception.PortalException {
659                    getService().subscribeMessage(userId, messageId);
660            }
661    
662            public static void unsubscribeMessage(long userId, long messageId)
663                    throws com.liferay.portal.kernel.exception.PortalException {
664                    getService().unsubscribeMessage(userId, messageId);
665            }
666    
667            public static void updateAnswer(
668                    com.liferay.portlet.messageboards.model.MBMessage message,
669                    boolean answer, boolean cascade)
670                    throws com.liferay.portal.kernel.exception.PortalException {
671                    getService().updateAnswer(message, answer, cascade);
672            }
673    
674            public static void updateAnswer(long messageId, boolean answer,
675                    boolean cascade)
676                    throws com.liferay.portal.kernel.exception.PortalException {
677                    getService().updateAnswer(messageId, answer, cascade);
678            }
679    
680            public static void updateAsset(long userId,
681                    com.liferay.portlet.messageboards.model.MBMessage message,
682                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
683                    long[] assetLinkEntryIds)
684                    throws com.liferay.portal.kernel.exception.PortalException {
685                    getService()
686                            .updateAsset(userId, message, assetCategoryIds, assetTagNames,
687                            assetLinkEntryIds);
688            }
689    
690            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
691                    long userId, long messageId, java.lang.String className, long classPK,
692                    java.lang.String subject, java.lang.String body,
693                    com.liferay.portal.service.ServiceContext serviceContext)
694                    throws com.liferay.portal.kernel.exception.PortalException {
695                    return getService()
696                                       .updateDiscussionMessage(userId, messageId, className,
697                            classPK, subject, body, serviceContext);
698            }
699    
700            /**
701            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
702            *
703            * @param mbMessage the message-boards message
704            * @return the message-boards message that was updated
705            */
706            public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
707                    com.liferay.portlet.messageboards.model.MBMessage mbMessage) {
708                    return getService().updateMBMessage(mbMessage);
709            }
710    
711            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
712                    long messageId, java.lang.String body)
713                    throws com.liferay.portal.kernel.exception.PortalException {
714                    return getService().updateMessage(messageId, body);
715            }
716    
717            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
718                    long userId, long messageId, java.lang.String subject,
719                    java.lang.String body,
720                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
721                    java.util.List<java.lang.String> existingFiles, double priority,
722                    boolean allowPingbacks,
723                    com.liferay.portal.service.ServiceContext serviceContext)
724                    throws com.liferay.portal.kernel.exception.PortalException {
725                    return getService()
726                                       .updateMessage(userId, messageId, subject, body,
727                            inputStreamOVPs, existingFiles, priority, allowPingbacks,
728                            serviceContext);
729            }
730    
731            /**
732            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, long,
733            int, ServiceContext, Map)}
734            */
735            @Deprecated
736            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
737                    long userId, long messageId, int status,
738                    com.liferay.portal.service.ServiceContext serviceContext)
739                    throws com.liferay.portal.kernel.exception.PortalException {
740                    return getService()
741                                       .updateStatus(userId, messageId, status, serviceContext);
742            }
743    
744            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
745                    long userId, long messageId, int status,
746                    com.liferay.portal.service.ServiceContext serviceContext,
747                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
748                    throws com.liferay.portal.kernel.exception.PortalException {
749                    return getService()
750                                       .updateStatus(userId, messageId, status, serviceContext,
751                            workflowContext);
752            }
753    
754            public static void updateUserName(long userId, java.lang.String userName) {
755                    getService().updateUserName(userId, userName);
756            }
757    
758            public static MBMessageLocalService getService() {
759                    if (_service == null) {
760                            _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
761    
762                            ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
763                                    "_service");
764                    }
765    
766                    return _service;
767            }
768    
769            /**
770             * @deprecated As of 6.2.0
771             */
772            @Deprecated
773            public void setService(MBMessageLocalService service) {
774            }
775    
776            private static MBMessageLocalService _service;
777    }