001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 fileName, java.io.File file,
375                    com.liferay.portal.service.ServiceContext serviceContext)
376                    throws com.liferay.portal.kernel.exception.PortalException,
377                            com.liferay.portal.kernel.exception.SystemException,
378                            java.io.FileNotFoundException {
379                    return getService()
380                                       .addMessage(userId, userName, groupId, categoryId, subject,
381                            body, fileName, file, serviceContext);
382            }
383    
384            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
385                    long userId, java.lang.String userName, long groupId, long categoryId,
386                    java.lang.String subject, java.lang.String body,
387                    java.lang.String format,
388                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
389                    boolean anonymous, double priority, boolean allowPingbacks,
390                    com.liferay.portal.service.ServiceContext serviceContext)
391                    throws com.liferay.portal.kernel.exception.PortalException,
392                            com.liferay.portal.kernel.exception.SystemException {
393                    return getService()
394                                       .addMessage(userId, userName, groupId, categoryId, subject,
395                            body, format, inputStreamOVPs, anonymous, priority, allowPingbacks,
396                            serviceContext);
397            }
398    
399            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
400                    long userId, java.lang.String userName, long groupId, long categoryId,
401                    java.lang.String subject, java.lang.String body,
402                    java.lang.String format, java.lang.String fileName, java.io.File file,
403                    boolean anonymous, double priority, boolean allowPingbacks,
404                    com.liferay.portal.service.ServiceContext serviceContext)
405                    throws com.liferay.portal.kernel.exception.PortalException,
406                            com.liferay.portal.kernel.exception.SystemException,
407                            java.io.FileNotFoundException {
408                    return getService()
409                                       .addMessage(userId, userName, groupId, categoryId, subject,
410                            body, format, fileName, file, anonymous, priority, allowPingbacks,
411                            serviceContext);
412            }
413    
414            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
415                    long userId, java.lang.String userName, long categoryId,
416                    java.lang.String subject, java.lang.String body,
417                    com.liferay.portal.service.ServiceContext serviceContext)
418                    throws com.liferay.portal.kernel.exception.PortalException,
419                            com.liferay.portal.kernel.exception.SystemException {
420                    return getService()
421                                       .addMessage(userId, userName, categoryId, subject, body,
422                            serviceContext);
423            }
424    
425            public static void addMessageResources(long messageId,
426                    boolean addGroupPermissions, boolean addGuestPermissions)
427                    throws com.liferay.portal.kernel.exception.PortalException,
428                            com.liferay.portal.kernel.exception.SystemException {
429                    getService()
430                            .addMessageResources(messageId, addGroupPermissions,
431                            addGuestPermissions);
432            }
433    
434            public static void addMessageResources(long messageId,
435                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
436                    throws com.liferay.portal.kernel.exception.PortalException,
437                            com.liferay.portal.kernel.exception.SystemException {
438                    getService()
439                            .addMessageResources(messageId, groupPermissions, guestPermissions);
440            }
441    
442            public static void addMessageResources(
443                    com.liferay.portlet.messageboards.model.MBMessage message,
444                    boolean addGroupPermissions, boolean addGuestPermissions)
445                    throws com.liferay.portal.kernel.exception.PortalException,
446                            com.liferay.portal.kernel.exception.SystemException {
447                    getService()
448                            .addMessageResources(message, addGroupPermissions,
449                            addGuestPermissions);
450            }
451    
452            public static void addMessageResources(
453                    com.liferay.portlet.messageboards.model.MBMessage message,
454                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
455                    throws com.liferay.portal.kernel.exception.PortalException,
456                            com.liferay.portal.kernel.exception.SystemException {
457                    getService()
458                            .addMessageResources(message, groupPermissions, guestPermissions);
459            }
460    
461            public static com.liferay.portlet.messageboards.model.MBMessage deleteDiscussionMessage(
462                    long messageId)
463                    throws com.liferay.portal.kernel.exception.PortalException,
464                            com.liferay.portal.kernel.exception.SystemException {
465                    return getService().deleteDiscussionMessage(messageId);
466            }
467    
468            public static void deleteDiscussionMessages(java.lang.String className,
469                    long classPK)
470                    throws com.liferay.portal.kernel.exception.PortalException,
471                            com.liferay.portal.kernel.exception.SystemException {
472                    getService().deleteDiscussionMessages(className, classPK);
473            }
474    
475            public static com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
476                    long messageId)
477                    throws com.liferay.portal.kernel.exception.PortalException,
478                            com.liferay.portal.kernel.exception.SystemException {
479                    return getService().deleteMessage(messageId);
480            }
481    
482            public static com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
483                    com.liferay.portlet.messageboards.model.MBMessage message)
484                    throws com.liferay.portal.kernel.exception.PortalException,
485                            com.liferay.portal.kernel.exception.SystemException {
486                    return getService().deleteMessage(message);
487            }
488    
489            public static void deleteMessageAttachment(long messageId,
490                    java.lang.String fileName)
491                    throws com.liferay.portal.kernel.exception.PortalException,
492                            com.liferay.portal.kernel.exception.SystemException {
493                    getService().deleteMessageAttachment(messageId, fileName);
494            }
495    
496            public static void deleteMessageAttachments(long messageId)
497                    throws com.liferay.portal.kernel.exception.PortalException,
498                            com.liferay.portal.kernel.exception.SystemException {
499                    getService().deleteMessageAttachments(messageId);
500            }
501    
502            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
503                    long groupId, long categoryId, int status, int start, int end)
504                    throws com.liferay.portal.kernel.exception.SystemException {
505                    return getService()
506                                       .getCategoryMessages(groupId, categoryId, status, start, end);
507            }
508    
509            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
510                    long groupId, long categoryId, int status, int start, int end,
511                    com.liferay.portal.kernel.util.OrderByComparator obc)
512                    throws com.liferay.portal.kernel.exception.SystemException {
513                    return getService()
514                                       .getCategoryMessages(groupId, categoryId, status, start,
515                            end, obc);
516            }
517    
518            public static int getCategoryMessagesCount(long groupId, long categoryId,
519                    int status) throws com.liferay.portal.kernel.exception.SystemException {
520                    return getService().getCategoryMessagesCount(groupId, categoryId, status);
521            }
522    
523            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
524                    long companyId, int status, int start, int end)
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    return getService().getCompanyMessages(companyId, status, start, end);
527            }
528    
529            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
530                    long companyId, int status, int start, int end,
531                    com.liferay.portal.kernel.util.OrderByComparator obc)
532                    throws com.liferay.portal.kernel.exception.SystemException {
533                    return getService()
534                                       .getCompanyMessages(companyId, status, start, end, obc);
535            }
536    
537            public static int getCompanyMessagesCount(long companyId, int status)
538                    throws com.liferay.portal.kernel.exception.SystemException {
539                    return getService().getCompanyMessagesCount(companyId, status);
540            }
541    
542            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
543                    long userId, long groupId, java.lang.String className, long classPK,
544                    int status)
545                    throws com.liferay.portal.kernel.exception.PortalException,
546                            com.liferay.portal.kernel.exception.SystemException {
547                    return getService()
548                                       .getDiscussionMessageDisplay(userId, groupId, className,
549                            classPK, status);
550            }
551    
552            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
553                    long userId, long groupId, java.lang.String className, long classPK,
554                    int status, java.lang.String threadView)
555                    throws com.liferay.portal.kernel.exception.PortalException,
556                            com.liferay.portal.kernel.exception.SystemException {
557                    return getService()
558                                       .getDiscussionMessageDisplay(userId, groupId, className,
559                            classPK, status, threadView);
560            }
561    
562            public static int getDiscussionMessagesCount(long classNameId,
563                    long classPK, int status)
564                    throws com.liferay.portal.kernel.exception.SystemException {
565                    return getService()
566                                       .getDiscussionMessagesCount(classNameId, classPK, status);
567            }
568    
569            public static int getDiscussionMessagesCount(java.lang.String className,
570                    long classPK, int status)
571                    throws com.liferay.portal.kernel.exception.SystemException {
572                    return getService()
573                                       .getDiscussionMessagesCount(className, classPK, status);
574            }
575    
576            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
577                    java.lang.String className)
578                    throws com.liferay.portal.kernel.exception.SystemException {
579                    return getService().getDiscussions(className);
580            }
581    
582            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
583                    long groupId, int status, int start, int end)
584                    throws com.liferay.portal.kernel.exception.SystemException {
585                    return getService().getGroupMessages(groupId, status, start, end);
586            }
587    
588            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
589                    long groupId, int status, int start, int end,
590                    com.liferay.portal.kernel.util.OrderByComparator obc)
591                    throws com.liferay.portal.kernel.exception.SystemException {
592                    return getService().getGroupMessages(groupId, status, start, end, obc);
593            }
594    
595            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
596                    long groupId, long userId, int status, int start, int end)
597                    throws com.liferay.portal.kernel.exception.SystemException {
598                    return getService().getGroupMessages(groupId, userId, status, start, end);
599            }
600    
601            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
602                    long groupId, long userId, int status, int start, int end,
603                    com.liferay.portal.kernel.util.OrderByComparator obc)
604                    throws com.liferay.portal.kernel.exception.SystemException {
605                    return getService()
606                                       .getGroupMessages(groupId, userId, status, start, end, obc);
607            }
608    
609            public static int getGroupMessagesCount(long groupId, int status)
610                    throws com.liferay.portal.kernel.exception.SystemException {
611                    return getService().getGroupMessagesCount(groupId, status);
612            }
613    
614            public static int getGroupMessagesCount(long groupId, long userId,
615                    int status) throws com.liferay.portal.kernel.exception.SystemException {
616                    return getService().getGroupMessagesCount(groupId, userId, status);
617            }
618    
619            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
620                    long messageId)
621                    throws com.liferay.portal.kernel.exception.PortalException,
622                            com.liferay.portal.kernel.exception.SystemException {
623                    return getService().getMessage(messageId);
624            }
625    
626            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
627                    long userId, long messageId, int status, java.lang.String threadView,
628                    boolean includePrevAndNext)
629                    throws com.liferay.portal.kernel.exception.PortalException,
630                            com.liferay.portal.kernel.exception.SystemException {
631                    return getService()
632                                       .getMessageDisplay(userId, messageId, status, threadView,
633                            includePrevAndNext);
634            }
635    
636            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
637                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
638                    int status, java.lang.String threadView, boolean includePrevAndNext)
639                    throws com.liferay.portal.kernel.exception.PortalException,
640                            com.liferay.portal.kernel.exception.SystemException {
641                    return getService()
642                                       .getMessageDisplay(userId, message, status, threadView,
643                            includePrevAndNext);
644            }
645    
646            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
647                    java.lang.String className, long classPK, int status)
648                    throws com.liferay.portal.kernel.exception.SystemException {
649                    return getService().getMessages(className, classPK, status);
650            }
651    
652            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
653                    throws com.liferay.portal.kernel.exception.SystemException {
654                    return getService().getNoAssetMessages();
655            }
656    
657            public static int getPositionInThread(long messageId)
658                    throws com.liferay.portal.kernel.exception.PortalException,
659                            com.liferay.portal.kernel.exception.SystemException {
660                    return getService().getPositionInThread(messageId);
661            }
662    
663            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
664                    long threadId, int status)
665                    throws com.liferay.portal.kernel.exception.SystemException {
666                    return getService().getThreadMessages(threadId, status);
667            }
668    
669            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
670                    long threadId, int status,
671                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
672                    throws com.liferay.portal.kernel.exception.SystemException {
673                    return getService().getThreadMessages(threadId, status, comparator);
674            }
675    
676            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
677                    long threadId, int status, int start, int end)
678                    throws com.liferay.portal.kernel.exception.SystemException {
679                    return getService().getThreadMessages(threadId, status, start, end);
680            }
681    
682            public static int getThreadMessagesCount(long threadId, int status)
683                    throws com.liferay.portal.kernel.exception.SystemException {
684                    return getService().getThreadMessagesCount(threadId, status);
685            }
686    
687            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
688                    long threadId, int status, int start, int end)
689                    throws com.liferay.portal.kernel.exception.SystemException {
690                    return getService()
691                                       .getThreadRepliesMessages(threadId, status, start, end);
692            }
693    
694            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
695                    long userId, long classNameId, long classPK, int status, int start,
696                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
697                    throws com.liferay.portal.kernel.exception.SystemException {
698                    return getService()
699                                       .getUserDiscussionMessages(userId, classNameId, classPK,
700                            status, start, end, obc);
701            }
702    
703            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
704                    long userId, long[] classNameIds, int status, int start, int end,
705                    com.liferay.portal.kernel.util.OrderByComparator obc)
706                    throws com.liferay.portal.kernel.exception.SystemException {
707                    return getService()
708                                       .getUserDiscussionMessages(userId, classNameIds, status,
709                            start, end, obc);
710            }
711    
712            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
713                    long userId, java.lang.String className, long classPK, int status,
714                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
715                    throws com.liferay.portal.kernel.exception.SystemException {
716                    return getService()
717                                       .getUserDiscussionMessages(userId, className, classPK,
718                            status, start, end, obc);
719            }
720    
721            public static int getUserDiscussionMessagesCount(long userId,
722                    long classNameId, long classPK, int status)
723                    throws com.liferay.portal.kernel.exception.SystemException {
724                    return getService()
725                                       .getUserDiscussionMessagesCount(userId, classNameId,
726                            classPK, status);
727            }
728    
729            public static int getUserDiscussionMessagesCount(long userId,
730                    long[] classNameIds, int status)
731                    throws com.liferay.portal.kernel.exception.SystemException {
732                    return getService()
733                                       .getUserDiscussionMessagesCount(userId, classNameIds, status);
734            }
735    
736            public static int getUserDiscussionMessagesCount(long userId,
737                    java.lang.String className, long classPK, int status)
738                    throws com.liferay.portal.kernel.exception.SystemException {
739                    return getService()
740                                       .getUserDiscussionMessagesCount(userId, className, classPK,
741                            status);
742            }
743    
744            public static void moveDiscussionToTrash(java.lang.String className,
745                    long classPK)
746                    throws com.liferay.portal.kernel.exception.SystemException {
747                    getService().moveDiscussionToTrash(className, classPK);
748            }
749    
750            public static long moveMessageAttachmentToTrash(long userId,
751                    long messageId, java.lang.String fileName)
752                    throws com.liferay.portal.kernel.exception.PortalException,
753                            com.liferay.portal.kernel.exception.SystemException {
754                    return getService()
755                                       .moveMessageAttachmentToTrash(userId, messageId, fileName);
756            }
757    
758            public static void restoreDiscussionFromTrash(java.lang.String className,
759                    long classPK)
760                    throws com.liferay.portal.kernel.exception.SystemException {
761                    getService().restoreDiscussionFromTrash(className, classPK);
762            }
763    
764            public static void restoreMessageAttachmentFromTrash(long userId,
765                    long messageId, java.lang.String deletedFileName)
766                    throws com.liferay.portal.kernel.exception.PortalException,
767                            com.liferay.portal.kernel.exception.SystemException {
768                    getService()
769                            .restoreMessageAttachmentFromTrash(userId, messageId,
770                            deletedFileName);
771            }
772    
773            public static void subscribeMessage(long userId, long messageId)
774                    throws com.liferay.portal.kernel.exception.PortalException,
775                            com.liferay.portal.kernel.exception.SystemException {
776                    getService().subscribeMessage(userId, messageId);
777            }
778    
779            public static void unsubscribeMessage(long userId, long messageId)
780                    throws com.liferay.portal.kernel.exception.PortalException,
781                            com.liferay.portal.kernel.exception.SystemException {
782                    getService().unsubscribeMessage(userId, messageId);
783            }
784    
785            public static void updateAnswer(long messageId, boolean answer,
786                    boolean cascade)
787                    throws com.liferay.portal.kernel.exception.PortalException,
788                            com.liferay.portal.kernel.exception.SystemException {
789                    getService().updateAnswer(messageId, answer, cascade);
790            }
791    
792            public static void updateAnswer(
793                    com.liferay.portlet.messageboards.model.MBMessage message,
794                    boolean answer, boolean cascade)
795                    throws com.liferay.portal.kernel.exception.PortalException,
796                            com.liferay.portal.kernel.exception.SystemException {
797                    getService().updateAnswer(message, answer, cascade);
798            }
799    
800            public static void updateAsset(long userId,
801                    com.liferay.portlet.messageboards.model.MBMessage message,
802                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
803                    long[] assetLinkEntryIds)
804                    throws com.liferay.portal.kernel.exception.PortalException,
805                            com.liferay.portal.kernel.exception.SystemException {
806                    getService()
807                            .updateAsset(userId, message, assetCategoryIds, assetTagNames,
808                            assetLinkEntryIds);
809            }
810    
811            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
812                    long userId, long messageId, java.lang.String className, long classPK,
813                    java.lang.String subject, java.lang.String body,
814                    com.liferay.portal.service.ServiceContext serviceContext)
815                    throws com.liferay.portal.kernel.exception.PortalException,
816                            com.liferay.portal.kernel.exception.SystemException {
817                    return getService()
818                                       .updateDiscussionMessage(userId, messageId, className,
819                            classPK, subject, body, serviceContext);
820            }
821    
822            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
823                    long userId, long messageId, java.lang.String subject,
824                    java.lang.String body,
825                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
826                    java.util.List<java.lang.String> existingFiles, double priority,
827                    boolean allowPingbacks,
828                    com.liferay.portal.service.ServiceContext serviceContext)
829                    throws com.liferay.portal.kernel.exception.PortalException,
830                            com.liferay.portal.kernel.exception.SystemException {
831                    return getService()
832                                       .updateMessage(userId, messageId, subject, body,
833                            inputStreamOVPs, existingFiles, priority, allowPingbacks,
834                            serviceContext);
835            }
836    
837            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
838                    long messageId, java.lang.String body)
839                    throws com.liferay.portal.kernel.exception.PortalException,
840                            com.liferay.portal.kernel.exception.SystemException {
841                    return getService().updateMessage(messageId, body);
842            }
843    
844            public static com.liferay.portlet.messageboards.model.MBMessage updateStatus(
845                    long userId, long messageId, int status,
846                    com.liferay.portal.service.ServiceContext serviceContext)
847                    throws com.liferay.portal.kernel.exception.PortalException,
848                            com.liferay.portal.kernel.exception.SystemException {
849                    return getService()
850                                       .updateStatus(userId, messageId, status, serviceContext);
851            }
852    
853            public static void updateUserName(long userId, java.lang.String userName)
854                    throws com.liferay.portal.kernel.exception.SystemException {
855                    getService().updateUserName(userId, userName);
856            }
857    
858            public static MBMessageLocalService getService() {
859                    if (_service == null) {
860                            _service = (MBMessageLocalService)PortalBeanLocatorUtil.locate(MBMessageLocalService.class.getName());
861    
862                            ReferenceRegistry.registerReference(MBMessageLocalServiceUtil.class,
863                                    "_service");
864                    }
865    
866                    return _service;
867            }
868    
869            /**
870             * @deprecated As of 6.2.0
871             */
872            public void setService(MBMessageLocalService service) {
873            }
874    
875            private static MBMessageLocalService _service;
876    }