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