1
22
23 package com.liferay.portlet.messageboards.service.persistence;
24
25 import com.liferay.portal.SystemException;
26 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28
29 import com.liferay.portlet.messageboards.model.MBThread;
30
31 import java.util.List;
32
33
46 public class MBThreadUtil {
47
50 public static void clearCache() {
51 getPersistence().clearCache();
52 }
53
54
57 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
58 throws SystemException {
59 return getPersistence().findWithDynamicQuery(dynamicQuery);
60 }
61
62
65 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
66 int start, int end) throws SystemException {
67 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
68 }
69
70
73 public static MBThread remove(MBThread mbThread) throws SystemException {
74 return getPersistence().remove(mbThread);
75 }
76
77
80 public static MBThread update(MBThread mbThread, boolean merge)
81 throws SystemException {
82 return getPersistence().update(mbThread, merge);
83 }
84
85 public static void cacheResult(
86 com.liferay.portlet.messageboards.model.MBThread mbThread) {
87 getPersistence().cacheResult(mbThread);
88 }
89
90 public static void cacheResult(
91 java.util.List<com.liferay.portlet.messageboards.model.MBThread> mbThreads) {
92 getPersistence().cacheResult(mbThreads);
93 }
94
95 public static com.liferay.portlet.messageboards.model.MBThread create(
96 long threadId) {
97 return getPersistence().create(threadId);
98 }
99
100 public static com.liferay.portlet.messageboards.model.MBThread remove(
101 long threadId)
102 throws com.liferay.portal.SystemException,
103 com.liferay.portlet.messageboards.NoSuchThreadException {
104 return getPersistence().remove(threadId);
105 }
106
107
110 public static com.liferay.portlet.messageboards.model.MBThread update(
111 com.liferay.portlet.messageboards.model.MBThread mbThread)
112 throws com.liferay.portal.SystemException {
113 return getPersistence().update(mbThread);
114 }
115
116 public static com.liferay.portlet.messageboards.model.MBThread updateImpl(
117 com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
118 throws com.liferay.portal.SystemException {
119 return getPersistence().updateImpl(mbThread, merge);
120 }
121
122 public static com.liferay.portlet.messageboards.model.MBThread findByPrimaryKey(
123 long threadId)
124 throws com.liferay.portal.SystemException,
125 com.liferay.portlet.messageboards.NoSuchThreadException {
126 return getPersistence().findByPrimaryKey(threadId);
127 }
128
129 public static com.liferay.portlet.messageboards.model.MBThread fetchByPrimaryKey(
130 long threadId) throws com.liferay.portal.SystemException {
131 return getPersistence().fetchByPrimaryKey(threadId);
132 }
133
134 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByGroupId(
135 long groupId) throws com.liferay.portal.SystemException {
136 return getPersistence().findByGroupId(groupId);
137 }
138
139 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByGroupId(
140 long groupId, int start, int end)
141 throws com.liferay.portal.SystemException {
142 return getPersistence().findByGroupId(groupId, start, end);
143 }
144
145 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByGroupId(
146 long groupId, int start, int end,
147 com.liferay.portal.kernel.util.OrderByComparator obc)
148 throws com.liferay.portal.SystemException {
149 return getPersistence().findByGroupId(groupId, start, end, obc);
150 }
151
152 public static com.liferay.portlet.messageboards.model.MBThread findByGroupId_First(
153 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
154 throws com.liferay.portal.SystemException,
155 com.liferay.portlet.messageboards.NoSuchThreadException {
156 return getPersistence().findByGroupId_First(groupId, obc);
157 }
158
159 public static com.liferay.portlet.messageboards.model.MBThread findByGroupId_Last(
160 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
161 throws com.liferay.portal.SystemException,
162 com.liferay.portlet.messageboards.NoSuchThreadException {
163 return getPersistence().findByGroupId_Last(groupId, obc);
164 }
165
166 public static com.liferay.portlet.messageboards.model.MBThread[] findByGroupId_PrevAndNext(
167 long threadId, long groupId,
168 com.liferay.portal.kernel.util.OrderByComparator obc)
169 throws com.liferay.portal.SystemException,
170 com.liferay.portlet.messageboards.NoSuchThreadException {
171 return getPersistence().findByGroupId_PrevAndNext(threadId, groupId, obc);
172 }
173
174 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByCategoryId(
175 long categoryId) throws com.liferay.portal.SystemException {
176 return getPersistence().findByCategoryId(categoryId);
177 }
178
179 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByCategoryId(
180 long categoryId, int start, int end)
181 throws com.liferay.portal.SystemException {
182 return getPersistence().findByCategoryId(categoryId, start, end);
183 }
184
185 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByCategoryId(
186 long categoryId, int start, int end,
187 com.liferay.portal.kernel.util.OrderByComparator obc)
188 throws com.liferay.portal.SystemException {
189 return getPersistence().findByCategoryId(categoryId, start, end, obc);
190 }
191
192 public static com.liferay.portlet.messageboards.model.MBThread findByCategoryId_First(
193 long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
194 throws com.liferay.portal.SystemException,
195 com.liferay.portlet.messageboards.NoSuchThreadException {
196 return getPersistence().findByCategoryId_First(categoryId, obc);
197 }
198
199 public static com.liferay.portlet.messageboards.model.MBThread findByCategoryId_Last(
200 long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
201 throws com.liferay.portal.SystemException,
202 com.liferay.portlet.messageboards.NoSuchThreadException {
203 return getPersistence().findByCategoryId_Last(categoryId, obc);
204 }
205
206 public static com.liferay.portlet.messageboards.model.MBThread[] findByCategoryId_PrevAndNext(
207 long threadId, long categoryId,
208 com.liferay.portal.kernel.util.OrderByComparator obc)
209 throws com.liferay.portal.SystemException,
210 com.liferay.portlet.messageboards.NoSuchThreadException {
211 return getPersistence()
212 .findByCategoryId_PrevAndNext(threadId, categoryId, obc);
213 }
214
215 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_L(
216 long categoryId, java.util.Date lastPostDate)
217 throws com.liferay.portal.SystemException {
218 return getPersistence().findByC_L(categoryId, lastPostDate);
219 }
220
221 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_L(
222 long categoryId, java.util.Date lastPostDate, int start, int end)
223 throws com.liferay.portal.SystemException {
224 return getPersistence().findByC_L(categoryId, lastPostDate, start, end);
225 }
226
227 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_L(
228 long categoryId, java.util.Date lastPostDate, int start, int end,
229 com.liferay.portal.kernel.util.OrderByComparator obc)
230 throws com.liferay.portal.SystemException {
231 return getPersistence()
232 .findByC_L(categoryId, lastPostDate, start, end, obc);
233 }
234
235 public static com.liferay.portlet.messageboards.model.MBThread findByC_L_First(
236 long categoryId, java.util.Date lastPostDate,
237 com.liferay.portal.kernel.util.OrderByComparator obc)
238 throws com.liferay.portal.SystemException,
239 com.liferay.portlet.messageboards.NoSuchThreadException {
240 return getPersistence().findByC_L_First(categoryId, lastPostDate, obc);
241 }
242
243 public static com.liferay.portlet.messageboards.model.MBThread findByC_L_Last(
244 long categoryId, java.util.Date lastPostDate,
245 com.liferay.portal.kernel.util.OrderByComparator obc)
246 throws com.liferay.portal.SystemException,
247 com.liferay.portlet.messageboards.NoSuchThreadException {
248 return getPersistence().findByC_L_Last(categoryId, lastPostDate, obc);
249 }
250
251 public static com.liferay.portlet.messageboards.model.MBThread[] findByC_L_PrevAndNext(
252 long threadId, long categoryId, java.util.Date lastPostDate,
253 com.liferay.portal.kernel.util.OrderByComparator obc)
254 throws com.liferay.portal.SystemException,
255 com.liferay.portlet.messageboards.NoSuchThreadException {
256 return getPersistence()
257 .findByC_L_PrevAndNext(threadId, categoryId, lastPostDate,
258 obc);
259 }
260
261 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findAll()
262 throws com.liferay.portal.SystemException {
263 return getPersistence().findAll();
264 }
265
266 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findAll(
267 int start, int end) throws com.liferay.portal.SystemException {
268 return getPersistence().findAll(start, end);
269 }
270
271 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findAll(
272 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
273 throws com.liferay.portal.SystemException {
274 return getPersistence().findAll(start, end, obc);
275 }
276
277 public static void removeByGroupId(long groupId)
278 throws com.liferay.portal.SystemException {
279 getPersistence().removeByGroupId(groupId);
280 }
281
282 public static void removeByCategoryId(long categoryId)
283 throws com.liferay.portal.SystemException {
284 getPersistence().removeByCategoryId(categoryId);
285 }
286
287 public static void removeByC_L(long categoryId, java.util.Date lastPostDate)
288 throws com.liferay.portal.SystemException {
289 getPersistence().removeByC_L(categoryId, lastPostDate);
290 }
291
292 public static void removeAll() throws com.liferay.portal.SystemException {
293 getPersistence().removeAll();
294 }
295
296 public static int countByGroupId(long groupId)
297 throws com.liferay.portal.SystemException {
298 return getPersistence().countByGroupId(groupId);
299 }
300
301 public static int countByCategoryId(long categoryId)
302 throws com.liferay.portal.SystemException {
303 return getPersistence().countByCategoryId(categoryId);
304 }
305
306 public static int countByC_L(long categoryId, java.util.Date lastPostDate)
307 throws com.liferay.portal.SystemException {
308 return getPersistence().countByC_L(categoryId, lastPostDate);
309 }
310
311 public static int countAll() throws com.liferay.portal.SystemException {
312 return getPersistence().countAll();
313 }
314
315 public static MBThreadPersistence getPersistence() {
316 if (_persistence == null) {
317 _persistence = (MBThreadPersistence)PortalBeanLocatorUtil.locate(MBThreadPersistence.class.getName());
318 }
319
320 return _persistence;
321 }
322
323 public void setPersistence(MBThreadPersistence persistence) {
324 _persistence = persistence;
325 }
326
327 private static MBThreadPersistence _persistence;
328 }