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, java.lang.String fileName, java.io.File file,
093                    boolean anonymous, double priority, boolean allowPingbacks,
094                    com.liferay.portal.service.ServiceContext serviceContext)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            java.io.FileNotFoundException {
097                    return getService()
098                                       .addMessage(userId, userName, groupId, categoryId, subject,
099                            body, format, fileName, file, 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                    java.lang.String format,
107                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
108                    boolean anonymous, double priority, boolean allowPingbacks,
109                    com.liferay.portal.service.ServiceContext serviceContext)
110                    throws com.liferay.portal.kernel.exception.PortalException {
111                    return getService()
112                                       .addMessage(userId, userName, groupId, categoryId, subject,
113                            body, format, inputStreamOVPs, anonymous, priority, allowPingbacks,
114                            serviceContext);
115            }
116    
117            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
118                    long userId, java.lang.String userName, long groupId, long categoryId,
119                    java.lang.String subject, java.lang.String body,
120                    com.liferay.portal.service.ServiceContext serviceContext)
121                    throws com.liferay.portal.kernel.exception.PortalException {
122                    return getService()
123                                       .addMessage(userId, userName, groupId, categoryId, subject,
124                            body, serviceContext);
125            }
126    
127            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
128                    long userId, java.lang.String userName, long groupId, long categoryId,
129                    long threadId, long parentMessageId, java.lang.String subject,
130                    java.lang.String body, java.lang.String format,
131                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
132                    boolean anonymous, double priority, boolean allowPingbacks,
133                    com.liferay.portal.service.ServiceContext serviceContext)
134                    throws com.liferay.portal.kernel.exception.PortalException {
135                    return getService()
136                                       .addMessage(userId, userName, groupId, categoryId, threadId,
137                            parentMessageId, subject, body, format, inputStreamOVPs, anonymous,
138                            priority, allowPingbacks, serviceContext);
139            }
140    
141            public static void addMessageAttachment(long userId, long messageId,
142                    java.lang.String fileName, java.io.File file, java.lang.String mimeType)
143                    throws com.liferay.portal.kernel.exception.PortalException {
144                    getService()
145                            .addMessageAttachment(userId, messageId, fileName, file, mimeType);
146            }
147    
148            public static void addMessageResources(
149                    com.liferay.portlet.messageboards.model.MBMessage message,
150                    boolean addGroupPermissions, boolean addGuestPermissions)
151                    throws com.liferay.portal.kernel.exception.PortalException {
152                    getService()
153                            .addMessageResources(message, addGroupPermissions,
154                            addGuestPermissions);
155            }
156    
157            public static void addMessageResources(
158                    com.liferay.portlet.messageboards.model.MBMessage message,
159                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
160                    throws com.liferay.portal.kernel.exception.PortalException {
161                    getService().addMessageResources(message, modelPermissions);
162            }
163    
164            public static void addMessageResources(long messageId,
165                    boolean addGroupPermissions, boolean addGuestPermissions)
166                    throws com.liferay.portal.kernel.exception.PortalException {
167                    getService()
168                            .addMessageResources(messageId, addGroupPermissions,
169                            addGuestPermissions);
170            }
171    
172            public static void addMessageResources(long messageId,
173                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
174                    throws com.liferay.portal.kernel.exception.PortalException {
175                    getService().addMessageResources(messageId, modelPermissions);
176            }
177    
178            /**
179            * Creates a new message-boards message with the primary key. Does not add the message-boards message to the database.
180            *
181            * @param messageId the primary key for the new message-boards message
182            * @return the new message-boards message
183            */
184            public static com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
185                    long messageId) {
186                    return getService().createMBMessage(messageId);
187            }
188    
189            public static com.liferay.portlet.messageboards.model.MBMessage deleteDiscussionMessage(
190                    long messageId)
191                    throws com.liferay.portal.kernel.exception.PortalException {
192                    return getService().deleteDiscussionMessage(messageId);
193            }
194    
195            public static void deleteDiscussionMessages(java.lang.String className,
196                    long classPK)
197                    throws com.liferay.portal.kernel.exception.PortalException {
198                    getService().deleteDiscussionMessages(className, classPK);
199            }
200    
201            /**
202            * Deletes the message-boards message from the database. Also notifies the appropriate model listeners.
203            *
204            * @param mbMessage the message-boards message
205            * @return the message-boards message that was removed
206            */
207            public static com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
208                    com.liferay.portlet.messageboards.model.MBMessage mbMessage) {
209                    return getService().deleteMBMessage(mbMessage);
210            }
211    
212            /**
213            * Deletes the message-boards message with the primary key from the database. Also notifies the appropriate model listeners.
214            *
215            * @param messageId the primary key of the message-boards message
216            * @return the message-boards message that was removed
217            * @throws PortalException if a message-boards message with the primary key could not be found
218            */
219            public static com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
220                    long messageId)
221                    throws com.liferay.portal.kernel.exception.PortalException {
222                    return getService().deleteMBMessage(messageId);
223            }
224    
225            public static com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
226                    com.liferay.portlet.messageboards.model.MBMessage message)
227                    throws com.liferay.portal.kernel.exception.PortalException {
228                    return getService().deleteMessage(message);
229            }
230    
231            public static com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
232                    long messageId)
233                    throws com.liferay.portal.kernel.exception.PortalException {
234                    return getService().deleteMessage(messageId);
235            }
236    
237            public static void deleteMessageAttachment(long messageId,
238                    java.lang.String fileName)
239                    throws com.liferay.portal.kernel.exception.PortalException {
240                    getService().deleteMessageAttachment(messageId, fileName);
241            }
242    
243            public static void deleteMessageAttachments(long messageId)
244                    throws com.liferay.portal.kernel.exception.PortalException {
245                    getService().deleteMessageAttachments(messageId);
246            }
247    
248            /**
249            * @throws PortalException
250            */
251            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
252                    com.liferay.portal.model.PersistedModel persistedModel)
253                    throws com.liferay.portal.kernel.exception.PortalException {
254                    return getService().deletePersistedModel(persistedModel);
255            }
256    
257            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
258                    return getService().dynamicQuery();
259            }
260    
261            /**
262            * Performs a dynamic query on the database and returns the matching rows.
263            *
264            * @param dynamicQuery the dynamic query
265            * @return the matching rows
266            */
267            public static <T> java.util.List<T> dynamicQuery(
268                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
269                    return getService().dynamicQuery(dynamicQuery);
270            }
271    
272            /**
273            * Performs a dynamic query on the database and returns a range of the matching rows.
274            *
275            * <p>
276            * 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.
277            * </p>
278            *
279            * @param dynamicQuery the dynamic query
280            * @param start the lower bound of the range of model instances
281            * @param end the upper bound of the range of model instances (not inclusive)
282            * @return the 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                    return getService().dynamicQuery(dynamicQuery, start, end);
288            }
289    
290            /**
291            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
292            *
293            * <p>
294            * 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.
295            * </p>
296            *
297            * @param dynamicQuery the dynamic query
298            * @param start the lower bound of the range of model instances
299            * @param end the upper bound of the range of model instances (not inclusive)
300            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
301            * @return the ordered range of matching rows
302            */
303            public static <T> java.util.List<T> dynamicQuery(
304                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
305                    int end,
306                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
307                    return getService()
308                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
309            }
310    
311            /**
312            * Returns the number of rows matching the dynamic query.
313            *
314            * @param dynamicQuery the dynamic query
315            * @return the number of rows matching the dynamic query
316            */
317            public static long dynamicQueryCount(
318                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
319                    return getService().dynamicQueryCount(dynamicQuery);
320            }
321    
322            /**
323            * Returns the number of rows matching the dynamic query.
324            *
325            * @param dynamicQuery the dynamic query
326            * @param projection the projection to apply to the query
327            * @return the number of rows matching the dynamic query
328            */
329            public static long dynamicQueryCount(
330                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
331                    com.liferay.portal.kernel.dao.orm.Projection projection) {
332                    return getService().dynamicQueryCount(dynamicQuery, projection);
333            }
334    
335            public static void emptyMessageAttachments(long messageId)
336                    throws com.liferay.portal.kernel.exception.PortalException {
337                    getService().emptyMessageAttachments(messageId);
338            }
339    
340            public static com.liferay.portlet.messageboards.model.MBMessage fetchMBMessage(
341                    long messageId) {
342                    return getService().fetchMBMessage(messageId);
343            }
344    
345            /**
346            * Returns the message-boards message matching the UUID and group.
347            *
348            * @param uuid the message-boards message's UUID
349            * @param groupId the primary key of the group
350            * @return the matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
351            */
352            public static com.liferay.portlet.messageboards.model.MBMessage fetchMBMessageByUuidAndGroupId(
353                    java.lang.String uuid, long groupId) {
354                    return getService().fetchMBMessageByUuidAndGroupId(uuid, groupId);
355            }
356    
357            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
358                    return getService().getActionableDynamicQuery();
359            }
360    
361            /**
362            * Returns the Spring bean ID for this bean.
363            *
364            * @return the Spring bean ID for this bean
365            */
366            public static java.lang.String getBeanIdentifier() {
367                    return getService().getBeanIdentifier();
368            }
369    
370            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
371                    long groupId, long categoryId, int status, int start, int end) {
372                    return getService()
373                                       .getCategoryMessages(groupId, categoryId, status, start, end);
374            }
375    
376            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
377                    long groupId, long categoryId, int status, int start, int end,
378                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
379                    return getService()
380                                       .getCategoryMessages(groupId, categoryId, status, start,
381                            end, obc);
382            }
383    
384            public static int getCategoryMessagesCount(long groupId, long categoryId,
385                    int status) {
386                    return getService().getCategoryMessagesCount(groupId, categoryId, status);
387            }
388    
389            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
390                    long companyId, int status, int start, int end) {
391                    return getService().getCompanyMessages(companyId, status, start, end);
392            }
393    
394            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
395                    long companyId, int status, int start, int end,
396                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
397                    return getService()
398                                       .getCompanyMessages(companyId, status, start, end, obc);
399            }
400    
401            public static int getCompanyMessagesCount(long companyId, int status) {
402                    return getService().getCompanyMessagesCount(companyId, status);
403            }
404    
405            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
406                    long userId, long groupId, java.lang.String className, long classPK,
407                    int status) throws com.liferay.portal.kernel.exception.PortalException {
408                    return getService()
409                                       .getDiscussionMessageDisplay(userId, groupId, className,
410                            classPK, status);
411            }
412    
413            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
414                    long userId, long groupId, java.lang.String className, long classPK,
415                    int status,
416                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
417                    throws com.liferay.portal.kernel.exception.PortalException {
418                    return getService()
419                                       .getDiscussionMessageDisplay(userId, groupId, className,
420                            classPK, status, comparator);
421            }
422    
423            /**
424            * @deprecated As of 7.0.0, replaced by {@link
425            #getDiscussionMessageDisplay(long, long, String, long, int)}
426            */
427            @Deprecated
428            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
429                    long userId, long groupId, java.lang.String className, long classPK,
430                    int status, java.lang.String threadView)
431                    throws com.liferay.portal.kernel.exception.PortalException {
432                    return getService()
433                                       .getDiscussionMessageDisplay(userId, groupId, className,
434                            classPK, status, threadView);
435            }
436    
437            public static int getDiscussionMessagesCount(java.lang.String className,
438                    long classPK, int status) {
439                    return getService()
440                                       .getDiscussionMessagesCount(className, classPK, status);
441            }
442    
443            public static int getDiscussionMessagesCount(long classNameId,
444                    long classPK, int status) {
445                    return getService()
446                                       .getDiscussionMessagesCount(classNameId, classPK, status);
447            }
448    
449            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
450                    java.lang.String className) {
451                    return getService().getDiscussions(className);
452            }
453    
454            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
455                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
456                    return getService().getExportActionableDynamicQuery(portletDataContext);
457            }
458    
459            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
460                    long groupId, int status, int start, int end) {
461                    return getService().getGroupMessages(groupId, status, start, end);
462            }
463    
464            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
465                    long groupId, int status, int start, int end,
466                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
467                    return getService().getGroupMessages(groupId, status, start, end, obc);
468            }
469    
470            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
471                    long groupId, long userId, int status, int start, int end) {
472                    return getService().getGroupMessages(groupId, userId, status, start, end);
473            }
474    
475            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
476                    long groupId, long userId, int status, int start, int end,
477                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
478                    return getService()
479                                       .getGroupMessages(groupId, userId, status, start, end, obc);
480            }
481    
482            public static int getGroupMessagesCount(long groupId, int status) {
483                    return getService().getGroupMessagesCount(groupId, status);
484            }
485    
486            public static int getGroupMessagesCount(long groupId, long userId,
487                    int status) {
488                    return getService().getGroupMessagesCount(groupId, userId, status);
489            }
490    
491            /**
492            * Returns the message-boards message with the primary key.
493            *
494            * @param messageId the primary key of the message-boards message
495            * @return the message-boards message
496            * @throws PortalException if a message-boards message with the primary key could not be found
497            */
498            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
499                    long messageId)
500                    throws com.liferay.portal.kernel.exception.PortalException {
501                    return getService().getMBMessage(messageId);
502            }
503    
504            /**
505            * Returns the message-boards message matching the UUID and group.
506            *
507            * @param uuid the message-boards message's UUID
508            * @param groupId the primary key of the group
509            * @return the matching message-boards message
510            * @throws PortalException if a matching message-boards message could not be found
511            */
512            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
513                    java.lang.String uuid, long groupId)
514                    throws com.liferay.portal.kernel.exception.PortalException {
515                    return getService().getMBMessageByUuidAndGroupId(uuid, groupId);
516            }
517    
518            /**
519            * Returns a range of all the message-boards messages.
520            *
521            * <p>
522            * 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.
523            * </p>
524            *
525            * @param start the lower bound of the range of message-boards messages
526            * @param end the upper bound of the range of message-boards messages (not inclusive)
527            * @return the range of message-boards messages
528            */
529            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
530                    int start, int end) {
531                    return getService().getMBMessages(start, end);
532            }
533    
534            /**
535            * Returns all the message-boards messages matching the UUID and company.
536            *
537            * @param uuid the UUID of the message-boards messages
538            * @param companyId the primary key of the company
539            * @return the matching message-boards messages, or an empty list if no matches were found
540            */
541            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
542                    java.lang.String uuid, long companyId) {
543                    return getService().getMBMessagesByUuidAndCompanyId(uuid, companyId);
544            }
545    
546            /**
547            * Returns a range of message-boards messages matching the UUID and company.
548            *
549            * @param uuid the UUID of the message-boards messages
550            * @param companyId the primary key of the company
551            * @param start the lower bound of the range of message-boards messages
552            * @param end the upper bound of the range of message-boards messages (not inclusive)
553            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
554            * @return the range of matching message-boards messages, or an empty list if no matches were found
555            */
556            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
557                    java.lang.String uuid, long companyId, int start, int end,
558                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> orderByComparator) {
559                    return getService()
560                                       .getMBMessagesByUuidAndCompanyId(uuid, companyId, start,
561                            end, orderByComparator);
562            }
563    
564            /**
565            * Returns the number of message-boards messages.
566            *
567            * @return the number of message-boards messages
568            */
569            public static int getMBMessagesCount() {
570                    return getService().getMBMessagesCount();
571            }
572    
573            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
574                    long messageId)
575                    throws com.liferay.portal.kernel.exception.PortalException {
576                    return getService().getMessage(messageId);
577            }
578    
579            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
580                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
581                    int status, java.lang.String threadView, boolean includePrevAndNext)
582                    throws com.liferay.portal.kernel.exception.PortalException {
583                    return getService()
584                                       .getMessageDisplay(userId, message, status, threadView,
585                            includePrevAndNext);
586            }
587    
588            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
589                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
590                    int status, java.lang.String threadView, boolean includePrevAndNext,
591                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
592                    throws com.liferay.portal.kernel.exception.PortalException {
593                    return getService()
594                                       .getMessageDisplay(userId, message, status, threadView,
595                            includePrevAndNext, comparator);
596            }
597    
598            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
599                    long userId, long messageId, int status, java.lang.String threadView,
600                    boolean includePrevAndNext)
601                    throws com.liferay.portal.kernel.exception.PortalException {
602                    return getService()
603                                       .getMessageDisplay(userId, messageId, status, threadView,
604                            includePrevAndNext);
605            }
606    
607            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
608                    java.lang.String className, long classPK, int status) {
609                    return getService().getMessages(className, classPK, status);
610            }
611    
612            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages() {
613                    return getService().getNoAssetMessages();
614            }
615    
616            public static com.liferay.portal.model.PersistedModel getPersistedModel(
617                    java.io.Serializable primaryKeyObj)
618                    throws com.liferay.portal.kernel.exception.PortalException {
619                    return getService().getPersistedModel(primaryKeyObj);
620            }
621    
622            public static int getPositionInThread(long messageId)
623                    throws com.liferay.portal.kernel.exception.PortalException {
624                    return getService().getPositionInThread(messageId);
625            }
626    
627            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
628                    long threadId, int status) {
629                    return getService().getThreadMessages(threadId, status);
630            }
631    
632            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
633                    long threadId, int status,
634                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator) {
635                    return getService().getThreadMessages(threadId, status, comparator);
636            }
637    
638            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
639                    long threadId, int status, int start, int end) {
640                    return getService().getThreadMessages(threadId, status, start, end);
641            }
642    
643            public static int getThreadMessagesCount(long threadId, int status) {
644                    return getService().getThreadMessagesCount(threadId, status);
645            }
646    
647            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
648                    long threadId, int status, int start, int end) {
649                    return getService()
650                                       .getThreadRepliesMessages(threadId, status, start, end);
651            }
652    
653            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
654                    long userId, java.lang.String className, long classPK, int status,
655                    int start, int end,
656                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
657                    return getService()
658                                       .getUserDiscussionMessages(userId, className, classPK,
659                            status, start, end, obc);
660            }
661    
662            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
663                    long userId, long classNameId, long classPK, int status, int start,
664                    int end,
665                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
666                    return getService()
667                                       .getUserDiscussionMessages(userId, classNameId, classPK,
668                            status, start, end, obc);
669            }
670    
671            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
672                    long userId, long[] classNameIds, int status, int start, int end,
673                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
674                    return getService()
675                                       .getUserDiscussionMessages(userId, classNameIds, status,
676                            start, end, obc);
677            }
678    
679            public static int getUserDiscussionMessagesCount(long userId,
680                    java.lang.String className, long classPK, int status) {
681                    return getService()
682                                       .getUserDiscussionMessagesCount(userId, className, classPK,
683                            status);
684            }
685    
686            public static int getUserDiscussionMessagesCount(long userId,
687                    long classNameId, long classPK, int status) {
688                    return getService()
689                                       .getUserDiscussionMessagesCount(userId, classNameId,
690                            classPK, status);
691            }
692    
693            public static int getUserDiscussionMessagesCount(long userId,
694                    long[] classNameIds, int status) {
695                    return getService()
696                                       .getUserDiscussionMessagesCount(userId, classNameIds, status);
697            }
698    
699            public static long moveMessageAttachmentToTrash(long userId,
700                    long messageId, java.lang.String fileName)
701                    throws com.liferay.portal.kernel.exception.PortalException {
702                    return getService()
703                                       .moveMessageAttachmentToTrash(userId, messageId, fileName);
704            }
705    
706            public static void restoreMessageAttachmentFromTrash(long userId,
707                    long messageId, java.lang.String deletedFileName)
708                    throws com.liferay.portal.kernel.exception.PortalException {
709                    getService()
710                            .restoreMessageAttachmentFromTrash(userId, messageId,
711                            deletedFileName);
712            }
713    
714            /**
715            * Sets the Spring bean ID for this bean.
716            *
717            * @param beanIdentifier the Spring bean ID for this bean
718            */
719            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
720                    getService().setBeanIdentifier(beanIdentifier);
721            }
722    
723            public static void subscribeMessage(long userId, long messageId)
724                    throws com.liferay.portal.kernel.exception.PortalException {
725                    getService().subscribeMessage(userId, messageId);
726            }
727    
728            public static void unsubscribeMessage(long userId, long messageId)
729                    throws com.liferay.portal.kernel.exception.PortalException {
730                    getService().unsubscribeMessage(userId, messageId);
731            }
732    
733            public static void updateAnswer(
734                    com.liferay.portlet.messageboards.model.MBMessage message,
735                    boolean answer, boolean cascade)
736                    throws com.liferay.portal.kernel.exception.PortalException {
737                    getService().updateAnswer(message, answer, cascade);
738            }
739    
740            public static void updateAnswer(long messageId, boolean answer,
741                    boolean cascade)
742                    throws com.liferay.portal.kernel.exception.PortalException {
743                    getService().updateAnswer(messageId, answer, cascade);
744            }
745    
746            public static void updateAsset(long userId,
747                    com.liferay.portlet.messageboards.model.MBMessage message,
748                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
749                    long[] assetLinkEntryIds)
750                    throws com.liferay.portal.kernel.exception.PortalException {
751                    getService()
752                            .updateAsset(userId, message, assetCategoryIds, assetTagNames,
753                            assetLinkEntryIds);
754            }
755    
756            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
757                    long userId, long messageId, java.lang.String className, long classPK,
758                    java.lang.String subject, java.lang.String body,
759                    com.liferay.portal.service.ServiceContext serviceContext)
760                    throws com.liferay.portal.kernel.exception.PortalException {
761                    return getService()
762                                       .updateDiscussionMessage(userId, messageId, className,
763                            classPK, subject, body, serviceContext);
764            }
765    
766            /**
767            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
768            *
769            * @param mbMessage the message-boards message
770            * @return the message-boards message that was updated
771            */
772            public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
773                    com.liferay.portlet.messageboards.model.MBMessage mbMessage) {
774                    return getService().updateMBMessage(mbMessage);
775            }
776    
777            /**
778            * @deprecated As of 7.0.0, with no direct replacement
779            */
780            @Deprecated
781            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
782                    long messageId, java.lang.String body)
783                    throws com.liferay.portal.kernel.exception.PortalException {
784                    return getService().updateMessage(messageId, body);
785            }
786    
787            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
788                    long userId, long messageId, java.lang.String body,
789                    com.liferay.portal.service.ServiceContext serviceContext)
790                    throws com.liferay.portal.kernel.exception.PortalException {
791                    return getService()
792                                       .updateMessage(userId, messageId, body, serviceContext);
793            }
794    
795            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
796                    long userId, long messageId, java.lang.String subject,
797                    java.lang.String body,
798                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
799                    java.util.List<java.lang.String> existingFiles, double priority,
800                    boolean allowPingbacks,
801                    com.liferay.portal.service.ServiceContext serviceContext)
802                    throws com.liferay.portal.kernel.exception.PortalException {
803                    return getService()
804                                       .updateMessage(userId, messageId, subject, body,
805                            inputStreamOVPs, existingFiles, priority, allowPingbacks,
806                            serviceContext);
807            }
808    
809            /**
810            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, long,
811            int, ServiceContext, Map)}
812            */
813            @Deprecated
814            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
815                    long userId, long messageId, int status,
816                    com.liferay.portal.service.ServiceContext serviceContext)
817                    throws com.liferay.portal.kernel.exception.PortalException {
818                    return getService()
819                                       .updateStatus(userId, messageId, status, serviceContext);
820            }
821    
822            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
823                    long userId, long messageId, int status,
824                    com.liferay.portal.service.ServiceContext serviceContext,
825                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
826                    throws com.liferay.portal.kernel.exception.PortalException {
827                    return getService()
828                                       .updateStatus(userId, messageId, status, serviceContext,
829                            workflowContext);
830            }
831    
832            public static void updateUserName(long userId, java.lang.String userName) {
833                    getService().updateUserName(userId, userName);
834            }
835    
836            public static MBMessageLocalService getService() {
837                    if (_service == null) {
838                            _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
839    
840                            ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
841                                    "_service");
842                    }
843    
844                    return _service;
845            }
846    
847            /**
848             * @deprecated As of 6.2.0
849             */
850            @Deprecated
851            public void setService(MBMessageLocalService service) {
852            }
853    
854            private static MBMessageLocalService _service;
855    }