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