1
22
23 package com.liferay.portlet.messageboards.service;
24
25
26
53 public class MBThreadLocalServiceUtil {
54 public static com.liferay.portlet.messageboards.model.MBThread addMBThread(
55 com.liferay.portlet.messageboards.model.MBThread mbThread)
56 throws com.liferay.portal.SystemException {
57 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
58
59 return mbThreadLocalService.addMBThread(mbThread);
60 }
61
62 public static void deleteMBThread(long threadId)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException {
65 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
66
67 mbThreadLocalService.deleteMBThread(threadId);
68 }
69
70 public static void deleteMBThread(
71 com.liferay.portlet.messageboards.model.MBThread mbThread)
72 throws com.liferay.portal.SystemException {
73 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
74
75 mbThreadLocalService.deleteMBThread(mbThread);
76 }
77
78 public static java.util.List<Object> dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
80 throws com.liferay.portal.SystemException {
81 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
82
83 return mbThreadLocalService.dynamicQuery(dynamicQuery);
84 }
85
86 public static java.util.List<Object> dynamicQuery(
87 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
88 int end) throws com.liferay.portal.SystemException {
89 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
90
91 return mbThreadLocalService.dynamicQuery(dynamicQuery, start, end);
92 }
93
94 public static com.liferay.portlet.messageboards.model.MBThread getMBThread(
95 long threadId)
96 throws com.liferay.portal.PortalException,
97 com.liferay.portal.SystemException {
98 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
99
100 return mbThreadLocalService.getMBThread(threadId);
101 }
102
103 public static com.liferay.portlet.messageboards.model.MBThread updateMBThread(
104 com.liferay.portlet.messageboards.model.MBThread mbThread)
105 throws com.liferay.portal.SystemException {
106 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
107
108 return mbThreadLocalService.updateMBThread(mbThread);
109 }
110
111 public static void deleteThread(long threadId)
112 throws com.liferay.portal.PortalException,
113 com.liferay.portal.SystemException {
114 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
115
116 mbThreadLocalService.deleteThread(threadId);
117 }
118
119 public static void deleteThread(
120 com.liferay.portlet.messageboards.model.MBThread thread)
121 throws com.liferay.portal.PortalException,
122 com.liferay.portal.SystemException {
123 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
124
125 mbThreadLocalService.deleteThread(thread);
126 }
127
128 public static void deleteThreads(long categoryId)
129 throws com.liferay.portal.PortalException,
130 com.liferay.portal.SystemException {
131 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
132
133 mbThreadLocalService.deleteThreads(categoryId);
134 }
135
136 public static int getCategoriesThreadsCount(
137 java.util.List<Long> categoryIds)
138 throws com.liferay.portal.SystemException {
139 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
140
141 return mbThreadLocalService.getCategoriesThreadsCount(categoryIds);
142 }
143
144 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
145 long groupId, int start, int end)
146 throws com.liferay.portal.SystemException {
147 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
148
149 return mbThreadLocalService.getGroupThreads(groupId, start, end);
150 }
151
152 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
153 long groupId, long userId, int start, int end)
154 throws com.liferay.portal.SystemException {
155 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
156
157 return mbThreadLocalService.getGroupThreads(groupId, userId, start, end);
158 }
159
160 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
161 long groupId, long userId, boolean subscribed, int start, int end)
162 throws com.liferay.portal.SystemException {
163 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
164
165 return mbThreadLocalService.getGroupThreads(groupId, userId,
166 subscribed, start, end);
167 }
168
169 public static int getGroupThreadsCount(long groupId)
170 throws com.liferay.portal.SystemException {
171 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
172
173 return mbThreadLocalService.getGroupThreadsCount(groupId);
174 }
175
176 public static int getGroupThreadsCount(long groupId, long userId)
177 throws com.liferay.portal.SystemException {
178 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
179
180 return mbThreadLocalService.getGroupThreadsCount(groupId, userId);
181 }
182
183 public static int getGroupThreadsCount(long groupId, long userId,
184 boolean subscribed) throws com.liferay.portal.SystemException {
185 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
186
187 return mbThreadLocalService.getGroupThreadsCount(groupId, userId,
188 subscribed);
189 }
190
191 public static com.liferay.portlet.messageboards.model.MBThread getThread(
192 long threadId)
193 throws com.liferay.portal.PortalException,
194 com.liferay.portal.SystemException {
195 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
196
197 return mbThreadLocalService.getThread(threadId);
198 }
199
200 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
201 long categoryId, int start, int end)
202 throws com.liferay.portal.SystemException {
203 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
204
205 return mbThreadLocalService.getThreads(categoryId, start, end);
206 }
207
208 public static int getThreadsCount(long categoryId)
209 throws com.liferay.portal.SystemException {
210 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
211
212 return mbThreadLocalService.getThreadsCount(categoryId);
213 }
214
215 public static boolean hasReadThread(long userId, long threadId)
216 throws com.liferay.portal.PortalException,
217 com.liferay.portal.SystemException {
218 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
219
220 return mbThreadLocalService.hasReadThread(userId, threadId);
221 }
222
223 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
224 long categoryId, long threadId)
225 throws com.liferay.portal.PortalException,
226 com.liferay.portal.SystemException {
227 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
228
229 return mbThreadLocalService.moveThread(categoryId, threadId);
230 }
231
232 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
233 long messageId, javax.portlet.PortletPreferences prefs,
234 com.liferay.portal.theme.ThemeDisplay themeDisplay)
235 throws com.liferay.portal.PortalException,
236 com.liferay.portal.SystemException {
237 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
238
239 return mbThreadLocalService.splitThread(messageId, prefs, themeDisplay);
240 }
241
242 public static com.liferay.portlet.messageboards.model.MBThread updateThread(
243 long threadId, int viewCount)
244 throws com.liferay.portal.PortalException,
245 com.liferay.portal.SystemException {
246 MBThreadLocalService mbThreadLocalService = MBThreadLocalServiceFactory.getService();
247
248 return mbThreadLocalService.updateThread(threadId, viewCount);
249 }
250 }