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