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            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
483                    return getService().getIndexableActionableDynamicQuery();
484            }
485    
486            /**
487            * Returns the message-boards message with the primary key.
488            *
489            * @param messageId the primary key of the message-boards message
490            * @return the message-boards message
491            * @throws PortalException if a message-boards message with the primary key could not be found
492            */
493            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
494                    long messageId)
495                    throws com.liferay.portal.kernel.exception.PortalException {
496                    return getService().getMBMessage(messageId);
497            }
498    
499            /**
500            * Returns the message-boards message matching the UUID and group.
501            *
502            * @param uuid the message-boards message's UUID
503            * @param groupId the primary key of the group
504            * @return the matching message-boards message
505            * @throws PortalException if a matching message-boards message could not be found
506            */
507            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
508                    java.lang.String uuid, long groupId)
509                    throws com.liferay.portal.kernel.exception.PortalException {
510                    return getService().getMBMessageByUuidAndGroupId(uuid, groupId);
511            }
512    
513            /**
514            * Returns a range of all the message-boards messages.
515            *
516            * <p>
517            * 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.
518            * </p>
519            *
520            * @param start the lower bound of the range of message-boards messages
521            * @param end the upper bound of the range of message-boards messages (not inclusive)
522            * @return the range of message-boards messages
523            */
524            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
525                    int start, int end) {
526                    return getService().getMBMessages(start, end);
527            }
528    
529            /**
530            * Returns all the message-boards messages matching the UUID and company.
531            *
532            * @param uuid the UUID of the message-boards messages
533            * @param companyId the primary key of the company
534            * @return the matching message-boards messages, or an empty list if no matches were found
535            */
536            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
537                    java.lang.String uuid, long companyId) {
538                    return getService().getMBMessagesByUuidAndCompanyId(uuid, companyId);
539            }
540    
541            /**
542            * Returns a range of message-boards messages matching the UUID and company.
543            *
544            * @param uuid the UUID of the message-boards messages
545            * @param companyId the primary key of the company
546            * @param start the lower bound of the range of message-boards messages
547            * @param end the upper bound of the range of message-boards messages (not inclusive)
548            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
549            * @return the range of matching message-boards messages, or an empty list if no matches were found
550            */
551            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
552                    java.lang.String uuid, long companyId, int start, int end,
553                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> orderByComparator) {
554                    return getService()
555                                       .getMBMessagesByUuidAndCompanyId(uuid, companyId, start,
556                            end, orderByComparator);
557            }
558    
559            /**
560            * Returns the number of message-boards messages.
561            *
562            * @return the number of message-boards messages
563            */
564            public static int getMBMessagesCount() {
565                    return getService().getMBMessagesCount();
566            }
567    
568            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
569                    long messageId)
570                    throws com.liferay.portal.kernel.exception.PortalException {
571                    return getService().getMessage(messageId);
572            }
573    
574            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
575                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
576                    int status, boolean includePrevAndNext)
577                    throws com.liferay.portal.kernel.exception.PortalException {
578                    return getService()
579                                       .getMessageDisplay(userId, message, status,
580                            includePrevAndNext);
581            }
582    
583            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
584                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
585                    int status, boolean includePrevAndNext,
586                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
587                    throws com.liferay.portal.kernel.exception.PortalException {
588                    return getService()
589                                       .getMessageDisplay(userId, message, status,
590                            includePrevAndNext, comparator);
591            }
592    
593            /**
594            * @deprecated As of 7.0.0, replaced by {@link #getMessageDisplay(long,
595            MBMessage, int, boolean)}
596            */
597            @Deprecated
598            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
599                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
600                    int status, java.lang.String threadView, boolean includePrevAndNext)
601                    throws com.liferay.portal.kernel.exception.PortalException {
602                    return getService()
603                                       .getMessageDisplay(userId, message, status, threadView,
604                            includePrevAndNext);
605            }
606    
607            /**
608            * @deprecated As of 7.0.0, replaced by {@link #getMessageDisplay(long,
609            MBMessage, int, boolean, Comparator)} (
610            */
611            @Deprecated
612            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
613                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
614                    int status, java.lang.String threadView, boolean includePrevAndNext,
615                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
616                    throws com.liferay.portal.kernel.exception.PortalException {
617                    return getService()
618                                       .getMessageDisplay(userId, message, status, threadView,
619                            includePrevAndNext, comparator);
620            }
621    
622            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
623                    long userId, long messageId, int status, boolean includePrevAndNext)
624                    throws com.liferay.portal.kernel.exception.PortalException {
625                    return getService()
626                                       .getMessageDisplay(userId, messageId, status,
627                            includePrevAndNext);
628            }
629    
630            /**
631            * @deprecated As of 7.0.0, replaced by {@link #getMessageDisplay(long,
632            long, int, boolean)}
633            */
634            @Deprecated
635            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
636                    long userId, long messageId, int status, java.lang.String threadView,
637                    boolean includePrevAndNext)
638                    throws com.liferay.portal.kernel.exception.PortalException {
639                    return getService()
640                                       .getMessageDisplay(userId, messageId, status, threadView,
641                            includePrevAndNext);
642            }
643    
644            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
645                    java.lang.String className, long classPK, int status) {
646                    return getService().getMessages(className, classPK, status);
647            }
648    
649            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages() {
650                    return getService().getNoAssetMessages();
651            }
652    
653            /**
654            * Returns the OSGi service identifier.
655            *
656            * @return the OSGi service identifier
657            */
658            public static java.lang.String getOSGiServiceIdentifier() {
659                    return getService().getOSGiServiceIdentifier();
660            }
661    
662            public static com.liferay.portal.model.PersistedModel getPersistedModel(
663                    java.io.Serializable primaryKeyObj)
664                    throws com.liferay.portal.kernel.exception.PortalException {
665                    return getService().getPersistedModel(primaryKeyObj);
666            }
667    
668            public static int getPositionInThread(long messageId)
669                    throws com.liferay.portal.kernel.exception.PortalException {
670                    return getService().getPositionInThread(messageId);
671            }
672    
673            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
674                    long threadId, int status) {
675                    return getService().getThreadMessages(threadId, status);
676            }
677    
678            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
679                    long threadId, int status,
680                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator) {
681                    return getService().getThreadMessages(threadId, status, comparator);
682            }
683    
684            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
685                    long threadId, int status, int start, int end) {
686                    return getService().getThreadMessages(threadId, status, start, end);
687            }
688    
689            public static int getThreadMessagesCount(long threadId, int status) {
690                    return getService().getThreadMessagesCount(threadId, status);
691            }
692    
693            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
694                    long threadId, int status, int start, int end) {
695                    return getService()
696                                       .getThreadRepliesMessages(threadId, status, start, end);
697            }
698    
699            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
700                    long userId, java.lang.String className, long classPK, int status,
701                    int start, int end,
702                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
703                    return getService()
704                                       .getUserDiscussionMessages(userId, className, classPK,
705                            status, start, end, obc);
706            }
707    
708            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
709                    long userId, long classNameId, long classPK, int status, int start,
710                    int end,
711                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
712                    return getService()
713                                       .getUserDiscussionMessages(userId, classNameId, classPK,
714                            status, start, end, obc);
715            }
716    
717            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
718                    long userId, long[] classNameIds, int status, int start, int end,
719                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
720                    return getService()
721                                       .getUserDiscussionMessages(userId, classNameIds, status,
722                            start, end, obc);
723            }
724    
725            public static int getUserDiscussionMessagesCount(long userId,
726                    java.lang.String className, long classPK, int status) {
727                    return getService()
728                                       .getUserDiscussionMessagesCount(userId, className, classPK,
729                            status);
730            }
731    
732            public static int getUserDiscussionMessagesCount(long userId,
733                    long classNameId, long classPK, int status) {
734                    return getService()
735                                       .getUserDiscussionMessagesCount(userId, classNameId,
736                            classPK, status);
737            }
738    
739            public static int getUserDiscussionMessagesCount(long userId,
740                    long[] classNameIds, int status) {
741                    return getService()
742                                       .getUserDiscussionMessagesCount(userId, classNameIds, status);
743            }
744    
745            public static long moveMessageAttachmentToTrash(long userId,
746                    long messageId, java.lang.String fileName)
747                    throws com.liferay.portal.kernel.exception.PortalException {
748                    return getService()
749                                       .moveMessageAttachmentToTrash(userId, messageId, fileName);
750            }
751    
752            public static void restoreMessageAttachmentFromTrash(long userId,
753                    long messageId, java.lang.String deletedFileName)
754                    throws com.liferay.portal.kernel.exception.PortalException {
755                    getService()
756                            .restoreMessageAttachmentFromTrash(userId, messageId,
757                            deletedFileName);
758            }
759    
760            public static void subscribeMessage(long userId, long messageId)
761                    throws com.liferay.portal.kernel.exception.PortalException {
762                    getService().subscribeMessage(userId, messageId);
763            }
764    
765            public static void unsubscribeMessage(long userId, long messageId)
766                    throws com.liferay.portal.kernel.exception.PortalException {
767                    getService().unsubscribeMessage(userId, messageId);
768            }
769    
770            public static void updateAnswer(
771                    com.liferay.portlet.messageboards.model.MBMessage message,
772                    boolean answer, boolean cascade)
773                    throws com.liferay.portal.kernel.exception.PortalException {
774                    getService().updateAnswer(message, answer, cascade);
775            }
776    
777            public static void updateAnswer(long messageId, boolean answer,
778                    boolean cascade)
779                    throws com.liferay.portal.kernel.exception.PortalException {
780                    getService().updateAnswer(messageId, answer, cascade);
781            }
782    
783            public static void updateAsset(long userId,
784                    com.liferay.portlet.messageboards.model.MBMessage message,
785                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
786                    long[] assetLinkEntryIds)
787                    throws com.liferay.portal.kernel.exception.PortalException {
788                    getService()
789                            .updateAsset(userId, message, assetCategoryIds, assetTagNames,
790                            assetLinkEntryIds);
791            }
792    
793            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
794                    long userId, long messageId, java.lang.String className, long classPK,
795                    java.lang.String subject, java.lang.String body,
796                    com.liferay.portal.service.ServiceContext serviceContext)
797                    throws com.liferay.portal.kernel.exception.PortalException {
798                    return getService()
799                                       .updateDiscussionMessage(userId, messageId, className,
800                            classPK, subject, body, serviceContext);
801            }
802    
803            /**
804            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
805            *
806            * @param mbMessage the message-boards message
807            * @return the message-boards message that was updated
808            */
809            public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
810                    com.liferay.portlet.messageboards.model.MBMessage mbMessage) {
811                    return getService().updateMBMessage(mbMessage);
812            }
813    
814            /**
815            * @deprecated As of 7.0.0, with no direct replacement
816            */
817            @Deprecated
818            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
819                    long messageId, java.lang.String body)
820                    throws com.liferay.portal.kernel.exception.PortalException {
821                    return getService().updateMessage(messageId, body);
822            }
823    
824            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
825                    long userId, long messageId, java.lang.String body,
826                    com.liferay.portal.service.ServiceContext serviceContext)
827                    throws com.liferay.portal.kernel.exception.PortalException {
828                    return getService()
829                                       .updateMessage(userId, messageId, body, serviceContext);
830            }
831    
832            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
833                    long userId, long messageId, java.lang.String subject,
834                    java.lang.String body,
835                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
836                    java.util.List<java.lang.String> existingFiles, double priority,
837                    boolean allowPingbacks,
838                    com.liferay.portal.service.ServiceContext serviceContext)
839                    throws com.liferay.portal.kernel.exception.PortalException {
840                    return getService()
841                                       .updateMessage(userId, messageId, subject, body,
842                            inputStreamOVPs, existingFiles, priority, allowPingbacks,
843                            serviceContext);
844            }
845    
846            /**
847            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, long,
848            int, ServiceContext, Map)}
849            */
850            @Deprecated
851            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
852                    long userId, long messageId, int status,
853                    com.liferay.portal.service.ServiceContext serviceContext)
854                    throws com.liferay.portal.kernel.exception.PortalException {
855                    return getService()
856                                       .updateStatus(userId, messageId, status, serviceContext);
857            }
858    
859            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
860                    long userId, long messageId, int status,
861                    com.liferay.portal.service.ServiceContext serviceContext,
862                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
863                    throws com.liferay.portal.kernel.exception.PortalException {
864                    return getService()
865                                       .updateStatus(userId, messageId, status, serviceContext,
866                            workflowContext);
867            }
868    
869            public static void updateUserName(long userId, java.lang.String userName) {
870                    getService().updateUserName(userId, userName);
871            }
872    
873            public static MBMessageLocalService getService() {
874                    if (_service == null) {
875                            _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
876    
877                            ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
878                                    "_service");
879                    }
880    
881                    return _service;
882            }
883    
884            private static MBMessageLocalService _service;
885    }