001    /**
002     * Copyright (c) 2000-2010 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link MBThreadLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       MBThreadLocalService
030     * @generated
031     */
032    public class MBThreadLocalServiceUtil {
033            public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
034                    com.liferay.portlet.messageboards.model.MBThread mbThread)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addMBThread(mbThread);
037            }
038    
039            public static com.liferay.portlet.messageboards.model.MBThread createMBThread(
040                    long threadId) {
041                    return getService().createMBThread(threadId);
042            }
043    
044            public static void deleteMBThread(long threadId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteMBThread(threadId);
048            }
049    
050            public static void deleteMBThread(
051                    com.liferay.portlet.messageboards.model.MBThread mbThread)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteMBThread(mbThread);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
087                    long threadId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getMBThread(threadId);
091            }
092    
093            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
094                    int start, int end)
095                    throws com.liferay.portal.kernel.exception.SystemException {
096                    return getService().getMBThreads(start, end);
097            }
098    
099            public static int getMBThreadsCount()
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().getMBThreadsCount();
102            }
103    
104            public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
105                    com.liferay.portlet.messageboards.model.MBThread mbThread)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().updateMBThread(mbThread);
108            }
109    
110            public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
111                    com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getService().updateMBThread(mbThread, merge);
114            }
115    
116            public static void deleteThread(long threadId)
117                    throws com.liferay.portal.kernel.exception.PortalException,
118                            com.liferay.portal.kernel.exception.SystemException {
119                    getService().deleteThread(threadId);
120            }
121    
122            public static void deleteThread(
123                    com.liferay.portlet.messageboards.model.MBThread thread)
124                    throws com.liferay.portal.kernel.exception.PortalException,
125                            com.liferay.portal.kernel.exception.SystemException {
126                    getService().deleteThread(thread);
127            }
128    
129            public static void deleteThreads(long groupId, long categoryId)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException {
132                    getService().deleteThreads(groupId, categoryId);
133            }
134    
135            public static int getCategoryThreadsCount(long groupId, long categoryId,
136                    int status) throws com.liferay.portal.kernel.exception.SystemException {
137                    return getService().getCategoryThreadsCount(groupId, categoryId, status);
138            }
139    
140            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
141                    long groupId, int status, int start, int end)
142                    throws com.liferay.portal.kernel.exception.SystemException {
143                    return getService().getGroupThreads(groupId, status, start, end);
144            }
145    
146            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
147                    long groupId, long userId, int status, boolean subscribed,
148                    boolean includeAnonymous, int start, int end)
149                    throws com.liferay.portal.kernel.exception.PortalException,
150                            com.liferay.portal.kernel.exception.SystemException {
151                    return getService()
152                                       .getGroupThreads(groupId, userId, status, subscribed,
153                            includeAnonymous, start, end);
154            }
155    
156            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
157                    long groupId, long userId, int status, boolean subscribed, int start,
158                    int end)
159                    throws com.liferay.portal.kernel.exception.PortalException,
160                            com.liferay.portal.kernel.exception.SystemException {
161                    return getService()
162                                       .getGroupThreads(groupId, userId, status, subscribed, start,
163                            end);
164            }
165    
166            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
167                    long groupId, long userId, int status, int start, int end)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getService().getGroupThreads(groupId, userId, status, start, end);
171            }
172    
173            public static int getGroupThreadsCount(long groupId, int status)
174                    throws com.liferay.portal.kernel.exception.SystemException {
175                    return getService().getGroupThreadsCount(groupId, status);
176            }
177    
178            public static int getGroupThreadsCount(long groupId, long userId, int status)
179                    throws com.liferay.portal.kernel.exception.SystemException {
180                    return getService().getGroupThreadsCount(groupId, userId, status);
181            }
182    
183            public static int getGroupThreadsCount(long groupId, long userId,
184                    int status, boolean subscribed)
185                    throws com.liferay.portal.kernel.exception.SystemException {
186                    return getService()
187                                       .getGroupThreadsCount(groupId, userId, status, subscribed);
188            }
189    
190            public static int getGroupThreadsCount(long groupId, long userId,
191                    int status, boolean subscribed, boolean includeAnonymous)
192                    throws com.liferay.portal.kernel.exception.SystemException {
193                    return getService()
194                                       .getGroupThreadsCount(groupId, userId, status, subscribed,
195                            includeAnonymous);
196            }
197    
198            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
199                    long categoryId, double priority)
200                    throws com.liferay.portal.kernel.exception.PortalException,
201                            com.liferay.portal.kernel.exception.SystemException {
202                    return getService().getPriorityThreads(categoryId, priority);
203            }
204    
205            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
206                    long categoryId, double priority, boolean inherit)
207                    throws com.liferay.portal.kernel.exception.PortalException,
208                            com.liferay.portal.kernel.exception.SystemException {
209                    return getService().getPriorityThreads(categoryId, priority, inherit);
210            }
211    
212            public static com.liferay.portlet.messageboards.model.MBThread getThread(
213                    long threadId)
214                    throws com.liferay.portal.kernel.exception.PortalException,
215                            com.liferay.portal.kernel.exception.SystemException {
216                    return getService().getThread(threadId);
217            }
218    
219            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
220                    long groupId, long categoryId, int status, int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getService().getThreads(groupId, categoryId, status, start, end);
223            }
224    
225            public static int getThreadsCount(long groupId, long categoryId, int status)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getService().getThreadsCount(groupId, categoryId, status);
228            }
229    
230            public static com.liferay.portlet.messageboards.model.MBThread moveThread(
231                    long groupId, long categoryId, long threadId)
232                    throws com.liferay.portal.kernel.exception.PortalException,
233                            com.liferay.portal.kernel.exception.SystemException {
234                    return getService().moveThread(groupId, categoryId, threadId);
235            }
236    
237            public static com.liferay.portlet.messageboards.model.MBThread splitThread(
238                    long messageId, com.liferay.portal.service.ServiceContext serviceContext)
239                    throws com.liferay.portal.kernel.exception.PortalException,
240                            com.liferay.portal.kernel.exception.SystemException {
241                    return getService().splitThread(messageId, serviceContext);
242            }
243    
244            public static com.liferay.portlet.messageboards.model.MBThread updateThread(
245                    long threadId, int viewCount)
246                    throws com.liferay.portal.kernel.exception.PortalException,
247                            com.liferay.portal.kernel.exception.SystemException {
248                    return getService().updateThread(threadId, viewCount);
249            }
250    
251            public static MBThreadLocalService getService() {
252                    if (_service == null) {
253                            _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
254                    }
255    
256                    return _service;
257            }
258    
259            public void setService(MBThreadLocalService service) {
260                    _service = service;
261            }
262    
263            private static MBThreadLocalService _service;
264    }