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 com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.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,
088                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
089                    boolean anonymous, double priority, boolean allowPingbacks,
090                    com.liferay.portal.service.ServiceContext serviceContext)
091                    throws com.liferay.portal.kernel.exception.PortalException;
092    
093            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
094                    long userId, java.lang.String userName, long groupId, long categoryId,
095                    java.lang.String subject, java.lang.String body,
096                    com.liferay.portal.service.ServiceContext serviceContext)
097                    throws com.liferay.portal.kernel.exception.PortalException;
098    
099            public com.liferay.portlet.messageboards.model.MBMessage addMessage(
100                    long userId, java.lang.String userName, long groupId, long categoryId,
101                    long threadId, long parentMessageId, java.lang.String subject,
102                    java.lang.String body, java.lang.String format,
103                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
104                    boolean anonymous, double priority, boolean allowPingbacks,
105                    com.liferay.portal.service.ServiceContext serviceContext)
106                    throws com.liferay.portal.kernel.exception.PortalException;
107    
108            public void addMessageResources(
109                    com.liferay.portlet.messageboards.model.MBMessage message,
110                    boolean addGroupPermissions, boolean addGuestPermissions)
111                    throws com.liferay.portal.kernel.exception.PortalException;
112    
113            public void addMessageResources(
114                    com.liferay.portlet.messageboards.model.MBMessage message,
115                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
116                    throws com.liferay.portal.kernel.exception.PortalException;
117    
118            public void addMessageResources(long messageId,
119                    boolean addGroupPermissions, boolean addGuestPermissions)
120                    throws com.liferay.portal.kernel.exception.PortalException;
121    
122            public void addMessageResources(long messageId,
123                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
124                    throws com.liferay.portal.kernel.exception.PortalException;
125    
126            /**
127            * Creates a new message-boards message with the primary key. Does not add the message-boards message to the database.
128            *
129            * @param messageId the primary key for the new message-boards message
130            * @return the new message-boards message
131            */
132            public com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
133                    long messageId);
134    
135            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
136            public com.liferay.portlet.messageboards.model.MBMessage deleteDiscussionMessage(
137                    long messageId)
138                    throws com.liferay.portal.kernel.exception.PortalException;
139    
140            public void deleteDiscussionMessages(java.lang.String className,
141                    long classPK)
142                    throws com.liferay.portal.kernel.exception.PortalException;
143    
144            /**
145            * Deletes the message-boards message from the database. Also notifies the appropriate model listeners.
146            *
147            * @param mbMessage the message-boards message
148            * @return the message-boards message that was removed
149            */
150            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
151            public com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
152                    com.liferay.portlet.messageboards.model.MBMessage mbMessage);
153    
154            /**
155            * Deletes the message-boards message with the primary key from the database. Also notifies the appropriate model listeners.
156            *
157            * @param messageId the primary key of the message-boards message
158            * @return the message-boards message that was removed
159            * @throws PortalException if a message-boards message with the primary key could not be found
160            */
161            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
162            public com.liferay.portlet.messageboards.model.MBMessage deleteMBMessage(
163                    long messageId)
164                    throws com.liferay.portal.kernel.exception.PortalException;
165    
166            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
167            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
168            public com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
169                    com.liferay.portlet.messageboards.model.MBMessage message)
170                    throws com.liferay.portal.kernel.exception.PortalException;
171    
172            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
173            public com.liferay.portlet.messageboards.model.MBMessage deleteMessage(
174                    long messageId)
175                    throws com.liferay.portal.kernel.exception.PortalException;
176    
177            public void deleteMessageAttachment(long messageId,
178                    java.lang.String fileName)
179                    throws com.liferay.portal.kernel.exception.PortalException;
180    
181            public void deleteMessageAttachments(long messageId)
182                    throws com.liferay.portal.kernel.exception.PortalException;
183    
184            /**
185            * @throws PortalException
186            */
187            @Override
188            public com.liferay.portal.model.PersistedModel deletePersistedModel(
189                    com.liferay.portal.model.PersistedModel persistedModel)
190                    throws com.liferay.portal.kernel.exception.PortalException;
191    
192            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
193    
194            /**
195            * Performs a dynamic query on the database and returns the matching rows.
196            *
197            * @param dynamicQuery the dynamic query
198            * @return the matching rows
199            */
200            public <T> java.util.List<T> dynamicQuery(
201                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
202    
203            /**
204            * Performs a dynamic query on the database and returns a range of the matching rows.
205            *
206            * <p>
207            * 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.
208            * </p>
209            *
210            * @param dynamicQuery the dynamic query
211            * @param start the lower bound of the range of model instances
212            * @param end the upper bound of the range of model instances (not inclusive)
213            * @return the range of matching rows
214            */
215            public <T> java.util.List<T> dynamicQuery(
216                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
217                    int end);
218    
219            /**
220            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
221            *
222            * <p>
223            * 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.
224            * </p>
225            *
226            * @param dynamicQuery the dynamic query
227            * @param start the lower bound of the range of model instances
228            * @param end the upper bound of the range of model instances (not inclusive)
229            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
230            * @return the ordered range of matching rows
231            */
232            public <T> java.util.List<T> dynamicQuery(
233                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
234                    int end,
235                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
236    
237            /**
238            * Returns the number of rows matching the dynamic query.
239            *
240            * @param dynamicQuery the dynamic query
241            * @return the number of rows matching the dynamic query
242            */
243            public long dynamicQueryCount(
244                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
245    
246            /**
247            * Returns the number of rows matching the dynamic query.
248            *
249            * @param dynamicQuery the dynamic query
250            * @param projection the projection to apply to the query
251            * @return the number of rows matching the dynamic query
252            */
253            public long dynamicQueryCount(
254                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
255                    com.liferay.portal.kernel.dao.orm.Projection projection);
256    
257            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258            public com.liferay.portlet.messageboards.model.MBMessage fetchMBMessage(
259                    long messageId);
260    
261            /**
262            * Returns the message-boards message matching the UUID and group.
263            *
264            * @param uuid the message-boards message's UUID
265            * @param groupId the primary key of the group
266            * @return the matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
267            */
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public com.liferay.portlet.messageboards.model.MBMessage fetchMBMessageByUuidAndGroupId(
270                    java.lang.String uuid, long groupId);
271    
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
274    
275            /**
276            * Returns the Spring bean ID for this bean.
277            *
278            * @return the Spring bean ID for this bean
279            */
280            public java.lang.String getBeanIdentifier();
281    
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
284                    long groupId, long categoryId, int status, int start, int end);
285    
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
288                    long groupId, long categoryId, int status, int start, int end,
289                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
290    
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public int getCategoryMessagesCount(long groupId, long categoryId,
293                    int status);
294    
295            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
297                    long companyId, int status, int start, int end);
298    
299            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
300            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
301                    long companyId, int status, int start, int end,
302                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
303    
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public int getCompanyMessagesCount(long companyId, int status);
306    
307            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308            public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
309                    long userId, long groupId, java.lang.String className, long classPK,
310                    int status) throws com.liferay.portal.kernel.exception.PortalException;
311    
312            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313            public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
314                    long userId, long groupId, java.lang.String className, long classPK,
315                    int status, java.lang.String threadView)
316                    throws com.liferay.portal.kernel.exception.PortalException;
317    
318            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319            public int getDiscussionMessagesCount(java.lang.String className,
320                    long classPK, int status);
321    
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public int getDiscussionMessagesCount(long classNameId, long classPK,
324                    int status);
325    
326            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
327            public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
328                    java.lang.String className);
329    
330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
331            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
332                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
333    
334            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
335            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
336                    long groupId, int status, int start, int end);
337    
338            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
339            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
340                    long groupId, int status, int start, int end,
341                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
342    
343            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
345                    long groupId, long userId, int status, int start, int end);
346    
347            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
349                    long groupId, long userId, int status, int start, int end,
350                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
351    
352            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353            public int getGroupMessagesCount(long groupId, int status);
354    
355            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
356            public int getGroupMessagesCount(long groupId, long userId, int status);
357    
358            /**
359            * Returns the message-boards message with the primary key.
360            *
361            * @param messageId the primary key of the message-boards message
362            * @return the message-boards message
363            * @throws PortalException if a message-boards message with the primary key could not be found
364            */
365            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
366            public com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
367                    long messageId)
368                    throws com.liferay.portal.kernel.exception.PortalException;
369    
370            /**
371            * Returns the message-boards message matching the UUID and group.
372            *
373            * @param uuid the message-boards message's UUID
374            * @param groupId the primary key of the group
375            * @return the matching message-boards message
376            * @throws PortalException if a matching message-boards message could not be found
377            */
378            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
379            public com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
380                    java.lang.String uuid, long groupId)
381                    throws com.liferay.portal.kernel.exception.PortalException;
382    
383            /**
384            * Returns a range of all the message-boards messages.
385            *
386            * <p>
387            * 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.
388            * </p>
389            *
390            * @param start the lower bound of the range of message-boards messages
391            * @param end the upper bound of the range of message-boards messages (not inclusive)
392            * @return the range of message-boards messages
393            */
394            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
395            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
396                    int start, int end);
397    
398            /**
399            * Returns all the message-boards messages matching the UUID and company.
400            *
401            * @param uuid the UUID of the message-boards messages
402            * @param companyId the primary key of the company
403            * @return the matching message-boards messages, or an empty list if no matches were found
404            */
405            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
406            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
407                    java.lang.String uuid, long companyId);
408    
409            /**
410            * Returns a range of message-boards messages matching the UUID and company.
411            *
412            * @param uuid the UUID of the message-boards messages
413            * @param companyId the primary key of the company
414            * @param start the lower bound of the range of message-boards messages
415            * @param end the upper bound of the range of message-boards messages (not inclusive)
416            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
417            * @return the range of matching message-boards messages, or an empty list if no matches were found
418            */
419            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
420            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessagesByUuidAndCompanyId(
421                    java.lang.String uuid, long companyId, int start, int end,
422                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> orderByComparator);
423    
424            /**
425            * Returns the number of message-boards messages.
426            *
427            * @return the number of message-boards messages
428            */
429            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
430            public int getMBMessagesCount();
431    
432            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
433            public com.liferay.portlet.messageboards.model.MBMessage getMessage(
434                    long messageId)
435                    throws com.liferay.portal.kernel.exception.PortalException;
436    
437            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
438            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
439                    long userId, com.liferay.portlet.messageboards.model.MBMessage message,
440                    int status, java.lang.String threadView, boolean includePrevAndNext)
441                    throws com.liferay.portal.kernel.exception.PortalException;
442    
443            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
444            public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
445                    long userId, long messageId, int status, java.lang.String threadView,
446                    boolean includePrevAndNext)
447                    throws com.liferay.portal.kernel.exception.PortalException;
448    
449            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
450            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
451                    java.lang.String className, long classPK, int status);
452    
453            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
454            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages();
455    
456            @Override
457            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
458            public com.liferay.portal.model.PersistedModel getPersistedModel(
459                    java.io.Serializable primaryKeyObj)
460                    throws com.liferay.portal.kernel.exception.PortalException;
461    
462            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
463            public int getPositionInThread(long messageId)
464                    throws com.liferay.portal.kernel.exception.PortalException;
465    
466            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
467            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
468                    long threadId, int status);
469    
470            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
471            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
472                    long threadId, int status,
473                    java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator);
474    
475            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
476            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
477                    long threadId, int status, int start, int end);
478    
479            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
480            public int getThreadMessagesCount(long threadId, int status);
481    
482            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
483            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
484                    long threadId, int status, int start, int end);
485    
486            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
487            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
488                    long userId, java.lang.String className, long classPK, int status,
489                    int start, int end,
490                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
491    
492            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
493            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
494                    long userId, long classNameId, long classPK, int status, int start,
495                    int end,
496                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
497    
498            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
499            public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getUserDiscussionMessages(
500                    long userId, long[] classNameIds, int status, int start, int end,
501                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBMessage> obc);
502    
503            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
504            public int getUserDiscussionMessagesCount(long userId,
505                    java.lang.String className, long classPK, int status);
506    
507            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
508            public int getUserDiscussionMessagesCount(long userId, long classNameId,
509                    long classPK, int status);
510    
511            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
512            public int getUserDiscussionMessagesCount(long userId, long[] classNameIds,
513                    int status);
514    
515            public long moveMessageAttachmentToTrash(long userId, long messageId,
516                    java.lang.String fileName)
517                    throws com.liferay.portal.kernel.exception.PortalException;
518    
519            public void restoreMessageAttachmentFromTrash(long userId, long messageId,
520                    java.lang.String deletedFileName)
521                    throws com.liferay.portal.kernel.exception.PortalException;
522    
523            /**
524            * Sets the Spring bean ID for this bean.
525            *
526            * @param beanIdentifier the Spring bean ID for this bean
527            */
528            public void setBeanIdentifier(java.lang.String beanIdentifier);
529    
530            public void subscribeMessage(long userId, long messageId)
531                    throws com.liferay.portal.kernel.exception.PortalException;
532    
533            public void unsubscribeMessage(long userId, long messageId)
534                    throws com.liferay.portal.kernel.exception.PortalException;
535    
536            public void updateAnswer(
537                    com.liferay.portlet.messageboards.model.MBMessage message,
538                    boolean answer, boolean cascade)
539                    throws com.liferay.portal.kernel.exception.PortalException;
540    
541            public void updateAnswer(long messageId, boolean answer, boolean cascade)
542                    throws com.liferay.portal.kernel.exception.PortalException;
543    
544            public void updateAsset(long userId,
545                    com.liferay.portlet.messageboards.model.MBMessage message,
546                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
547                    long[] assetLinkEntryIds)
548                    throws com.liferay.portal.kernel.exception.PortalException;
549    
550            public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
551                    long userId, long messageId, java.lang.String className, long classPK,
552                    java.lang.String subject, java.lang.String body,
553                    com.liferay.portal.service.ServiceContext serviceContext)
554                    throws com.liferay.portal.kernel.exception.PortalException;
555    
556            /**
557            * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
558            *
559            * @param mbMessage the message-boards message
560            * @return the message-boards message that was updated
561            */
562            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
563            public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
564                    com.liferay.portlet.messageboards.model.MBMessage mbMessage);
565    
566            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
567                    long messageId, java.lang.String body)
568                    throws com.liferay.portal.kernel.exception.PortalException;
569    
570            public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
571                    long userId, long messageId, java.lang.String subject,
572                    java.lang.String body,
573                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
574                    java.util.List<java.lang.String> existingFiles, double priority,
575                    boolean allowPingbacks,
576                    com.liferay.portal.service.ServiceContext serviceContext)
577                    throws com.liferay.portal.kernel.exception.PortalException;
578    
579            /**
580            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, long,
581            int, ServiceContext, Map)}
582            */
583            @java.lang.Deprecated
584            public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
585                    long userId, long messageId, int status,
586                    com.liferay.portal.service.ServiceContext serviceContext)
587                    throws com.liferay.portal.kernel.exception.PortalException;
588    
589            public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
590                    long userId, long messageId, int status,
591                    com.liferay.portal.service.ServiceContext serviceContext,
592                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
593                    throws com.liferay.portal.kernel.exception.PortalException;
594    
595            public void updateUserName(long userId, java.lang.String userName);
596    }