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 matching the dynamic query.
294            *
295            * @param dynamicQuery the dynamic query
296            * @return the number of rows matching 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 matching 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 matching 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            /**
496            * Returns all the message-boards messages matching the UUID and company.
497            *
498            * @param uuid the UUID of the message-boards messages
499            * @param companyId the primary key of the company
500            * @return the matching message-boards messages, or an empty list if no matches were found
501            */
502            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
503                    java.lang.String uuid, long companyId) {
504                    return getService().getMBMessagesByUuidAndCompanyId(uuid, companyId);
505            }
506    
507            /**
508            * Returns a range of message-boards messages matching the UUID and company.
509            *
510            * @param uuid the UUID of the message-boards messages
511            * @param companyId the primary key of the company
512            * @param start the lower bound of the range of message-boards messages
513            * @param end the upper bound of the range of message-boards messages (not inclusive)
514            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
515            * @return the range of matching message-boards messages, or an empty list if no matches were found
516            */
517            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
518                    java.lang.String uuid, long companyId, int start, int end,
519                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> orderByComparator) {
520                    return getService()
521                                       .getMBMessagesByUuidAndCompanyId(uuid, companyId, start,
522                            end, orderByComparator);
523            }
524    
525            /**
526            * Returns the number of message-boards messages.
527            *
528            * @return the number of message-boards messages
529            */
530            public static int getMBMessagesCount() {
531                    return getService().getMBMessagesCount();
532            }
533    
534            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
535                    long messageId)
536                    throws com.liferay.portal.kernel.exception.PortalException {
537                    return getService().getMessage(messageId);
538            }
539    
540            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
541                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
542                    int status, java.lang.String threadView, boolean includePrevAndNext)
543                    throws com.liferay.portal.kernel.exception.PortalException {
544                    return getService()
545                                       .getMessageDisplay(userId, message, status, threadView,
546                            includePrevAndNext);
547            }
548    
549            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
550                    long userId, long messageId, int status, java.lang.String threadView,
551                    boolean includePrevAndNext)
552                    throws com.liferay.portal.kernel.exception.PortalException {
553                    return getService()
554                                       .getMessageDisplay(userId, messageId, status, threadView,
555                            includePrevAndNext);
556            }
557    
558            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
559                    java.lang.String className, long classPK, int status) {
560                    return getService().getMessages(className, classPK, status);
561            }
562    
563            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages() {
564                    return getService().getNoAssetMessages();
565            }
566    
567            public static com.liferay.portal.model.PersistedModel getPersistedModel(
568                    java.io.Serializable primaryKeyObj)
569                    throws com.liferay.portal.kernel.exception.PortalException {
570                    return getService().getPersistedModel(primaryKeyObj);
571            }
572    
573            public static int getPositionInThread(long messageId)
574                    throws com.liferay.portal.kernel.exception.PortalException {
575                    return getService().getPositionInThread(messageId);
576            }
577    
578            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
579                    long threadId, int status) {
580                    return getService().getThreadMessages(threadId, status);
581            }
582    
583            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
584                    long threadId, int status,
585                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator) {
586                    return getService().getThreadMessages(threadId, status, comparator);
587            }
588    
589            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
590                    long threadId, int status, int start, int end) {
591                    return getService().getThreadMessages(threadId, status, start, end);
592            }
593    
594            public static int getThreadMessagesCount(long threadId, int status) {
595                    return getService().getThreadMessagesCount(threadId, status);
596            }
597    
598            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
599                    long threadId, int status, int start, int end) {
600                    return getService()
601                                       .getThreadRepliesMessages(threadId, status, start, end);
602            }
603    
604            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
605                    long userId, java.lang.String className, long classPK, int status,
606                    int start, int end,
607                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
608                    return getService()
609                                       .getUserDiscussionMessages(userId, className, classPK,
610                            status, start, end, obc);
611            }
612    
613            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
614                    long userId, long classNameId, long classPK, int status, int start,
615                    int end,
616                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
617                    return getService()
618                                       .getUserDiscussionMessages(userId, classNameId, classPK,
619                            status, start, end, obc);
620            }
621    
622            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
623                    long userId, long[] classNameIds, int status, int start, int end,
624                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
625                    return getService()
626                                       .getUserDiscussionMessages(userId, classNameIds, status,
627                            start, end, obc);
628            }
629    
630            public static int getUserDiscussionMessagesCount(long userId,
631                    java.lang.String className, long classPK, int status) {
632                    return getService()
633                                       .getUserDiscussionMessagesCount(userId, className, classPK,
634                            status);
635            }
636    
637            public static int getUserDiscussionMessagesCount(long userId,
638                    long classNameId, long classPK, int status) {
639                    return getService()
640                                       .getUserDiscussionMessagesCount(userId, classNameId,
641                            classPK, status);
642            }
643    
644            public static int getUserDiscussionMessagesCount(long userId,
645                    long[] classNameIds, int status) {
646                    return getService()
647                                       .getUserDiscussionMessagesCount(userId, classNameIds, status);
648            }
649    
650            public static long moveMessageAttachmentToTrash(long userId,
651                    long messageId, java.lang.String fileName)
652                    throws com.liferay.portal.kernel.exception.PortalException {
653                    return getService()
654                                       .moveMessageAttachmentToTrash(userId, messageId, fileName);
655            }
656    
657            public static void restoreMessageAttachmentFromTrash(long userId,
658                    long messageId, java.lang.String deletedFileName)
659                    throws com.liferay.portal.kernel.exception.PortalException {
660                    getService()
661                            .restoreMessageAttachmentFromTrash(userId, messageId,
662                            deletedFileName);
663            }
664    
665            /**
666            * Sets the Spring bean ID for this bean.
667            *
668            * @param beanIdentifier the Spring bean ID for this bean
669            */
670            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
671                    getService().setBeanIdentifier(beanIdentifier);
672            }
673    
674            public static void subscribeMessage(long userId, long messageId)
675                    throws com.liferay.portal.kernel.exception.PortalException {
676                    getService().subscribeMessage(userId, messageId);
677            }
678    
679            public static void unsubscribeMessage(long userId, long messageId)
680                    throws com.liferay.portal.kernel.exception.PortalException {
681                    getService().unsubscribeMessage(userId, messageId);
682            }
683    
684            public static void updateAnswer(
685                    com.liferay.portlet.messageboards.model.MBMessage message,
686                    boolean answer, boolean cascade)
687                    throws com.liferay.portal.kernel.exception.PortalException {
688                    getService().updateAnswer(message, answer, cascade);
689            }
690    
691            public static void updateAnswer(long messageId, boolean answer,
692                    boolean cascade)
693                    throws com.liferay.portal.kernel.exception.PortalException {
694                    getService().updateAnswer(messageId, answer, cascade);
695            }
696    
697            public static void updateAsset(long userId,
698                    com.liferay.portlet.messageboards.model.MBMessage message,
699                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
700                    long[] assetLinkEntryIds)
701                    throws com.liferay.portal.kernel.exception.PortalException {
702                    getService()
703                            .updateAsset(userId, message, assetCategoryIds, assetTagNames,
704                            assetLinkEntryIds);
705            }
706    
707            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
708                    long userId, long messageId, java.lang.String className, long classPK,
709                    java.lang.String subject, java.lang.String body,
710                    com.liferay.portal.service.ServiceContext serviceContext)
711                    throws com.liferay.portal.kernel.exception.PortalException {
712                    return getService()
713                                       .updateDiscussionMessage(userId, messageId, className,
714                            classPK, subject, body, serviceContext);
715            }
716    
717            /**
718            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
719            *
720            * @param mbMessage the message-boards message
721            * @return the message-boards message that was updated
722            */
723            public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
724                    com.liferay.portlet.messageboards.model.MBMessage mbMessage) {
725                    return getService().updateMBMessage(mbMessage);
726            }
727    
728            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
729                    long messageId, java.lang.String body)
730                    throws com.liferay.portal.kernel.exception.PortalException {
731                    return getService().updateMessage(messageId, body);
732            }
733    
734            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
735                    long userId, long messageId, java.lang.String subject,
736                    java.lang.String body,
737                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
738                    java.util.List<java.lang.String> existingFiles, double priority,
739                    boolean allowPingbacks,
740                    com.liferay.portal.service.ServiceContext serviceContext)
741                    throws com.liferay.portal.kernel.exception.PortalException {
742                    return getService()
743                                       .updateMessage(userId, messageId, subject, body,
744                            inputStreamOVPs, existingFiles, priority, allowPingbacks,
745                            serviceContext);
746            }
747    
748            /**
749            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, long,
750            int, ServiceContext, Map)}
751            */
752            @Deprecated
753            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
754                    long userId, long messageId, int status,
755                    com.liferay.portal.service.ServiceContext serviceContext)
756                    throws com.liferay.portal.kernel.exception.PortalException {
757                    return getService()
758                                       .updateStatus(userId, messageId, status, serviceContext);
759            }
760    
761            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
762                    long userId, long messageId, int status,
763                    com.liferay.portal.service.ServiceContext serviceContext,
764                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
765                    throws com.liferay.portal.kernel.exception.PortalException {
766                    return getService()
767                                       .updateStatus(userId, messageId, status, serviceContext,
768                            workflowContext);
769            }
770    
771            public static void updateUserName(long userId, java.lang.String userName) {
772                    getService().updateUserName(userId, userName);
773            }
774    
775            public static MBMessageLocalService getService() {
776                    if (_service == null) {
777                            _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
778    
779                            ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
780                                    "_service");
781                    }
782    
783                    return _service;
784            }
785    
786            /**
787             * @deprecated As of 6.2.0
788             */
789            @Deprecated
790            public void setService(MBMessageLocalService service) {
791            }
792    
793            private static MBMessageLocalService _service;
794    }