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, java.lang.String threadView, boolean includePrevAndNext)
577                    throws com.liferay.portal.kernel.exception.PortalException {
578                    return getService()
579                                       .getMessageDisplay(userId, message, status, threadView,
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, java.lang.String threadView, 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, threadView,
590                            includePrevAndNext, comparator);
591            }
592    
593            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
594                    long userId, long messageId, int status, java.lang.String threadView,
595                    boolean includePrevAndNext)
596                    throws com.liferay.portal.kernel.exception.PortalException {
597                    return getService()
598                                       .getMessageDisplay(userId, messageId, status, threadView,
599                            includePrevAndNext);
600            }
601    
602            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
603                    java.lang.String className, long classPK, int status) {
604                    return getService().getMessages(className, classPK, status);
605            }
606    
607            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages() {
608                    return getService().getNoAssetMessages();
609            }
610    
611            /**
612            * Returns the OSGi service identifier.
613            *
614            * @return the OSGi service identifier
615            */
616            public static java.lang.String getOSGiServiceIdentifier() {
617                    return getService().getOSGiServiceIdentifier();
618            }
619    
620            public static com.liferay.portal.model.PersistedModel getPersistedModel(
621                    java.io.Serializable primaryKeyObj)
622                    throws com.liferay.portal.kernel.exception.PortalException {
623                    return getService().getPersistedModel(primaryKeyObj);
624            }
625    
626            public static int getPositionInThread(long messageId)
627                    throws com.liferay.portal.kernel.exception.PortalException {
628                    return getService().getPositionInThread(messageId);
629            }
630    
631            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
632                    long threadId, int status) {
633                    return getService().getThreadMessages(threadId, status);
634            }
635    
636            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
637                    long threadId, int status,
638                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator) {
639                    return getService().getThreadMessages(threadId, status, comparator);
640            }
641    
642            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
643                    long threadId, int status, int start, int end) {
644                    return getService().getThreadMessages(threadId, status, start, end);
645            }
646    
647            public static int getThreadMessagesCount(long threadId, int status) {
648                    return getService().getThreadMessagesCount(threadId, status);
649            }
650    
651            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
652                    long threadId, int status, int start, int end) {
653                    return getService()
654                                       .getThreadRepliesMessages(threadId, status, start, end);
655            }
656    
657            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
658                    long userId, java.lang.String className, long classPK, int status,
659                    int start, int end,
660                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
661                    return getService()
662                                       .getUserDiscussionMessages(userId, className, classPK,
663                            status, start, end, obc);
664            }
665    
666            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
667                    long userId, long classNameId, long classPK, int status, int start,
668                    int end,
669                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
670                    return getService()
671                                       .getUserDiscussionMessages(userId, classNameId, classPK,
672                            status, start, end, obc);
673            }
674    
675            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
676                    long userId, long[] classNameIds, int status, int start, int end,
677                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc) {
678                    return getService()
679                                       .getUserDiscussionMessages(userId, classNameIds, status,
680                            start, end, obc);
681            }
682    
683            public static int getUserDiscussionMessagesCount(long userId,
684                    java.lang.String className, long classPK, int status) {
685                    return getService()
686                                       .getUserDiscussionMessagesCount(userId, className, classPK,
687                            status);
688            }
689    
690            public static int getUserDiscussionMessagesCount(long userId,
691                    long classNameId, long classPK, int status) {
692                    return getService()
693                                       .getUserDiscussionMessagesCount(userId, classNameId,
694                            classPK, status);
695            }
696    
697            public static int getUserDiscussionMessagesCount(long userId,
698                    long[] classNameIds, int status) {
699                    return getService()
700                                       .getUserDiscussionMessagesCount(userId, classNameIds, status);
701            }
702    
703            public static long moveMessageAttachmentToTrash(long userId,
704                    long messageId, java.lang.String fileName)
705                    throws com.liferay.portal.kernel.exception.PortalException {
706                    return getService()
707                                       .moveMessageAttachmentToTrash(userId, messageId, fileName);
708            }
709    
710            public static void restoreMessageAttachmentFromTrash(long userId,
711                    long messageId, java.lang.String deletedFileName)
712                    throws com.liferay.portal.kernel.exception.PortalException {
713                    getService()
714                            .restoreMessageAttachmentFromTrash(userId, messageId,
715                            deletedFileName);
716            }
717    
718            public static void subscribeMessage(long userId, long messageId)
719                    throws com.liferay.portal.kernel.exception.PortalException {
720                    getService().subscribeMessage(userId, messageId);
721            }
722    
723            public static void unsubscribeMessage(long userId, long messageId)
724                    throws com.liferay.portal.kernel.exception.PortalException {
725                    getService().unsubscribeMessage(userId, messageId);
726            }
727    
728            public static void updateAnswer(
729                    com.liferay.portlet.messageboards.model.MBMessage message,
730                    boolean answer, boolean cascade)
731                    throws com.liferay.portal.kernel.exception.PortalException {
732                    getService().updateAnswer(message, answer, cascade);
733            }
734    
735            public static void updateAnswer(long messageId, boolean answer,
736                    boolean cascade)
737                    throws com.liferay.portal.kernel.exception.PortalException {
738                    getService().updateAnswer(messageId, answer, cascade);
739            }
740    
741            public static void updateAsset(long userId,
742                    com.liferay.portlet.messageboards.model.MBMessage message,
743                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
744                    long[] assetLinkEntryIds)
745                    throws com.liferay.portal.kernel.exception.PortalException {
746                    getService()
747                            .updateAsset(userId, message, assetCategoryIds, assetTagNames,
748                            assetLinkEntryIds);
749            }
750    
751            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
752                    long userId, long messageId, java.lang.String className, long classPK,
753                    java.lang.String subject, java.lang.String body,
754                    com.liferay.portal.service.ServiceContext serviceContext)
755                    throws com.liferay.portal.kernel.exception.PortalException {
756                    return getService()
757                                       .updateDiscussionMessage(userId, messageId, className,
758                            classPK, subject, body, serviceContext);
759            }
760    
761            /**
762            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
763            *
764            * @param mbMessage the message-boards message
765            * @return the message-boards message that was updated
766            */
767            public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
768                    com.liferay.portlet.messageboards.model.MBMessage mbMessage) {
769                    return getService().updateMBMessage(mbMessage);
770            }
771    
772            /**
773            * @deprecated As of 7.0.0, with no direct replacement
774            */
775            @Deprecated
776            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
777                    long messageId, java.lang.String body)
778                    throws com.liferay.portal.kernel.exception.PortalException {
779                    return getService().updateMessage(messageId, body);
780            }
781    
782            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
783                    long userId, long messageId, java.lang.String body,
784                    com.liferay.portal.service.ServiceContext serviceContext)
785                    throws com.liferay.portal.kernel.exception.PortalException {
786                    return getService()
787                                       .updateMessage(userId, messageId, body, serviceContext);
788            }
789    
790            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
791                    long userId, long messageId, java.lang.String subject,
792                    java.lang.String body,
793                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
794                    java.util.List<java.lang.String> existingFiles, double priority,
795                    boolean allowPingbacks,
796                    com.liferay.portal.service.ServiceContext serviceContext)
797                    throws com.liferay.portal.kernel.exception.PortalException {
798                    return getService()
799                                       .updateMessage(userId, messageId, subject, body,
800                            inputStreamOVPs, existingFiles, priority, allowPingbacks,
801                            serviceContext);
802            }
803    
804            /**
805            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, long,
806            int, ServiceContext, Map)}
807            */
808            @Deprecated
809            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
810                    long userId, long messageId, int status,
811                    com.liferay.portal.service.ServiceContext serviceContext)
812                    throws com.liferay.portal.kernel.exception.PortalException {
813                    return getService()
814                                       .updateStatus(userId, messageId, status, serviceContext);
815            }
816    
817            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
818                    long userId, long messageId, int status,
819                    com.liferay.portal.service.ServiceContext serviceContext,
820                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
821                    throws com.liferay.portal.kernel.exception.PortalException {
822                    return getService()
823                                       .updateStatus(userId, messageId, status, serviceContext,
824                            workflowContext);
825            }
826    
827            public static void updateUserName(long userId, java.lang.String userName) {
828                    getService().updateUserName(userId, userName);
829            }
830    
831            public static MBMessageLocalService getService() {
832                    if (_service == null) {
833                            _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
834    
835                            ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
836                                    "_service");
837                    }
838    
839                    return _service;
840            }
841    
842            /**
843             * @deprecated As of 6.2.0
844             */
845            @Deprecated
846            public void setService(MBMessageLocalService service) {
847            }
848    
849            private static MBMessageLocalService _service;
850    }