001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.model.SystemEventConstants;
026    import com.liferay.portal.service.BaseLocalService;
027    import com.liferay.portal.service.PersistedModelLocalService;
028    
029    /**
030     * Provides the local service interface for MBMessage. Methods of this
031     * service will not have security checks based on the propagated JAAS
032     * credentials because this service can only be accessed from within the same
033     * VM.
034     *
035     * @author Brian Wing Shun Chan
036     * @see MBMessageLocalServiceUtil
037     * @see com.liferay.portlet.messageboards.service.base.MBMessageLocalServiceBaseImpl
038     * @see com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface MBMessageLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link MBMessageLocalServiceUtil} to access the message-boards message local service. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051            public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
052                    long userId, java.lang.String userName, long groupId,
053                    java.lang.String className, long classPK, long threadId,
054                    long parentMessageId, java.lang.String subject, java.lang.String body,
055                    com.liferay.portal.service.ServiceContext serviceContext)
056                    throws PortalException;
057    
058            public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
059                    long userId, java.lang.String userName, long groupId,
060                    java.lang.String className, long classPK, int workflowAction)
061                    throws PortalException;
062    
063            /**
064            * Adds the message-boards message to the database. Also notifies the appropriate model listeners.
065            *
066            * @param mbMessage the message-boards message
067            * @return the message-boards message that was added
068            */
069            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
070            public com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
071                    com.liferay.portlet.messageboards.model.MBMessage mbMessage);
072    
073            /**
074            * @deprecated As of 7.0.0, replaced by {@link #addMessage(long, String,
075            long, long, String, String, ServiceContext)}
076            */
077            @java.lang.Deprecated
078            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
079                    long userId, java.lang.String userName, long categoryId,
080                    java.lang.String subject, java.lang.String body,
081                    com.liferay.portal.service.ServiceContext serviceContext)
082                    throws PortalException;
083    
084            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
085                    long userId, java.lang.String userName, long groupId, long categoryId,
086                    java.lang.String subject, java.lang.String body,
087                    java.lang.String format, java.lang.String fileName, java.io.File file,
088                    boolean anonymous, double priority, boolean allowPingbacks,
089                    com.liferay.portal.service.ServiceContext serviceContext)
090                    throws PortalException, java.io.FileNotFoundException;
091    
092            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
093                    long userId, java.lang.String userName, long groupId, long categoryId,
094                    java.lang.String subject, java.lang.String body,
095                    java.lang.String format,
096                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
097                    boolean anonymous, double priority, boolean allowPingbacks,
098                    com.liferay.portal.service.ServiceContext serviceContext)
099                    throws PortalException;
100    
101            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
102                    long userId, java.lang.String userName, long groupId, long categoryId,
103                    java.lang.String subject, java.lang.String body,
104                    com.liferay.portal.service.ServiceContext serviceContext)
105                    throws PortalException;
106    
107            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
108                    long userId, java.lang.String userName, long groupId, long categoryId,
109                    long threadId, long parentMessageId, java.lang.String subject,
110                    java.lang.String body, java.lang.String format,
111                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
112                    boolean anonymous, double priority, boolean allowPingbacks,
113                    com.liferay.portal.service.ServiceContext serviceContext)
114                    throws PortalException;
115    
116            public void addMessageAttachment(long userId, long messageId,
117                    java.lang.String fileName, java.io.File file, java.lang.String mimeType)
118                    throws PortalException;
119    
120            public void addMessageResources(
121                    com.liferay.portlet.messageboards.model.MBMessage message,
122                    boolean addGroupPermissions, boolean addGuestPermissions)
123                    throws PortalException;
124    
125            public void addMessageResources(
126                    com.liferay.portlet.messageboards.model.MBMessage message,
127                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
128                    throws PortalException;
129    
130            public void addMessageResources(long messageId,
131                    boolean addGroupPermissions, boolean addGuestPermissions)
132                    throws PortalException;
133    
134            public void addMessageResources(long messageId,
135                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
136                    throws PortalException;
137    
138            /**
139            * Creates a new message-boards message with the primary key. Does not add the message-boards message to the database.
140            *
141            * @param messageId the primary key for the new message-boards message
142            * @return the new message-boards message
143            */
144            public com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
145                    long messageId);
146    
147            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
148            public com.liferay.portlet.messageboards.model.MBMessage deleteDiscussionMessage(
149                    long messageId) throws PortalException;
150    
151            public void deleteDiscussionMessages(java.lang.String className,
152                    long classPK) throws PortalException;
153    
154            /**
155            * Deletes the message-boards message from the database. Also notifies the appropriate model listeners.
156            *
157            * @param mbMessage the message-boards message
158            * @return the message-boards message that was removed
159            */
160            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
161            public com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
162                    com.liferay.portlet.messageboards.model.MBMessage mbMessage);
163    
164            /**
165            * Deletes the message-boards message with the primary key from the database. Also notifies the appropriate model listeners.
166            *
167            * @param messageId the primary key of the message-boards message
168            * @return the message-boards message that was removed
169            * @throws PortalException if a message-boards message with the primary key could not be found
170            */
171            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
172            public com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
173                    long messageId) throws PortalException;
174    
175            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
176            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
177            public com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
178                    com.liferay.portlet.messageboards.model.MBMessage message)
179                    throws PortalException;
180    
181            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
182            public com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
183                    long messageId) throws PortalException;
184    
185            public void deleteMessageAttachment(long messageId,
186                    java.lang.String fileName) throws PortalException;
187    
188            public void deleteMessageAttachments(long messageId)
189                    throws PortalException;
190    
191            /**
192            * @throws PortalException
193            */
194            @Override
195            public com.liferay.portal.model.PersistedModel deletePersistedModel(
196                    com.liferay.portal.model.PersistedModel persistedModel)
197                    throws PortalException;
198    
199            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
200    
201            /**
202            * Performs a dynamic query on the database and returns the matching rows.
203            *
204            * @param dynamicQuery the dynamic query
205            * @return the matching rows
206            */
207            public <T> java.util.List<T> dynamicQuery(
208                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
209    
210            /**
211            * Performs a dynamic query on the database and returns a range of the matching rows.
212            *
213            * <p>
214            * 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.
215            * </p>
216            *
217            * @param dynamicQuery the dynamic query
218            * @param start the lower bound of the range of model instances
219            * @param end the upper bound of the range of model instances (not inclusive)
220            * @return the range of matching rows
221            */
222            public <T> java.util.List<T> dynamicQuery(
223                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
224                    int end);
225    
226            /**
227            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
228            *
229            * <p>
230            * 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.
231            * </p>
232            *
233            * @param dynamicQuery the dynamic query
234            * @param start the lower bound of the range of model instances
235            * @param end the upper bound of the range of model instances (not inclusive)
236            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
237            * @return the ordered range of matching rows
238            */
239            public <T> java.util.List<T> dynamicQuery(
240                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
241                    int end,
242                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
243    
244            /**
245            * Returns the number of rows matching the dynamic query.
246            *
247            * @param dynamicQuery the dynamic query
248            * @return the number of rows matching the dynamic query
249            */
250            public long dynamicQueryCount(
251                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
252    
253            /**
254            * Returns the number of rows matching the dynamic query.
255            *
256            * @param dynamicQuery the dynamic query
257            * @param projection the projection to apply to the query
258            * @return the number of rows matching the dynamic query
259            */
260            public long dynamicQueryCount(
261                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
262                    com.liferay.portal.kernel.dao.orm.Projection projection);
263    
264            public void emptyMessageAttachments(long messageId)
265                    throws PortalException;
266    
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public com.liferay.portlet.messageboards.model.MBMessage fetchMBMessage(
269                    long messageId);
270    
271            /**
272            * Returns the message-boards message matching the UUID and group.
273            *
274            * @param uuid the message-boards message's UUID
275            * @param groupId the primary key of the group
276            * @return the matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
277            */
278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279            public com.liferay.portlet.messageboards.model.MBMessage fetchMBMessageByUuidAndGroupId(
280                    java.lang.String uuid, long groupId);
281    
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
284    
285            /**
286            * Returns the Spring bean ID for this bean.
287            *
288            * @return the Spring bean ID for this bean
289            */
290            public java.lang.String getBeanIdentifier();
291    
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
294                    long groupId, long categoryId, int status, int start, int end);
295    
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
298                    long groupId, long categoryId, int status, int start, int end,
299                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
300    
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public int getCategoryMessagesCount(long groupId, long categoryId,
303                    int status);
304    
305            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
307                    long companyId, int status, int start, int end);
308    
309            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
311                    long companyId, int status, int start, int end,
312                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
313    
314            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315            public int getCompanyMessagesCount(long companyId, int status);
316    
317            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318            public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
319                    long userId, long groupId, java.lang.String className, long classPK,
320                    int status) throws PortalException;
321    
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
324                    long userId, long groupId, java.lang.String className, long classPK,
325                    int status,
326                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
327                    throws PortalException;
328    
329            /**
330            * @deprecated As of 7.0.0, replaced by {@link
331            #getDiscussionMessageDisplay(long, long, String, long, int)}
332            */
333            @java.lang.Deprecated
334            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
335            public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
336                    long userId, long groupId, java.lang.String className, long classPK,
337                    int status, java.lang.String threadView) throws PortalException;
338    
339            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340            public int getDiscussionMessagesCount(java.lang.String className,
341                    long classPK, int status);
342    
343            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344            public int getDiscussionMessagesCount(long classNameId, long classPK,
345                    int status);
346    
347            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348            public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
349                    java.lang.String className);
350    
351            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
352            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
353                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
354    
355            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
356            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
357                    long groupId, int status, int start, int end);
358    
359            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
360            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
361                    long groupId, int status, int start, int end,
362                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
363    
364            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
365            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
366                    long groupId, long userId, int status, int start, int end);
367    
368            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
369            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
370                    long groupId, long userId, int status, int start, int end,
371                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
372    
373            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
374            public int getGroupMessagesCount(long groupId, int status);
375    
376            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
377            public int getGroupMessagesCount(long groupId, long userId, int status);
378    
379            /**
380            * Returns the message-boards message with the primary key.
381            *
382            * @param messageId the primary key of the message-boards message
383            * @return the message-boards message
384            * @throws PortalException if a message-boards message with the primary key could not be found
385            */
386            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
387            public com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
388                    long messageId) throws PortalException;
389    
390            /**
391            * Returns the message-boards message matching the UUID and group.
392            *
393            * @param uuid the message-boards message's UUID
394            * @param groupId the primary key of the group
395            * @return the matching message-boards message
396            * @throws PortalException if a matching message-boards message could not be found
397            */
398            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399            public com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
400                    java.lang.String uuid, long groupId) throws PortalException;
401    
402            /**
403            * Returns a range of all the message-boards messages.
404            *
405            * <p>
406            * 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.
407            * </p>
408            *
409            * @param start the lower bound of the range of message-boards messages
410            * @param end the upper bound of the range of message-boards messages (not inclusive)
411            * @return the range of message-boards messages
412            */
413            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
414            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
415                    int start, int end);
416    
417            /**
418            * Returns all the message-boards messages matching the UUID and company.
419            *
420            * @param uuid the UUID of the message-boards messages
421            * @param companyId the primary key of the company
422            * @return the matching message-boards messages, or an empty list if no matches were found
423            */
424            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
425            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
426                    java.lang.String uuid, long companyId);
427    
428            /**
429            * Returns a range of message-boards messages matching the UUID and company.
430            *
431            * @param uuid the UUID of the message-boards messages
432            * @param companyId the primary key of the company
433            * @param start the lower bound of the range of message-boards messages
434            * @param end the upper bound of the range of message-boards messages (not inclusive)
435            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
436            * @return the range of matching message-boards messages, or an empty list if no matches were found
437            */
438            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
439            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
440                    java.lang.String uuid, long companyId, int start, int end,
441                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> orderByComparator);
442    
443            /**
444            * Returns the number of message-boards messages.
445            *
446            * @return the number of message-boards messages
447            */
448            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
449            public int getMBMessagesCount();
450    
451            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
452            public com.liferay.portlet.messageboards.model.MBMessage getMessage(
453                    long messageId) throws PortalException;
454    
455            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
456            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
457                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
458                    int status, java.lang.String threadView, boolean includePrevAndNext)
459                    throws PortalException;
460    
461            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
462            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
463                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
464                    int status, java.lang.String threadView, boolean includePrevAndNext,
465                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
466                    throws PortalException;
467    
468            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
469            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
470                    long userId, long messageId, int status, java.lang.String threadView,
471                    boolean includePrevAndNext) throws PortalException;
472    
473            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
474            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
475                    java.lang.String className, long classPK, int status);
476    
477            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
478            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages();
479    
480            @Override
481            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
482            public com.liferay.portal.model.PersistedModel getPersistedModel(
483                    java.io.Serializable primaryKeyObj) throws PortalException;
484    
485            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
486            public int getPositionInThread(long messageId) throws PortalException;
487    
488            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
489            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
490                    long threadId, int status);
491    
492            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
493            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
494                    long threadId, int status,
495                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator);
496    
497            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
498            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
499                    long threadId, int status, int start, int end);
500    
501            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
502            public int getThreadMessagesCount(long threadId, int status);
503    
504            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
505            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
506                    long threadId, int status, int start, int end);
507    
508            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
509            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
510                    long userId, java.lang.String className, long classPK, int status,
511                    int start, int end,
512                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
513    
514            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
515            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
516                    long userId, long classNameId, long classPK, int status, int start,
517                    int end,
518                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
519    
520            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
521            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
522                    long userId, long[] classNameIds, int status, int start, int end,
523                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
524    
525            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
526            public int getUserDiscussionMessagesCount(long userId,
527                    java.lang.String className, long classPK, int status);
528    
529            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
530            public int getUserDiscussionMessagesCount(long userId, long classNameId,
531                    long classPK, int status);
532    
533            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
534            public int getUserDiscussionMessagesCount(long userId, long[] classNameIds,
535                    int status);
536    
537            public long moveMessageAttachmentToTrash(long userId, long messageId,
538                    java.lang.String fileName) throws PortalException;
539    
540            public void restoreMessageAttachmentFromTrash(long userId, long messageId,
541                    java.lang.String deletedFileName) throws PortalException;
542    
543            /**
544            * Sets the Spring bean ID for this bean.
545            *
546            * @param beanIdentifier the Spring bean ID for this bean
547            */
548            public void setBeanIdentifier(java.lang.String beanIdentifier);
549    
550            public void subscribeMessage(long userId, long messageId)
551                    throws PortalException;
552    
553            public void unsubscribeMessage(long userId, long messageId)
554                    throws PortalException;
555    
556            public void updateAnswer(
557                    com.liferay.portlet.messageboards.model.MBMessage message,
558                    boolean answer, boolean cascade) throws PortalException;
559    
560            public void updateAnswer(long messageId, boolean answer, boolean cascade)
561                    throws PortalException;
562    
563            public void updateAsset(long userId,
564                    com.liferay.portlet.messageboards.model.MBMessage message,
565                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
566                    long[] assetLinkEntryIds) throws PortalException;
567    
568            public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
569                    long userId, long messageId, java.lang.String className, long classPK,
570                    java.lang.String subject, java.lang.String body,
571                    com.liferay.portal.service.ServiceContext serviceContext)
572                    throws PortalException;
573    
574            /**
575            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
576            *
577            * @param mbMessage the message-boards message
578            * @return the message-boards message that was updated
579            */
580            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
581            public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
582                    com.liferay.portlet.messageboards.model.MBMessage mbMessage);
583    
584            /**
585            * @deprecated As of 7.0.0, with no direct replacement
586            */
587            @java.lang.Deprecated
588            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
589                    long messageId, java.lang.String body) throws PortalException;
590    
591            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
592                    long userId, long messageId, java.lang.String body,
593                    com.liferay.portal.service.ServiceContext serviceContext)
594                    throws PortalException;
595    
596            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
597                    long userId, long messageId, java.lang.String subject,
598                    java.lang.String body,
599                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
600                    java.util.List<java.lang.String> existingFiles, double priority,
601                    boolean allowPingbacks,
602                    com.liferay.portal.service.ServiceContext serviceContext)
603                    throws PortalException;
604    
605            /**
606            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, long,
607            int, ServiceContext, Map)}
608            */
609            @java.lang.Deprecated
610            public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
611                    long userId, long messageId, int status,
612                    com.liferay.portal.service.ServiceContext serviceContext)
613                    throws PortalException;
614    
615            public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
616                    long userId, long messageId, int status,
617                    com.liferay.portal.service.ServiceContext serviceContext,
618                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
619                    throws PortalException;
620    
621            public void updateUserName(long userId, java.lang.String userName);
622    }