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            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
362                    long groupId, long categoryId, int status, int start, int end) {
363                    return getService()
364                                       .getCategoryMessages(groupId, categoryId, status, start, end);
365            }
366    
367            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
368                    long groupId, long categoryId, int status, int start, int end,
369                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
370                    return getService()
371                                       .getCategoryMessages(groupId, categoryId, status, start,
372                            end, obc);
373            }
374    
375            public static int getCategoryMessagesCount(long groupId, long categoryId,
376                    int status) {
377                    return getService().getCategoryMessagesCount(groupId, categoryId, status);
378            }
379    
380            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
381                    long companyId, int status, int start, int end) {
382                    return getService().getCompanyMessages(companyId, status, start, end);
383            }
384    
385            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
386                    long companyId, int status, int start, int end,
387                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
388                    return getService()
389                                       .getCompanyMessages(companyId, status, start, end, obc);
390            }
391    
392            public static int getCompanyMessagesCount(long companyId, int status) {
393                    return getService().getCompanyMessagesCount(companyId, status);
394            }
395    
396            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
397                    long userId, long groupId, java.lang.String className, long classPK,
398                    int status) throws com.liferay.portal.kernel.exception.PortalException {
399                    return getService()
400                                       .getDiscussionMessageDisplay(userId, groupId, className,
401                            classPK, status);
402            }
403    
404            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
405                    long userId, long groupId, java.lang.String className, long classPK,
406                    int status,
407                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
408                    throws com.liferay.portal.kernel.exception.PortalException {
409                    return getService()
410                                       .getDiscussionMessageDisplay(userId, groupId, className,
411                            classPK, status, comparator);
412            }
413    
414            /**
415            * @deprecated As of 7.0.0, replaced by {@link
416            #getDiscussionMessageDisplay(long, long, String, long, int)}
417            */
418            @Deprecated
419            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
420                    long userId, long groupId, java.lang.String className, long classPK,
421                    int status, java.lang.String threadView)
422                    throws com.liferay.portal.kernel.exception.PortalException {
423                    return getService()
424                                       .getDiscussionMessageDisplay(userId, groupId, className,
425                            classPK, status, threadView);
426            }
427    
428            public static int getDiscussionMessagesCount(java.lang.String className,
429                    long classPK, int status) {
430                    return getService()
431                                       .getDiscussionMessagesCount(className, classPK, status);
432            }
433    
434            public static int getDiscussionMessagesCount(long classNameId,
435                    long classPK, int status) {
436                    return getService()
437                                       .getDiscussionMessagesCount(classNameId, classPK, status);
438            }
439    
440            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
441                    java.lang.String className) {
442                    return getService().getDiscussions(className);
443            }
444    
445            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
446                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
447                    return getService().getExportActionableDynamicQuery(portletDataContext);
448            }
449    
450            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
451                    long groupId, int status, int start, int end) {
452                    return getService().getGroupMessages(groupId, status, start, end);
453            }
454    
455            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
456                    long groupId, int status, int start, int end,
457                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
458                    return getService().getGroupMessages(groupId, status, start, end, obc);
459            }
460    
461            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
462                    long groupId, long userId, int status, int start, int end) {
463                    return getService().getGroupMessages(groupId, userId, status, start, end);
464            }
465    
466            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
467                    long groupId, long userId, int status, int start, int end,
468                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
469                    return getService()
470                                       .getGroupMessages(groupId, userId, status, start, end, obc);
471            }
472    
473            public static int getGroupMessagesCount(long groupId, int status) {
474                    return getService().getGroupMessagesCount(groupId, status);
475            }
476    
477            public static int getGroupMessagesCount(long groupId, long userId,
478                    int status) {
479                    return getService().getGroupMessagesCount(groupId, userId, status);
480            }
481    
482            /**
483            * Returns the message-boards message with the primary key.
484            *
485            * @param messageId the primary key of the message-boards message
486            * @return the message-boards message
487            * @throws PortalException if a message-boards message with the primary key could not be found
488            */
489            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
490                    long messageId)
491                    throws com.liferay.portal.kernel.exception.PortalException {
492                    return getService().getMBMessage(messageId);
493            }
494    
495            /**
496            * Returns the message-boards message matching the UUID and group.
497            *
498            * @param uuid the message-boards message's UUID
499            * @param groupId the primary key of the group
500            * @return the matching message-boards message
501            * @throws PortalException if a matching message-boards message could not be found
502            */
503            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
504                    java.lang.String uuid, long groupId)
505                    throws com.liferay.portal.kernel.exception.PortalException {
506                    return getService().getMBMessageByUuidAndGroupId(uuid, groupId);
507            }
508    
509            /**
510            * Returns a range of all the message-boards messages.
511            *
512            * <p>
513            * 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.
514            * </p>
515            *
516            * @param start the lower bound of the range of message-boards messages
517            * @param end the upper bound of the range of message-boards messages (not inclusive)
518            * @return the range of message-boards messages
519            */
520            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
521                    int start, int end) {
522                    return getService().getMBMessages(start, end);
523            }
524    
525            /**
526            * Returns all the message-boards messages matching the UUID and company.
527            *
528            * @param uuid the UUID of the message-boards messages
529            * @param companyId the primary key of the company
530            * @return the matching message-boards messages, or an empty list if no matches were found
531            */
532            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
533                    java.lang.String uuid, long companyId) {
534                    return getService().getMBMessagesByUuidAndCompanyId(uuid, companyId);
535            }
536    
537            /**
538            * Returns a range of message-boards messages matching the UUID and company.
539            *
540            * @param uuid the UUID of the message-boards messages
541            * @param companyId the primary key of the company
542            * @param start the lower bound of the range of message-boards messages
543            * @param end the upper bound of the range of message-boards messages (not inclusive)
544            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
545            * @return the range of matching message-boards messages, or an empty list if no matches were found
546            */
547            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
548                    java.lang.String uuid, long companyId, int start, int end,
549                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> orderByComparator) {
550                    return getService()
551                                       .getMBMessagesByUuidAndCompanyId(uuid, companyId, start,
552                            end, orderByComparator);
553            }
554    
555            /**
556            * Returns the number of message-boards messages.
557            *
558            * @return the number of message-boards messages
559            */
560            public static int getMBMessagesCount() {
561                    return getService().getMBMessagesCount();
562            }
563    
564            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
565                    long messageId)
566                    throws com.liferay.portal.kernel.exception.PortalException {
567                    return getService().getMessage(messageId);
568            }
569    
570            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
571                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
572                    int status, java.lang.String threadView, boolean includePrevAndNext)
573                    throws com.liferay.portal.kernel.exception.PortalException {
574                    return getService()
575                                       .getMessageDisplay(userId, message, status, threadView,
576                            includePrevAndNext);
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                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
583                    throws com.liferay.portal.kernel.exception.PortalException {
584                    return getService()
585                                       .getMessageDisplay(userId, message, status, threadView,
586                            includePrevAndNext, comparator);
587            }
588    
589            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
590                    long userId, long messageId, int status, java.lang.String threadView,
591                    boolean includePrevAndNext)
592                    throws com.liferay.portal.kernel.exception.PortalException {
593                    return getService()
594                                       .getMessageDisplay(userId, messageId, status, threadView,
595                            includePrevAndNext);
596            }
597    
598            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
599                    java.lang.String className, long classPK, int status) {
600                    return getService().getMessages(className, classPK, status);
601            }
602    
603            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages() {
604                    return getService().getNoAssetMessages();
605            }
606    
607            /**
608            * Returns the OSGi service identifier.
609            *
610            * @return the OSGi service identifier
611            */
612            public static java.lang.String getOSGiServiceIdentifier() {
613                    return getService().getOSGiServiceIdentifier();
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            public static void subscribeMessage(long userId, long messageId)
715                    throws com.liferay.portal.kernel.exception.PortalException {
716                    getService().subscribeMessage(userId, messageId);
717            }
718    
719            public static void unsubscribeMessage(long userId, long messageId)
720                    throws com.liferay.portal.kernel.exception.PortalException {
721                    getService().unsubscribeMessage(userId, messageId);
722            }
723    
724            public static void updateAnswer(
725                    com.liferay.portlet.messageboards.model.MBMessage message,
726                    boolean answer, boolean cascade)
727                    throws com.liferay.portal.kernel.exception.PortalException {
728                    getService().updateAnswer(message, answer, cascade);
729            }
730    
731            public static void updateAnswer(long messageId, boolean answer,
732                    boolean cascade)
733                    throws com.liferay.portal.kernel.exception.PortalException {
734                    getService().updateAnswer(messageId, answer, cascade);
735            }
736    
737            public static void updateAsset(long userId,
738                    com.liferay.portlet.messageboards.model.MBMessage message,
739                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
740                    long[] assetLinkEntryIds)
741                    throws com.liferay.portal.kernel.exception.PortalException {
742                    getService()
743                            .updateAsset(userId, message, assetCategoryIds, assetTagNames,
744                            assetLinkEntryIds);
745            }
746    
747            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
748                    long userId, long messageId, java.lang.String className, long classPK,
749                    java.lang.String subject, java.lang.String body,
750                    com.liferay.portal.service.ServiceContext serviceContext)
751                    throws com.liferay.portal.kernel.exception.PortalException {
752                    return getService()
753                                       .updateDiscussionMessage(userId, messageId, className,
754                            classPK, subject, body, serviceContext);
755            }
756    
757            /**
758            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
759            *
760            * @param mbMessage the message-boards message
761            * @return the message-boards message that was updated
762            */
763            public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
764                    com.liferay.portlet.messageboards.model.MBMessage mbMessage) {
765                    return getService().updateMBMessage(mbMessage);
766            }
767    
768            /**
769            * @deprecated As of 7.0.0, with no direct replacement
770            */
771            @Deprecated
772            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
773                    long messageId, java.lang.String body)
774                    throws com.liferay.portal.kernel.exception.PortalException {
775                    return getService().updateMessage(messageId, body);
776            }
777    
778            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
779                    long userId, long messageId, java.lang.String body,
780                    com.liferay.portal.service.ServiceContext serviceContext)
781                    throws com.liferay.portal.kernel.exception.PortalException {
782                    return getService()
783                                       .updateMessage(userId, messageId, body, serviceContext);
784            }
785    
786            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
787                    long userId, long messageId, java.lang.String subject,
788                    java.lang.String body,
789                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
790                    java.util.List<java.lang.String> existingFiles, double priority,
791                    boolean allowPingbacks,
792                    com.liferay.portal.service.ServiceContext serviceContext)
793                    throws com.liferay.portal.kernel.exception.PortalException {
794                    return getService()
795                                       .updateMessage(userId, messageId, subject, body,
796                            inputStreamOVPs, existingFiles, priority, allowPingbacks,
797                            serviceContext);
798            }
799    
800            /**
801            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, long,
802            int, ServiceContext, Map)}
803            */
804            @Deprecated
805            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
806                    long userId, long messageId, int status,
807                    com.liferay.portal.service.ServiceContext serviceContext)
808                    throws com.liferay.portal.kernel.exception.PortalException {
809                    return getService()
810                                       .updateStatus(userId, messageId, status, serviceContext);
811            }
812    
813            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
814                    long userId, long messageId, int status,
815                    com.liferay.portal.service.ServiceContext serviceContext,
816                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
817                    throws com.liferay.portal.kernel.exception.PortalException {
818                    return getService()
819                                       .updateStatus(userId, messageId, status, serviceContext,
820                            workflowContext);
821            }
822    
823            public static void updateUserName(long userId, java.lang.String userName) {
824                    getService().updateUserName(userId, userName);
825            }
826    
827            public static MBMessageLocalService getService() {
828                    if (_service == null) {
829                            _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
830    
831                            ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
832                                    "_service");
833                    }
834    
835                    return _service;
836            }
837    
838            /**
839             * @deprecated As of 6.2.0
840             */
841            @Deprecated
842            public void setService(MBMessageLocalService service) {
843            }
844    
845            private static MBMessageLocalService _service;
846    }