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.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for MBThread. This utility wraps
024     * {@link com.liferay.portlet.messageboards.service.impl.MBThreadLocalServiceImpl} 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 MBThreadLocalService
032     * @see com.liferay.portlet.messageboards.service.base.MBThreadLocalServiceBaseImpl
033     * @see com.liferay.portlet.messageboards.service.impl.MBThreadLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class MBThreadLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBThreadLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the message boards thread to the database. Also notifies the appropriate model listeners.
046            *
047            * @param mbThread the message boards thread
048            * @return the message boards thread that was added
049            */
050            public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
051                    com.liferay.portlet.messageboards.model.MBThread mbThread) {
052                    return getService().addMBThread(mbThread);
053            }
054    
055            public static com.liferay.portlet.messageboards.model.MBThread addThread(
056                    long categoryId,
057                    com.liferay.portlet.messageboards.model.MBMessage message,
058                    com.liferay.portal.service.ServiceContext serviceContext)
059                    throws com.liferay.portal.kernel.exception.PortalException {
060                    return getService().addThread(categoryId, message, serviceContext);
061            }
062    
063            /**
064            * Creates a new message boards thread with the primary key. Does not add the message boards thread to the database.
065            *
066            * @param threadId the primary key for the new message boards thread
067            * @return the new message boards thread
068            */
069            public static com.liferay.portlet.messageboards.model.MBThread createMBThread(
070                    long threadId) {
071                    return getService().createMBThread(threadId);
072            }
073    
074            /**
075            * Deletes the message boards thread from the database. Also notifies the appropriate model listeners.
076            *
077            * @param mbThread the message boards thread
078            * @return the message boards thread that was removed
079            */
080            public static com.liferay.portlet.messageboards.model.MBThread deleteMBThread(
081                    com.liferay.portlet.messageboards.model.MBThread mbThread) {
082                    return getService().deleteMBThread(mbThread);
083            }
084    
085            /**
086            * Deletes the message boards thread with the primary key from the database. Also notifies the appropriate model listeners.
087            *
088            * @param threadId the primary key of the message boards thread
089            * @return the message boards thread that was removed
090            * @throws PortalException if a message boards thread with the primary key could not be found
091            */
092            public static com.liferay.portlet.messageboards.model.MBThread deleteMBThread(
093                    long threadId)
094                    throws com.liferay.portal.kernel.exception.PortalException {
095                    return getService().deleteMBThread(threadId);
096            }
097    
098            /**
099            * @throws PortalException
100            */
101            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
102                    com.liferay.portal.model.PersistedModel persistedModel)
103                    throws com.liferay.portal.kernel.exception.PortalException {
104                    return getService().deletePersistedModel(persistedModel);
105            }
106    
107            public static void deleteThread(
108                    com.liferay.portlet.messageboards.model.MBThread thread)
109                    throws com.liferay.portal.kernel.exception.PortalException {
110                    getService().deleteThread(thread);
111            }
112    
113            public static void deleteThread(long threadId)
114                    throws com.liferay.portal.kernel.exception.PortalException {
115                    getService().deleteThread(threadId);
116            }
117    
118            public static void deleteThreads(long groupId, long categoryId)
119                    throws com.liferay.portal.kernel.exception.PortalException {
120                    getService().deleteThreads(groupId, categoryId);
121            }
122    
123            public static void deleteThreads(long groupId, long categoryId,
124                    boolean includeTrashedEntries)
125                    throws com.liferay.portal.kernel.exception.PortalException {
126                    getService().deleteThreads(groupId, categoryId, includeTrashedEntries);
127            }
128    
129            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
130                    return getService().dynamicQuery();
131            }
132    
133            /**
134            * Performs a dynamic query on the database and returns the matching rows.
135            *
136            * @param dynamicQuery the dynamic query
137            * @return the matching rows
138            */
139            public static <T> java.util.List<T> dynamicQuery(
140                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
141                    return getService().dynamicQuery(dynamicQuery);
142            }
143    
144            /**
145            * Performs a dynamic query on the database and returns a range of the matching rows.
146            *
147            * <p>
148            * 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.MBThreadModelImpl}. 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.
149            * </p>
150            *
151            * @param dynamicQuery the dynamic query
152            * @param start the lower bound of the range of model instances
153            * @param end the upper bound of the range of model instances (not inclusive)
154            * @return the range of matching rows
155            */
156            public static <T> java.util.List<T> dynamicQuery(
157                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
158                    int end) {
159                    return getService().dynamicQuery(dynamicQuery, start, end);
160            }
161    
162            /**
163            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
164            *
165            * <p>
166            * 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.MBThreadModelImpl}. 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.
167            * </p>
168            *
169            * @param dynamicQuery the dynamic query
170            * @param start the lower bound of the range of model instances
171            * @param end the upper bound of the range of model instances (not inclusive)
172            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
173            * @return the ordered range of matching rows
174            */
175            public static <T> java.util.List<T> dynamicQuery(
176                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
177                    int end,
178                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
179                    return getService()
180                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
181            }
182    
183            /**
184            * Returns the number of rows matching the dynamic query.
185            *
186            * @param dynamicQuery the dynamic query
187            * @return the number of rows matching the dynamic query
188            */
189            public static long dynamicQueryCount(
190                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
191                    return getService().dynamicQueryCount(dynamicQuery);
192            }
193    
194            /**
195            * Returns the number of rows matching the dynamic query.
196            *
197            * @param dynamicQuery the dynamic query
198            * @param projection the projection to apply to the query
199            * @return the number of rows matching the dynamic query
200            */
201            public static long dynamicQueryCount(
202                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
203                    com.liferay.portal.kernel.dao.orm.Projection projection) {
204                    return getService().dynamicQueryCount(dynamicQuery, projection);
205            }
206    
207            public static com.liferay.portlet.messageboards.model.MBThread fetchMBThread(
208                    long threadId) {
209                    return getService().fetchMBThread(threadId);
210            }
211    
212            /**
213            * Returns the message boards thread matching the UUID and group.
214            *
215            * @param uuid the message boards thread's UUID
216            * @param groupId the primary key of the group
217            * @return the matching message boards thread, or <code>null</code> if a matching message boards thread could not be found
218            */
219            public static com.liferay.portlet.messageboards.model.MBThread fetchMBThreadByUuidAndGroupId(
220                    java.lang.String uuid, long groupId) {
221                    return getService().fetchMBThreadByUuidAndGroupId(uuid, groupId);
222            }
223    
224            public static com.liferay.portlet.messageboards.model.MBThread fetchThread(
225                    long threadId) {
226                    return getService().fetchThread(threadId);
227            }
228    
229            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
230                    return getService().getActionableDynamicQuery();
231            }
232    
233            /**
234            * Returns the Spring bean ID for this bean.
235            *
236            * @return the Spring bean ID for this bean
237            */
238            public static java.lang.String getBeanIdentifier() {
239                    return getService().getBeanIdentifier();
240            }
241    
242            public static int getCategoryThreadsCount(long groupId, long categoryId,
243                    int status) {
244                    return getService().getCategoryThreadsCount(groupId, categoryId, status);
245            }
246    
247            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
248                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
249                    return getService().getExportActionableDynamicQuery(portletDataContext);
250            }
251    
252            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
253                    long groupId,
254                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
255                    return getService().getGroupThreads(groupId, queryDefinition);
256            }
257    
258            /**
259            * @deprecated As of 6.2.0, replaced by {@link #getGroupThreads(long,
260            QueryDefinition)}
261            */
262            @Deprecated
263            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
264                    long groupId, int status, int start, int end) {
265                    return getService().getGroupThreads(groupId, status, start, end);
266            }
267    
268            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
269                    long groupId, long userId,
270                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
271                    return getService().getGroupThreads(groupId, userId, queryDefinition);
272            }
273    
274            /**
275            * @deprecated As of 6.2.0, replaced by {@link #getGroupThreads(long, long,
276            QueryDefinition)}
277            */
278            @Deprecated
279            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
280                    long groupId, long userId, int status, int start, int end) {
281                    return getService().getGroupThreads(groupId, userId, status, start, end);
282            }
283    
284            /**
285            * @deprecated As of 6.2.0, replaced by {@link #getGroupThreads(long, long,
286            boolean, boolean, QueryDefinition)}
287            */
288            @Deprecated
289            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
290                    long groupId, long userId, int status, boolean subscribed,
291                    boolean includeAnonymous, int start, int end) {
292                    return getService()
293                                       .getGroupThreads(groupId, userId, status, subscribed,
294                            includeAnonymous, start, end);
295            }
296    
297            /**
298            * @deprecated As of 6.2.0, replaced by {@link #getGroupThreads(long, long,
299            boolean, QueryDefinition)}
300            */
301            @Deprecated
302            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
303                    long groupId, long userId, int status, boolean subscribed, int start,
304                    int end) {
305                    return getService()
306                                       .getGroupThreads(groupId, userId, status, subscribed, start,
307                            end);
308            }
309    
310            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
311                    long groupId, long userId, boolean subscribed,
312                    boolean includeAnonymous,
313                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
314                    return getService()
315                                       .getGroupThreads(groupId, userId, subscribed,
316                            includeAnonymous, queryDefinition);
317            }
318    
319            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
320                    long groupId, long userId, boolean subscribed,
321                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
322                    return getService()
323                                       .getGroupThreads(groupId, userId, subscribed, queryDefinition);
324            }
325    
326            public static int getGroupThreadsCount(long groupId,
327                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
328                    return getService().getGroupThreadsCount(groupId, queryDefinition);
329            }
330    
331            /**
332            * @deprecated As of 6.2.0, replaced by {@link #getGroupThreadsCount(long,
333            QueryDefinition)}
334            */
335            @Deprecated
336            public static int getGroupThreadsCount(long groupId, int status) {
337                    return getService().getGroupThreadsCount(groupId, status);
338            }
339    
340            public static int getGroupThreadsCount(long groupId, long userId,
341                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
342                    return getService()
343                                       .getGroupThreadsCount(groupId, userId, queryDefinition);
344            }
345    
346            /**
347            * @deprecated As of 6.2.0, replaced by {@link #getGroupThreadsCount(long,
348            long, QueryDefinition)}
349            */
350            @Deprecated
351            public static int getGroupThreadsCount(long groupId, long userId, int status) {
352                    return getService().getGroupThreadsCount(groupId, userId, status);
353            }
354    
355            /**
356            * @deprecated As of 6.2.0, replaced by {@link #getGroupThreadsCount(long,
357            long, boolean, QueryDefinition)}
358            */
359            @Deprecated
360            public static int getGroupThreadsCount(long groupId, long userId,
361                    int status, boolean subscribed) {
362                    return getService()
363                                       .getGroupThreadsCount(groupId, userId, status, subscribed);
364            }
365    
366            /**
367            * @deprecated As of 6.2.0, replaced by {@link #getGroupThreadsCount(long,
368            long, boolean, boolean, QueryDefinition)}
369            */
370            @Deprecated
371            public static int getGroupThreadsCount(long groupId, long userId,
372                    int status, boolean subscribed, boolean includeAnonymous) {
373                    return getService()
374                                       .getGroupThreadsCount(groupId, userId, status, subscribed,
375                            includeAnonymous);
376            }
377    
378            public static int getGroupThreadsCount(long groupId, long userId,
379                    boolean subscribed, boolean includeAnonymous,
380                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
381                    return getService()
382                                       .getGroupThreadsCount(groupId, userId, subscribed,
383                            includeAnonymous, queryDefinition);
384            }
385    
386            public static int getGroupThreadsCount(long groupId, long userId,
387                    boolean subscribed,
388                    com.liferay.portal.kernel.dao.orm.QueryDefinition<com.liferay.portlet.messageboards.model.MBThread> queryDefinition) {
389                    return getService()
390                                       .getGroupThreadsCount(groupId, userId, subscribed,
391                            queryDefinition);
392            }
393    
394            /**
395            * Returns the message boards thread with the primary key.
396            *
397            * @param threadId the primary key of the message boards thread
398            * @return the message boards thread
399            * @throws PortalException if a message boards thread with the primary key could not be found
400            */
401            public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
402                    long threadId)
403                    throws com.liferay.portal.kernel.exception.PortalException {
404                    return getService().getMBThread(threadId);
405            }
406    
407            /**
408            * Returns the message boards thread matching the UUID and group.
409            *
410            * @param uuid the message boards thread's UUID
411            * @param groupId the primary key of the group
412            * @return the matching message boards thread
413            * @throws PortalException if a matching message boards thread could not be found
414            */
415            public static com.liferay.portlet.messageboards.model.MBThread getMBThreadByUuidAndGroupId(
416                    java.lang.String uuid, long groupId)
417                    throws com.liferay.portal.kernel.exception.PortalException {
418                    return getService().getMBThreadByUuidAndGroupId(uuid, groupId);
419            }
420    
421            /**
422            * Returns a range of all the message boards threads.
423            *
424            * <p>
425            * 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.MBThreadModelImpl}. 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.
426            * </p>
427            *
428            * @param start the lower bound of the range of message boards threads
429            * @param end the upper bound of the range of message boards threads (not inclusive)
430            * @return the range of message boards threads
431            */
432            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
433                    int start, int end) {
434                    return getService().getMBThreads(start, end);
435            }
436    
437            /**
438            * Returns all the message boards threads matching the UUID and company.
439            *
440            * @param uuid the UUID of the message boards threads
441            * @param companyId the primary key of the company
442            * @return the matching message boards threads, or an empty list if no matches were found
443            */
444            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreadsByUuidAndCompanyId(
445                    java.lang.String uuid, long companyId) {
446                    return getService().getMBThreadsByUuidAndCompanyId(uuid, companyId);
447            }
448    
449            /**
450            * Returns a range of message boards threads matching the UUID and company.
451            *
452            * @param uuid the UUID of the message boards threads
453            * @param companyId the primary key of the company
454            * @param start the lower bound of the range of message boards threads
455            * @param end the upper bound of the range of message boards threads (not inclusive)
456            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
457            * @return the range of matching message boards threads, or an empty list if no matches were found
458            */
459            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreadsByUuidAndCompanyId(
460                    java.lang.String uuid, long companyId, int start, int end,
461                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBThread> orderByComparator) {
462                    return getService()
463                                       .getMBThreadsByUuidAndCompanyId(uuid, companyId, start, end,
464                            orderByComparator);
465            }
466    
467            /**
468            * Returns the number of message boards threads.
469            *
470            * @return the number of message boards threads
471            */
472            public static int getMBThreadsCount() {
473                    return getService().getMBThreadsCount();
474            }
475    
476            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getNoAssetThreads() {
477                    return getService().getNoAssetThreads();
478            }
479    
480            public static com.liferay.portal.model.PersistedModel getPersistedModel(
481                    java.io.Serializable primaryKeyObj)
482                    throws com.liferay.portal.kernel.exception.PortalException {
483                    return getService().getPersistedModel(primaryKeyObj);
484            }
485    
486            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
487                    long categoryId, double priority)
488                    throws com.liferay.portal.kernel.exception.PortalException {
489                    return getService().getPriorityThreads(categoryId, priority);
490            }
491    
492            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
493                    long categoryId, double priority, boolean inherit)
494                    throws com.liferay.portal.kernel.exception.PortalException {
495                    return getService().getPriorityThreads(categoryId, priority, inherit);
496            }
497    
498            public static com.liferay.portlet.messageboards.model.MBThread getThread(
499                    long threadId)
500                    throws com.liferay.portal.kernel.exception.PortalException {
501                    return getService().getThread(threadId);
502            }
503    
504            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
505                    long groupId, long categoryId, int status, int start, int end) {
506                    return getService().getThreads(groupId, categoryId, status, start, end);
507            }
508    
509            public static int getThreadsCount(long groupId, long categoryId, int status) {
510                    return getService().getThreadsCount(groupId, categoryId, status);
511            }
512    
513            public static boolean hasAnswerMessage(long threadId) {
514                    return getService().hasAnswerMessage(threadId);
515            }
516    
517            public static void incrementViewCounter(long threadId, int increment)
518                    throws com.liferay.portal.kernel.exception.PortalException {
519                    getService().incrementViewCounter(threadId, increment);
520            }
521    
522            public static void moveDependentsToTrash(long groupId, long threadId,
523                    long trashEntryId)
524                    throws com.liferay.portal.kernel.exception.PortalException {
525                    getService().moveDependentsToTrash(groupId, threadId, trashEntryId);
526            }
527    
528            public static com.liferay.portlet.messageboards.model.MBThread moveThread(
529                    long groupId, long categoryId, long threadId)
530                    throws com.liferay.portal.kernel.exception.PortalException {
531                    return getService().moveThread(groupId, categoryId, threadId);
532            }
533    
534            public static com.liferay.portlet.messageboards.model.MBThread moveThreadFromTrash(
535                    long userId, long categoryId, long threadId)
536                    throws com.liferay.portal.kernel.exception.PortalException {
537                    return getService().moveThreadFromTrash(userId, categoryId, threadId);
538            }
539    
540            public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
541                    long userId, com.liferay.portlet.messageboards.model.MBThread thread)
542                    throws com.liferay.portal.kernel.exception.PortalException {
543                    return getService().moveThreadToTrash(userId, thread);
544            }
545    
546            public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
547                    long userId, long threadId)
548                    throws com.liferay.portal.kernel.exception.PortalException {
549                    return getService().moveThreadToTrash(userId, threadId);
550            }
551    
552            public static void moveThreadsToTrash(long groupId, long userId)
553                    throws com.liferay.portal.kernel.exception.PortalException {
554                    getService().moveThreadsToTrash(groupId, userId);
555            }
556    
557            public static void restoreDependentsFromTrash(long groupId, long threadId)
558                    throws com.liferay.portal.kernel.exception.PortalException {
559                    getService().restoreDependentsFromTrash(groupId, threadId);
560            }
561    
562            /**
563            * @deprecated As of 7.0.0, replaced by {@link
564            #restoreDependentsFromTrash(long, long)}
565            */
566            @Deprecated
567            public static void restoreDependentsFromTrash(long groupId, long threadId,
568                    long trashEntryId)
569                    throws com.liferay.portal.kernel.exception.PortalException {
570                    getService().restoreDependentsFromTrash(groupId, threadId, trashEntryId);
571            }
572    
573            public static void restoreThreadFromTrash(long userId, long threadId)
574                    throws com.liferay.portal.kernel.exception.PortalException {
575                    getService().restoreThreadFromTrash(userId, threadId);
576            }
577    
578            public static com.liferay.portal.kernel.search.Hits search(long groupId,
579                    long userId, long creatorUserId, long startDate, long endDate,
580                    int status, int start, int end)
581                    throws com.liferay.portal.kernel.exception.PortalException {
582                    return getService()
583                                       .search(groupId, userId, creatorUserId, startDate, endDate,
584                            status, start, end);
585            }
586    
587            public static com.liferay.portal.kernel.search.Hits search(long groupId,
588                    long userId, long creatorUserId, int status, int start, int end)
589                    throws com.liferay.portal.kernel.exception.PortalException {
590                    return getService()
591                                       .search(groupId, userId, creatorUserId, status, start, end);
592            }
593    
594            /**
595            * Sets the Spring bean ID for this bean.
596            *
597            * @param beanIdentifier the Spring bean ID for this bean
598            */
599            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
600                    getService().setBeanIdentifier(beanIdentifier);
601            }
602    
603            public static com.liferay.portlet.messageboards.model.MBThread splitThread(
604                    long messageId, java.lang.String subject,
605                    com.liferay.portal.service.ServiceContext serviceContext)
606                    throws com.liferay.portal.kernel.exception.PortalException {
607                    return getService().splitThread(messageId, subject, serviceContext);
608            }
609    
610            /**
611            * Updates the message boards thread in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
612            *
613            * @param mbThread the message boards thread
614            * @return the message boards thread that was updated
615            */
616            public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
617                    com.liferay.portlet.messageboards.model.MBThread mbThread) {
618                    return getService().updateMBThread(mbThread);
619            }
620    
621            public static void updateQuestion(long threadId, boolean question)
622                    throws com.liferay.portal.kernel.exception.PortalException {
623                    getService().updateQuestion(threadId, question);
624            }
625    
626            public static com.liferay.portlet.messageboards.model.MBThread updateStatus(
627                    long userId, long threadId, int status)
628                    throws com.liferay.portal.kernel.exception.PortalException {
629                    return getService().updateStatus(userId, threadId, status);
630            }
631    
632            /**
633            * @deprecated As of 6.2.0, replaced by {@link #incrementViewCounter(long,
634            int)}
635            */
636            @Deprecated
637            public static com.liferay.portlet.messageboards.model.MBThread updateThread(
638                    long threadId, int viewCount)
639                    throws com.liferay.portal.kernel.exception.PortalException {
640                    return getService().updateThread(threadId, viewCount);
641            }
642    
643            public static MBThreadLocalService getService() {
644                    if (_service == null) {
645                            _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
646    
647                            ReferenceRegistry.registerReference(MBThreadLocalServiceUtil.class,
648                                    "_service");
649                    }
650    
651                    return _service;
652            }
653    
654            /**
655             * @deprecated As of 6.2.0
656             */
657            @Deprecated
658            public void setService(MBThreadLocalService service) {
659            }
660    
661            private static MBThreadLocalService _service;
662    }