1
14
15 package com.liferay.portlet.messageboards.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class MBThreadLocalServiceUtil {
40 public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
41 com.liferay.portlet.messageboards.model.MBThread mbThread)
42 throws com.liferay.portal.kernel.exception.SystemException {
43 return getService().addMBThread(mbThread);
44 }
45
46 public static com.liferay.portlet.messageboards.model.MBThread createMBThread(
47 long threadId) {
48 return getService().createMBThread(threadId);
49 }
50
51 public static void deleteMBThread(long threadId)
52 throws com.liferay.portal.kernel.exception.PortalException,
53 com.liferay.portal.kernel.exception.SystemException {
54 getService().deleteMBThread(threadId);
55 }
56
57 public static void deleteMBThread(
58 com.liferay.portlet.messageboards.model.MBThread mbThread)
59 throws com.liferay.portal.kernel.exception.SystemException {
60 getService().deleteMBThread(mbThread);
61 }
62
63 @SuppressWarnings("unchecked")
64 public static java.util.List dynamicQuery(
65 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66 throws com.liferay.portal.kernel.exception.SystemException {
67 return getService().dynamicQuery(dynamicQuery);
68 }
69
70 @SuppressWarnings("unchecked")
71 public static java.util.List dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73 int end) throws com.liferay.portal.kernel.exception.SystemException {
74 return getService().dynamicQuery(dynamicQuery, start, end);
75 }
76
77 @SuppressWarnings("unchecked")
78 public static java.util.List dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80 int end,
81 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82 throws com.liferay.portal.kernel.exception.SystemException {
83 return getService()
84 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85 }
86
87 public static long dynamicQueryCount(
88 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89 throws com.liferay.portal.kernel.exception.SystemException {
90 return getService().dynamicQueryCount(dynamicQuery);
91 }
92
93 public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
94 long threadId)
95 throws com.liferay.portal.kernel.exception.PortalException,
96 com.liferay.portal.kernel.exception.SystemException {
97 return getService().getMBThread(threadId);
98 }
99
100 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
101 int start, int end)
102 throws com.liferay.portal.kernel.exception.SystemException {
103 return getService().getMBThreads(start, end);
104 }
105
106 public static int getMBThreadsCount()
107 throws com.liferay.portal.kernel.exception.SystemException {
108 return getService().getMBThreadsCount();
109 }
110
111 public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
112 com.liferay.portlet.messageboards.model.MBThread mbThread)
113 throws com.liferay.portal.kernel.exception.SystemException {
114 return getService().updateMBThread(mbThread);
115 }
116
117 public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
118 com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
119 throws com.liferay.portal.kernel.exception.SystemException {
120 return getService().updateMBThread(mbThread, merge);
121 }
122
123 public static void deleteThread(long threadId)
124 throws com.liferay.portal.kernel.exception.PortalException,
125 com.liferay.portal.kernel.exception.SystemException {
126 getService().deleteThread(threadId);
127 }
128
129 public static void deleteThread(
130 com.liferay.portlet.messageboards.model.MBThread thread)
131 throws com.liferay.portal.kernel.exception.PortalException,
132 com.liferay.portal.kernel.exception.SystemException {
133 getService().deleteThread(thread);
134 }
135
136 public static void deleteThreads(long groupId, long categoryId)
137 throws com.liferay.portal.kernel.exception.PortalException,
138 com.liferay.portal.kernel.exception.SystemException {
139 getService().deleteThreads(groupId, categoryId);
140 }
141
142 public static int getCategoryThreadsCount(long groupId, long categoryId,
143 int status) throws com.liferay.portal.kernel.exception.SystemException {
144 return getService().getCategoryThreadsCount(groupId, categoryId, status);
145 }
146
147 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
148 long groupId, int status, int start, int end)
149 throws com.liferay.portal.kernel.exception.SystemException {
150 return getService().getGroupThreads(groupId, status, start, end);
151 }
152
153 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
154 long groupId, long userId, int status, int start, int end)
155 throws com.liferay.portal.kernel.exception.PortalException,
156 com.liferay.portal.kernel.exception.SystemException {
157 return getService().getGroupThreads(groupId, userId, status, start, end);
158 }
159
160 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
161 long groupId, long userId, int status, boolean subscribed, int start,
162 int end)
163 throws com.liferay.portal.kernel.exception.PortalException,
164 com.liferay.portal.kernel.exception.SystemException {
165 return getService()
166 .getGroupThreads(groupId, userId, status, subscribed, start,
167 end);
168 }
169
170 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
171 long groupId, long userId, int status, boolean subscribed,
172 boolean includeAnonymous, int start, int end)
173 throws com.liferay.portal.kernel.exception.PortalException,
174 com.liferay.portal.kernel.exception.SystemException {
175 return getService()
176 .getGroupThreads(groupId, userId, status, subscribed,
177 includeAnonymous, start, end);
178 }
179
180 public static int getGroupThreadsCount(long groupId, int status)
181 throws com.liferay.portal.kernel.exception.SystemException {
182 return getService().getGroupThreadsCount(groupId, status);
183 }
184
185 public static int getGroupThreadsCount(long groupId, long userId, int status)
186 throws com.liferay.portal.kernel.exception.SystemException {
187 return getService().getGroupThreadsCount(groupId, userId, status);
188 }
189
190 public static int getGroupThreadsCount(long groupId, long userId,
191 int status, boolean subscribed)
192 throws com.liferay.portal.kernel.exception.SystemException {
193 return getService()
194 .getGroupThreadsCount(groupId, userId, status, subscribed);
195 }
196
197 public static int getGroupThreadsCount(long groupId, long userId,
198 int status, boolean subscribed, boolean includeAnonymous)
199 throws com.liferay.portal.kernel.exception.SystemException {
200 return getService()
201 .getGroupThreadsCount(groupId, userId, status, subscribed,
202 includeAnonymous);
203 }
204
205 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
206 long categoryId, double priority)
207 throws com.liferay.portal.kernel.exception.PortalException,
208 com.liferay.portal.kernel.exception.SystemException {
209 return getService().getPriorityThreads(categoryId, priority);
210 }
211
212 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getPriorityThreads(
213 long categoryId, double priority, boolean inherit)
214 throws com.liferay.portal.kernel.exception.PortalException,
215 com.liferay.portal.kernel.exception.SystemException {
216 return getService().getPriorityThreads(categoryId, priority, inherit);
217 }
218
219 public static com.liferay.portlet.messageboards.model.MBThread getThread(
220 long threadId)
221 throws com.liferay.portal.kernel.exception.PortalException,
222 com.liferay.portal.kernel.exception.SystemException {
223 return getService().getThread(threadId);
224 }
225
226 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
227 long groupId, long categoryId, int status, int start, int end)
228 throws com.liferay.portal.kernel.exception.SystemException {
229 return getService().getThreads(groupId, categoryId, status, start, end);
230 }
231
232 public static int getThreadsCount(long groupId, long categoryId, int status)
233 throws com.liferay.portal.kernel.exception.SystemException {
234 return getService().getThreadsCount(groupId, categoryId, status);
235 }
236
237 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
238 long groupId, long categoryId, long threadId)
239 throws com.liferay.portal.kernel.exception.PortalException,
240 com.liferay.portal.kernel.exception.SystemException {
241 return getService().moveThread(groupId, categoryId, threadId);
242 }
243
244 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
245 long messageId, com.liferay.portal.service.ServiceContext serviceContext)
246 throws com.liferay.portal.kernel.exception.PortalException,
247 com.liferay.portal.kernel.exception.SystemException {
248 return getService().splitThread(messageId, serviceContext);
249 }
250
251 public static com.liferay.portlet.messageboards.model.MBThread updateThread(
252 long threadId, int viewCount)
253 throws com.liferay.portal.kernel.exception.PortalException,
254 com.liferay.portal.kernel.exception.SystemException {
255 return getService().updateThread(threadId, viewCount);
256 }
257
258 public static MBThreadLocalService getService() {
259 if (_service == null) {
260 _service = (MBThreadLocalService)PortalBeanLocatorUtil.locate(MBThreadLocalService.class.getName());
261 }
262
263 return _service;
264 }
265
266 public void setService(MBThreadLocalService service) {
267 _service = service;
268 }
269
270 private static MBThreadLocalService _service;
271 }