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