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