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