001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the message-boards message local service. This utility wraps {@link com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
022     *
023     * <p>
024     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see MBMessageLocalService
029     * @see com.liferay.portlet.messageboards.service.base.MBMessageLocalServiceBaseImpl
030     * @see com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl
031     * @generated
032     */
033    public class MBMessageLocalServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * 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.
038             */
039    
040            /**
041            * Adds the message-boards message to the database. Also notifies the appropriate model listeners.
042            *
043            * @param mbMessage the message-boards message
044            * @return the message-boards message that was added
045            * @throws SystemException if a system exception occurred
046            */
047            public static com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
048                    com.liferay.portlet.messageboards.model.MBMessage mbMessage)
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getService().addMBMessage(mbMessage);
051            }
052    
053            /**
054            * Creates a new message-boards message with the primary key. Does not add the message-boards message to the database.
055            *
056            * @param messageId the primary key for the new message-boards message
057            * @return the new message-boards message
058            */
059            public static com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
060                    long messageId) {
061                    return getService().createMBMessage(messageId);
062            }
063    
064            /**
065            * Deletes the message-boards message with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param messageId the primary key of the message-boards message
068            * @return the message-boards message that was removed
069            * @throws PortalException if a message-boards message with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public static com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
073                    long messageId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().deleteMBMessage(messageId);
077            }
078    
079            /**
080            * Deletes the message-boards message from the database. Also notifies the appropriate model listeners.
081            *
082            * @param mbMessage the message-boards message
083            * @return the message-boards message that was removed
084            * @throws SystemException if a system exception occurred
085            */
086            public static com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
087                    com.liferay.portlet.messageboards.model.MBMessage mbMessage)
088                    throws com.liferay.portal.kernel.exception.SystemException {
089                    return getService().deleteMBMessage(mbMessage);
090            }
091    
092            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
093                    return getService().dynamicQuery();
094            }
095    
096            /**
097            * Performs a dynamic query on the database and returns the matching rows.
098            *
099            * @param dynamicQuery the dynamic query
100            * @return the matching rows
101            * @throws SystemException if a system exception occurred
102            */
103            @SuppressWarnings("rawtypes")
104            public static java.util.List dynamicQuery(
105                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().dynamicQuery(dynamicQuery);
108            }
109    
110            /**
111            * Performs a dynamic query on the database and returns a range of the matching rows.
112            *
113            * <p>
114            * 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.
115            * </p>
116            *
117            * @param dynamicQuery the dynamic query
118            * @param start the lower bound of the range of model instances
119            * @param end the upper bound of the range of model instances (not inclusive)
120            * @return the range of matching rows
121            * @throws SystemException if a system exception occurred
122            */
123            @SuppressWarnings("rawtypes")
124            public static java.util.List dynamicQuery(
125                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
126                    int end) throws com.liferay.portal.kernel.exception.SystemException {
127                    return getService().dynamicQuery(dynamicQuery, start, end);
128            }
129    
130            /**
131            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
132            *
133            * <p>
134            * 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.
135            * </p>
136            *
137            * @param dynamicQuery the dynamic query
138            * @param start the lower bound of the range of model instances
139            * @param end the upper bound of the range of model instances (not inclusive)
140            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
141            * @return the ordered range of matching rows
142            * @throws SystemException if a system exception occurred
143            */
144            @SuppressWarnings("rawtypes")
145            public static java.util.List dynamicQuery(
146                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
147                    int end,
148                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return getService()
151                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
152            }
153    
154            /**
155            * Returns the number of rows that match the dynamic query.
156            *
157            * @param dynamicQuery the dynamic query
158            * @return the number of rows that match the dynamic query
159            * @throws SystemException if a system exception occurred
160            */
161            public static long dynamicQueryCount(
162                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getService().dynamicQueryCount(dynamicQuery);
165            }
166    
167            public static com.liferay.portlet.messageboards.model.MBMessage fetchMBMessage(
168                    long messageId)
169                    throws com.liferay.portal.kernel.exception.SystemException {
170                    return getService().fetchMBMessage(messageId);
171            }
172    
173            /**
174            * Returns the message-boards message with the primary key.
175            *
176            * @param messageId the primary key of the message-boards message
177            * @return the message-boards message
178            * @throws PortalException if a message-boards message with the primary key could not be found
179            * @throws SystemException if a system exception occurred
180            */
181            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
182                    long messageId)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException {
185                    return getService().getMBMessage(messageId);
186            }
187    
188            public static com.liferay.portal.model.PersistedModel getPersistedModel(
189                    java.io.Serializable primaryKeyObj)
190                    throws com.liferay.portal.kernel.exception.PortalException,
191                            com.liferay.portal.kernel.exception.SystemException {
192                    return getService().getPersistedModel(primaryKeyObj);
193            }
194    
195            /**
196            * Returns the message-boards message matching the UUID and group.
197            *
198            * @param uuid the message-boards message's UUID
199            * @param groupId the primary key of the group
200            * @return the matching message-boards message
201            * @throws PortalException if a matching message-boards message could not be found
202            * @throws SystemException if a system exception occurred
203            */
204            public static com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
205                    java.lang.String uuid, long groupId)
206                    throws com.liferay.portal.kernel.exception.PortalException,
207                            com.liferay.portal.kernel.exception.SystemException {
208                    return getService().getMBMessageByUuidAndGroupId(uuid, groupId);
209            }
210    
211            /**
212            * Returns a range of all the message-boards messages.
213            *
214            * <p>
215            * 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.
216            * </p>
217            *
218            * @param start the lower bound of the range of message-boards messages
219            * @param end the upper bound of the range of message-boards messages (not inclusive)
220            * @return the range of message-boards messages
221            * @throws SystemException if a system exception occurred
222            */
223            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
224                    int start, int end)
225                    throws com.liferay.portal.kernel.exception.SystemException {
226                    return getService().getMBMessages(start, end);
227            }
228    
229            /**
230            * Returns the number of message-boards messages.
231            *
232            * @return the number of message-boards messages
233            * @throws SystemException if a system exception occurred
234            */
235            public static int getMBMessagesCount()
236                    throws com.liferay.portal.kernel.exception.SystemException {
237                    return getService().getMBMessagesCount();
238            }
239    
240            /**
241            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
242            *
243            * @param mbMessage the message-boards message
244            * @return the message-boards message that was updated
245            * @throws SystemException if a system exception occurred
246            */
247            public static com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
248                    com.liferay.portlet.messageboards.model.MBMessage mbMessage)
249                    throws com.liferay.portal.kernel.exception.SystemException {
250                    return getService().updateMBMessage(mbMessage);
251            }
252    
253            /**
254            * Returns the Spring bean ID for this bean.
255            *
256            * @return the Spring bean ID for this bean
257            */
258            public static java.lang.String getBeanIdentifier() {
259                    return getService().getBeanIdentifier();
260            }
261    
262            /**
263            * Sets the Spring bean ID for this bean.
264            *
265            * @param beanIdentifier the Spring bean ID for this bean
266            */
267            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
268                    getService().setBeanIdentifier(beanIdentifier);
269            }
270    
271            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
272                    long userId, java.lang.String userName, long groupId,
273                    java.lang.String className, long classPK, int workflowAction)
274                    throws com.liferay.portal.kernel.exception.PortalException,
275                            com.liferay.portal.kernel.exception.SystemException {
276                    return getService()
277                                       .addDiscussionMessage(userId, userName, groupId, className,
278                            classPK, workflowAction);
279            }
280    
281            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
282                    long userId, java.lang.String userName, long groupId,
283                    java.lang.String className, long classPK, long threadId,
284                    long parentMessageId, java.lang.String subject, java.lang.String body,
285                    com.liferay.portal.service.ServiceContext serviceContext)
286                    throws com.liferay.portal.kernel.exception.PortalException,
287                            com.liferay.portal.kernel.exception.SystemException {
288                    return getService()
289                                       .addDiscussionMessage(userId, userName, groupId, className,
290                            classPK, threadId, parentMessageId, subject, body, serviceContext);
291            }
292    
293            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
294                    long userId, java.lang.String userName, long groupId, long categoryId,
295                    long threadId, long parentMessageId, java.lang.String subject,
296                    java.lang.String body, java.lang.String format,
297                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
298                    boolean anonymous, double priority, boolean allowPingbacks,
299                    com.liferay.portal.service.ServiceContext serviceContext)
300                    throws com.liferay.portal.kernel.exception.PortalException,
301                            com.liferay.portal.kernel.exception.SystemException {
302                    return getService()
303                                       .addMessage(userId, userName, groupId, categoryId, threadId,
304                            parentMessageId, subject, body, format, inputStreamOVPs, anonymous,
305                            priority, allowPingbacks, serviceContext);
306            }
307    
308            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
309                    long userId, java.lang.String userName, long groupId, long categoryId,
310                    java.lang.String subject, java.lang.String body,
311                    java.lang.String format,
312                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
313                    boolean anonymous, double priority, boolean allowPingbacks,
314                    com.liferay.portal.service.ServiceContext serviceContext)
315                    throws com.liferay.portal.kernel.exception.PortalException,
316                            com.liferay.portal.kernel.exception.SystemException {
317                    return getService()
318                                       .addMessage(userId, userName, groupId, categoryId, subject,
319                            body, format, inputStreamOVPs, anonymous, priority, allowPingbacks,
320                            serviceContext);
321            }
322    
323            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
324                    long userId, java.lang.String userName, long categoryId,
325                    java.lang.String subject, java.lang.String body,
326                    com.liferay.portal.service.ServiceContext serviceContext)
327                    throws com.liferay.portal.kernel.exception.PortalException,
328                            com.liferay.portal.kernel.exception.SystemException {
329                    return getService()
330                                       .addMessage(userId, userName, categoryId, subject, body,
331                            serviceContext);
332            }
333    
334            public static void addMessageResources(long messageId,
335                    boolean addGroupPermissions, boolean addGuestPermissions)
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException {
338                    getService()
339                            .addMessageResources(messageId, addGroupPermissions,
340                            addGuestPermissions);
341            }
342    
343            public static void addMessageResources(long messageId,
344                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
345                    throws com.liferay.portal.kernel.exception.PortalException,
346                            com.liferay.portal.kernel.exception.SystemException {
347                    getService()
348                            .addMessageResources(messageId, groupPermissions, guestPermissions);
349            }
350    
351            public static void addMessageResources(
352                    com.liferay.portlet.messageboards.model.MBMessage message,
353                    boolean addGroupPermissions, boolean addGuestPermissions)
354                    throws com.liferay.portal.kernel.exception.PortalException,
355                            com.liferay.portal.kernel.exception.SystemException {
356                    getService()
357                            .addMessageResources(message, addGroupPermissions,
358                            addGuestPermissions);
359            }
360    
361            public static void addMessageResources(
362                    com.liferay.portlet.messageboards.model.MBMessage message,
363                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
364                    throws com.liferay.portal.kernel.exception.PortalException,
365                            com.liferay.portal.kernel.exception.SystemException {
366                    getService()
367                            .addMessageResources(message, groupPermissions, guestPermissions);
368            }
369    
370            public static com.liferay.portlet.messageboards.model.MBMessage deleteDiscussionMessage(
371                    long messageId)
372                    throws com.liferay.portal.kernel.exception.PortalException,
373                            com.liferay.portal.kernel.exception.SystemException {
374                    return getService().deleteDiscussionMessage(messageId);
375            }
376    
377            public static void deleteDiscussionMessages(java.lang.String className,
378                    long classPK)
379                    throws com.liferay.portal.kernel.exception.PortalException,
380                            com.liferay.portal.kernel.exception.SystemException {
381                    getService().deleteDiscussionMessages(className, classPK);
382            }
383    
384            public static com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
385                    long messageId)
386                    throws com.liferay.portal.kernel.exception.PortalException,
387                            com.liferay.portal.kernel.exception.SystemException {
388                    return getService().deleteMessage(messageId);
389            }
390    
391            public static com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
392                    com.liferay.portlet.messageboards.model.MBMessage message)
393                    throws com.liferay.portal.kernel.exception.PortalException,
394                            com.liferay.portal.kernel.exception.SystemException {
395                    return getService().deleteMessage(message);
396            }
397    
398            public static void deleteMessageAttachment(long messageId,
399                    java.lang.String fileName)
400                    throws com.liferay.portal.kernel.exception.PortalException,
401                            com.liferay.portal.kernel.exception.SystemException {
402                    getService().deleteMessageAttachment(messageId, fileName);
403            }
404    
405            public static void deleteMessageAttachments(long messageId)
406                    throws com.liferay.portal.kernel.exception.PortalException,
407                            com.liferay.portal.kernel.exception.SystemException {
408                    getService().deleteMessageAttachments(messageId);
409            }
410    
411            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
412                    long groupId, long categoryId, int status, int start, int end)
413                    throws com.liferay.portal.kernel.exception.SystemException {
414                    return getService()
415                                       .getCategoryMessages(groupId, categoryId, status, start, end);
416            }
417    
418            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
419                    long groupId, long categoryId, int status, int start, int end,
420                    com.liferay.portal.kernel.util.OrderByComparator obc)
421                    throws com.liferay.portal.kernel.exception.SystemException {
422                    return getService()
423                                       .getCategoryMessages(groupId, categoryId, status, start,
424                            end, obc);
425            }
426    
427            public static int getCategoryMessagesCount(long groupId, long categoryId,
428                    int status) throws com.liferay.portal.kernel.exception.SystemException {
429                    return getService().getCategoryMessagesCount(groupId, categoryId, status);
430            }
431    
432            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
433                    long companyId, int status, int start, int end)
434                    throws com.liferay.portal.kernel.exception.SystemException {
435                    return getService().getCompanyMessages(companyId, status, start, end);
436            }
437    
438            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
439                    long companyId, int status, int start, int end,
440                    com.liferay.portal.kernel.util.OrderByComparator obc)
441                    throws com.liferay.portal.kernel.exception.SystemException {
442                    return getService()
443                                       .getCompanyMessages(companyId, status, start, end, obc);
444            }
445    
446            public static int getCompanyMessagesCount(long companyId, int status)
447                    throws com.liferay.portal.kernel.exception.SystemException {
448                    return getService().getCompanyMessagesCount(companyId, status);
449            }
450    
451            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
452                    long userId, long groupId, java.lang.String className, long classPK,
453                    int status)
454                    throws com.liferay.portal.kernel.exception.PortalException,
455                            com.liferay.portal.kernel.exception.SystemException {
456                    return getService()
457                                       .getDiscussionMessageDisplay(userId, groupId, className,
458                            classPK, status);
459            }
460    
461            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
462                    long userId, long groupId, java.lang.String className, long classPK,
463                    int status, java.lang.String threadView)
464                    throws com.liferay.portal.kernel.exception.PortalException,
465                            com.liferay.portal.kernel.exception.SystemException {
466                    return getService()
467                                       .getDiscussionMessageDisplay(userId, groupId, className,
468                            classPK, status, threadView);
469            }
470    
471            public static int getDiscussionMessagesCount(long classNameId,
472                    long classPK, int status)
473                    throws com.liferay.portal.kernel.exception.SystemException {
474                    return getService()
475                                       .getDiscussionMessagesCount(classNameId, classPK, status);
476            }
477    
478            public static int getDiscussionMessagesCount(java.lang.String className,
479                    long classPK, int status)
480                    throws com.liferay.portal.kernel.exception.SystemException {
481                    return getService()
482                                       .getDiscussionMessagesCount(className, classPK, status);
483            }
484    
485            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
486                    java.lang.String className)
487                    throws com.liferay.portal.kernel.exception.SystemException {
488                    return getService().getDiscussions(className);
489            }
490    
491            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
492                    long groupId, int status, int start, int end)
493                    throws com.liferay.portal.kernel.exception.SystemException {
494                    return getService().getGroupMessages(groupId, status, start, end);
495            }
496    
497            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
498                    long groupId, int status, int start, int end,
499                    com.liferay.portal.kernel.util.OrderByComparator obc)
500                    throws com.liferay.portal.kernel.exception.SystemException {
501                    return getService().getGroupMessages(groupId, status, start, end, obc);
502            }
503    
504            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
505                    long groupId, long userId, int status, int start, int end)
506                    throws com.liferay.portal.kernel.exception.SystemException {
507                    return getService().getGroupMessages(groupId, userId, status, start, end);
508            }
509    
510            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
511                    long groupId, long userId, int status, int start, int end,
512                    com.liferay.portal.kernel.util.OrderByComparator obc)
513                    throws com.liferay.portal.kernel.exception.SystemException {
514                    return getService()
515                                       .getGroupMessages(groupId, userId, status, start, end, obc);
516            }
517    
518            public static int getGroupMessagesCount(long groupId, int status)
519                    throws com.liferay.portal.kernel.exception.SystemException {
520                    return getService().getGroupMessagesCount(groupId, status);
521            }
522    
523            public static int getGroupMessagesCount(long groupId, long userId,
524                    int status) throws com.liferay.portal.kernel.exception.SystemException {
525                    return getService().getGroupMessagesCount(groupId, userId, status);
526            }
527    
528            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
529                    long messageId)
530                    throws com.liferay.portal.kernel.exception.PortalException,
531                            com.liferay.portal.kernel.exception.SystemException {
532                    return getService().getMessage(messageId);
533            }
534    
535            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
536                    long userId, long messageId, int status, java.lang.String threadView,
537                    boolean includePrevAndNext)
538                    throws com.liferay.portal.kernel.exception.PortalException,
539                            com.liferay.portal.kernel.exception.SystemException {
540                    return getService()
541                                       .getMessageDisplay(userId, messageId, status, threadView,
542                            includePrevAndNext);
543            }
544    
545            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
546                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
547                    int status, java.lang.String threadView, boolean includePrevAndNext)
548                    throws com.liferay.portal.kernel.exception.PortalException,
549                            com.liferay.portal.kernel.exception.SystemException {
550                    return getService()
551                                       .getMessageDisplay(userId, message, status, threadView,
552                            includePrevAndNext);
553            }
554    
555            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
556                    java.lang.String className, long classPK, int status)
557                    throws com.liferay.portal.kernel.exception.SystemException {
558                    return getService().getMessages(className, classPK, status);
559            }
560    
561            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
562                    throws com.liferay.portal.kernel.exception.SystemException {
563                    return getService().getNoAssetMessages();
564            }
565    
566            public static int getPositionInThread(long messageId)
567                    throws com.liferay.portal.kernel.exception.PortalException,
568                            com.liferay.portal.kernel.exception.SystemException {
569                    return getService().getPositionInThread(messageId);
570            }
571    
572            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
573                    long threadId, int status)
574                    throws com.liferay.portal.kernel.exception.SystemException {
575                    return getService().getThreadMessages(threadId, status);
576            }
577    
578            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
579                    long threadId, int status,
580                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
581                    throws com.liferay.portal.kernel.exception.SystemException {
582                    return getService().getThreadMessages(threadId, status, comparator);
583            }
584    
585            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
586                    long threadId, int status, int start, int end)
587                    throws com.liferay.portal.kernel.exception.SystemException {
588                    return getService().getThreadMessages(threadId, status, start, end);
589            }
590    
591            public static int getThreadMessagesCount(long threadId, int status)
592                    throws com.liferay.portal.kernel.exception.SystemException {
593                    return getService().getThreadMessagesCount(threadId, status);
594            }
595    
596            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
597                    long threadId, int status, int start, int end)
598                    throws com.liferay.portal.kernel.exception.SystemException {
599                    return getService()
600                                       .getThreadRepliesMessages(threadId, status, start, end);
601            }
602    
603            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
604                    long userId, long classNameId, long classPK, int status, int start,
605                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
606                    throws com.liferay.portal.kernel.exception.SystemException {
607                    return getService()
608                                       .getUserDiscussionMessages(userId, classNameId, classPK,
609                            status, start, end, obc);
610            }
611    
612            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
613                    long userId, long[] classNameIds, int status, int start, int end,
614                    com.liferay.portal.kernel.util.OrderByComparator obc)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    return getService()
617                                       .getUserDiscussionMessages(userId, classNameIds, status,
618                            start, end, obc);
619            }
620    
621            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
622                    long userId, java.lang.String className, long classPK, int status,
623                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
624                    throws com.liferay.portal.kernel.exception.SystemException {
625                    return getService()
626                                       .getUserDiscussionMessages(userId, className, classPK,
627                            status, start, end, obc);
628            }
629    
630            public static int getUserDiscussionMessagesCount(long userId,
631                    long classNameId, long classPK, int status)
632                    throws com.liferay.portal.kernel.exception.SystemException {
633                    return getService()
634                                       .getUserDiscussionMessagesCount(userId, classNameId,
635                            classPK, status);
636            }
637    
638            public static int getUserDiscussionMessagesCount(long userId,
639                    long[] classNameIds, int status)
640                    throws com.liferay.portal.kernel.exception.SystemException {
641                    return getService()
642                                       .getUserDiscussionMessagesCount(userId, classNameIds, status);
643            }
644    
645            public static int getUserDiscussionMessagesCount(long userId,
646                    java.lang.String className, long classPK, int status)
647                    throws com.liferay.portal.kernel.exception.SystemException {
648                    return getService()
649                                       .getUserDiscussionMessagesCount(userId, className, classPK,
650                            status);
651            }
652    
653            public static long moveMessageAttachmentToTrash(long userId,
654                    long messageId, java.lang.String fileName)
655                    throws com.liferay.portal.kernel.exception.PortalException,
656                            com.liferay.portal.kernel.exception.SystemException {
657                    return getService()
658                                       .moveMessageAttachmentToTrash(userId, messageId, fileName);
659            }
660    
661            public static void restoreMessageAttachmentFromTrash(long userId,
662                    long messageId, java.lang.String deletedFileName)
663                    throws com.liferay.portal.kernel.exception.PortalException,
664                            com.liferay.portal.kernel.exception.SystemException {
665                    getService()
666                            .restoreMessageAttachmentFromTrash(userId, messageId,
667                            deletedFileName);
668            }
669    
670            public static void subscribeMessage(long userId, long messageId)
671                    throws com.liferay.portal.kernel.exception.PortalException,
672                            com.liferay.portal.kernel.exception.SystemException {
673                    getService().subscribeMessage(userId, messageId);
674            }
675    
676            public static void unsubscribeMessage(long userId, long messageId)
677                    throws com.liferay.portal.kernel.exception.PortalException,
678                            com.liferay.portal.kernel.exception.SystemException {
679                    getService().unsubscribeMessage(userId, messageId);
680            }
681    
682            public static void updateAnswer(long messageId, boolean answer,
683                    boolean cascade)
684                    throws com.liferay.portal.kernel.exception.PortalException,
685                            com.liferay.portal.kernel.exception.SystemException {
686                    getService().updateAnswer(messageId, answer, cascade);
687            }
688    
689            public static void updateAnswer(
690                    com.liferay.portlet.messageboards.model.MBMessage message,
691                    boolean answer, boolean cascade)
692                    throws com.liferay.portal.kernel.exception.PortalException,
693                            com.liferay.portal.kernel.exception.SystemException {
694                    getService().updateAnswer(message, answer, cascade);
695            }
696    
697            public static void updateAsset(long userId,
698                    com.liferay.portlet.messageboards.model.MBMessage message,
699                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
700                    long[] assetLinkEntryIds)
701                    throws com.liferay.portal.kernel.exception.PortalException,
702                            com.liferay.portal.kernel.exception.SystemException {
703                    getService()
704                            .updateAsset(userId, message, assetCategoryIds, assetTagNames,
705                            assetLinkEntryIds);
706            }
707    
708            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
709                    long userId, long messageId, java.lang.String className, long classPK,
710                    java.lang.String subject, java.lang.String body,
711                    com.liferay.portal.service.ServiceContext serviceContext)
712                    throws com.liferay.portal.kernel.exception.PortalException,
713                            com.liferay.portal.kernel.exception.SystemException {
714                    return getService()
715                                       .updateDiscussionMessage(userId, messageId, className,
716                            classPK, subject, body, serviceContext);
717            }
718    
719            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
720                    long userId, long messageId, java.lang.String subject,
721                    java.lang.String body,
722                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
723                    java.util.List<java.lang.String> existingFiles, double priority,
724                    boolean allowPingbacks,
725                    com.liferay.portal.service.ServiceContext serviceContext)
726                    throws com.liferay.portal.kernel.exception.PortalException,
727                            com.liferay.portal.kernel.exception.SystemException {
728                    return getService()
729                                       .updateMessage(userId, messageId, subject, body,
730                            inputStreamOVPs, existingFiles, priority, allowPingbacks,
731                            serviceContext);
732            }
733    
734            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
735                    long messageId, java.lang.String body)
736                    throws com.liferay.portal.kernel.exception.PortalException,
737                            com.liferay.portal.kernel.exception.SystemException {
738                    return getService().updateMessage(messageId, body);
739            }
740    
741            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
742                    long userId, long messageId, int status,
743                    com.liferay.portal.service.ServiceContext serviceContext)
744                    throws com.liferay.portal.kernel.exception.PortalException,
745                            com.liferay.portal.kernel.exception.SystemException {
746                    return getService()
747                                       .updateStatus(userId, messageId, status, serviceContext);
748            }
749    
750            public static void updateUserName(long userId, java.lang.String userName)
751                    throws com.liferay.portal.kernel.exception.SystemException {
752                    getService().updateUserName(userId, userName);
753            }
754    
755            public static MBMessageLocalService getService() {
756                    if (_service == null) {
757                            _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
758    
759                            ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
760                                    "_service");
761                    }
762    
763                    return _service;
764            }
765    
766            /**
767             * @deprecated As of 6.2.0
768             */
769            public void setService(MBMessageLocalService service) {
770            }
771    
772            private static MBMessageLocalService _service;
773    }