001
014
015 package com.liferay.portlet.messageboards.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.kernel.util.OrderByComparator;
021 import com.liferay.portal.service.ServiceContext;
022
023 import com.liferay.portlet.messageboards.model.MBDiscussion;
024
025 import java.util.List;
026
027
033 public class MBDiscussionUtil {
034
037 public static void clearCache() {
038 getPersistence().clearCache();
039 }
040
041
044 public static void clearCache(MBDiscussion mbDiscussion) {
045 getPersistence().clearCache(mbDiscussion);
046 }
047
048
051 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
052 throws SystemException {
053 return getPersistence().countWithDynamicQuery(dynamicQuery);
054 }
055
056
059 public static List<MBDiscussion> findWithDynamicQuery(
060 DynamicQuery dynamicQuery) throws SystemException {
061 return getPersistence().findWithDynamicQuery(dynamicQuery);
062 }
063
064
067 public static List<MBDiscussion> findWithDynamicQuery(
068 DynamicQuery dynamicQuery, int start, int end)
069 throws SystemException {
070 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
071 }
072
073
076 public static List<MBDiscussion> findWithDynamicQuery(
077 DynamicQuery dynamicQuery, int start, int end,
078 OrderByComparator orderByComparator) throws SystemException {
079 return getPersistence()
080 .findWithDynamicQuery(dynamicQuery, start, end,
081 orderByComparator);
082 }
083
084
087 public static MBDiscussion remove(MBDiscussion mbDiscussion)
088 throws SystemException {
089 return getPersistence().remove(mbDiscussion);
090 }
091
092
095 public static MBDiscussion update(MBDiscussion mbDiscussion, boolean merge)
096 throws SystemException {
097 return getPersistence().update(mbDiscussion, merge);
098 }
099
100
103 public static MBDiscussion update(MBDiscussion mbDiscussion, boolean merge,
104 ServiceContext serviceContext) throws SystemException {
105 return getPersistence().update(mbDiscussion, merge, serviceContext);
106 }
107
108 public static void cacheResult(
109 com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion) {
110 getPersistence().cacheResult(mbDiscussion);
111 }
112
113 public static void cacheResult(
114 java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> mbDiscussions) {
115 getPersistence().cacheResult(mbDiscussions);
116 }
117
118 public static com.liferay.portlet.messageboards.model.MBDiscussion create(
119 long discussionId) {
120 return getPersistence().create(discussionId);
121 }
122
123 public static com.liferay.portlet.messageboards.model.MBDiscussion remove(
124 long discussionId)
125 throws com.liferay.portal.kernel.exception.SystemException,
126 com.liferay.portlet.messageboards.NoSuchDiscussionException {
127 return getPersistence().remove(discussionId);
128 }
129
130 public static com.liferay.portlet.messageboards.model.MBDiscussion updateImpl(
131 com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion,
132 boolean merge)
133 throws com.liferay.portal.kernel.exception.SystemException {
134 return getPersistence().updateImpl(mbDiscussion, merge);
135 }
136
137 public static com.liferay.portlet.messageboards.model.MBDiscussion findByPrimaryKey(
138 long discussionId)
139 throws com.liferay.portal.kernel.exception.SystemException,
140 com.liferay.portlet.messageboards.NoSuchDiscussionException {
141 return getPersistence().findByPrimaryKey(discussionId);
142 }
143
144 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByPrimaryKey(
145 long discussionId)
146 throws com.liferay.portal.kernel.exception.SystemException {
147 return getPersistence().fetchByPrimaryKey(discussionId);
148 }
149
150 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
151 long classNameId)
152 throws com.liferay.portal.kernel.exception.SystemException {
153 return getPersistence().findByClassNameId(classNameId);
154 }
155
156 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
157 long classNameId, int start, int end)
158 throws com.liferay.portal.kernel.exception.SystemException {
159 return getPersistence().findByClassNameId(classNameId, start, end);
160 }
161
162 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
163 long classNameId, int start, int end,
164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165 throws com.liferay.portal.kernel.exception.SystemException {
166 return getPersistence()
167 .findByClassNameId(classNameId, start, end, orderByComparator);
168 }
169
170 public static com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_First(
171 long classNameId,
172 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173 throws com.liferay.portal.kernel.exception.SystemException,
174 com.liferay.portlet.messageboards.NoSuchDiscussionException {
175 return getPersistence()
176 .findByClassNameId_First(classNameId, orderByComparator);
177 }
178
179 public static com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_Last(
180 long classNameId,
181 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182 throws com.liferay.portal.kernel.exception.SystemException,
183 com.liferay.portlet.messageboards.NoSuchDiscussionException {
184 return getPersistence()
185 .findByClassNameId_Last(classNameId, orderByComparator);
186 }
187
188 public static com.liferay.portlet.messageboards.model.MBDiscussion[] findByClassNameId_PrevAndNext(
189 long discussionId, long classNameId,
190 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
191 throws com.liferay.portal.kernel.exception.SystemException,
192 com.liferay.portlet.messageboards.NoSuchDiscussionException {
193 return getPersistence()
194 .findByClassNameId_PrevAndNext(discussionId, classNameId,
195 orderByComparator);
196 }
197
198 public static com.liferay.portlet.messageboards.model.MBDiscussion findByThreadId(
199 long threadId)
200 throws com.liferay.portal.kernel.exception.SystemException,
201 com.liferay.portlet.messageboards.NoSuchDiscussionException {
202 return getPersistence().findByThreadId(threadId);
203 }
204
205 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId(
206 long threadId)
207 throws com.liferay.portal.kernel.exception.SystemException {
208 return getPersistence().fetchByThreadId(threadId);
209 }
210
211 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId(
212 long threadId, boolean retrieveFromCache)
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getPersistence().fetchByThreadId(threadId, retrieveFromCache);
215 }
216
217 public static com.liferay.portlet.messageboards.model.MBDiscussion findByC_C(
218 long classNameId, long classPK)
219 throws com.liferay.portal.kernel.exception.SystemException,
220 com.liferay.portlet.messageboards.NoSuchDiscussionException {
221 return getPersistence().findByC_C(classNameId, classPK);
222 }
223
224 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C(
225 long classNameId, long classPK)
226 throws com.liferay.portal.kernel.exception.SystemException {
227 return getPersistence().fetchByC_C(classNameId, classPK);
228 }
229
230 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C(
231 long classNameId, long classPK, boolean retrieveFromCache)
232 throws com.liferay.portal.kernel.exception.SystemException {
233 return getPersistence()
234 .fetchByC_C(classNameId, classPK, retrieveFromCache);
235 }
236
237 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll()
238 throws com.liferay.portal.kernel.exception.SystemException {
239 return getPersistence().findAll();
240 }
241
242 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll(
243 int start, int end)
244 throws com.liferay.portal.kernel.exception.SystemException {
245 return getPersistence().findAll(start, end);
246 }
247
248 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll(
249 int start, int end,
250 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251 throws com.liferay.portal.kernel.exception.SystemException {
252 return getPersistence().findAll(start, end, orderByComparator);
253 }
254
255 public static void removeByClassNameId(long classNameId)
256 throws com.liferay.portal.kernel.exception.SystemException {
257 getPersistence().removeByClassNameId(classNameId);
258 }
259
260 public static void removeByThreadId(long threadId)
261 throws com.liferay.portal.kernel.exception.SystemException,
262 com.liferay.portlet.messageboards.NoSuchDiscussionException {
263 getPersistence().removeByThreadId(threadId);
264 }
265
266 public static void removeByC_C(long classNameId, long classPK)
267 throws com.liferay.portal.kernel.exception.SystemException,
268 com.liferay.portlet.messageboards.NoSuchDiscussionException {
269 getPersistence().removeByC_C(classNameId, classPK);
270 }
271
272 public static void removeAll()
273 throws com.liferay.portal.kernel.exception.SystemException {
274 getPersistence().removeAll();
275 }
276
277 public static int countByClassNameId(long classNameId)
278 throws com.liferay.portal.kernel.exception.SystemException {
279 return getPersistence().countByClassNameId(classNameId);
280 }
281
282 public static int countByThreadId(long threadId)
283 throws com.liferay.portal.kernel.exception.SystemException {
284 return getPersistence().countByThreadId(threadId);
285 }
286
287 public static int countByC_C(long classNameId, long classPK)
288 throws com.liferay.portal.kernel.exception.SystemException {
289 return getPersistence().countByC_C(classNameId, classPK);
290 }
291
292 public static int countAll()
293 throws com.liferay.portal.kernel.exception.SystemException {
294 return getPersistence().countAll();
295 }
296
297 public static MBDiscussionPersistence getPersistence() {
298 if (_persistence == null) {
299 _persistence = (MBDiscussionPersistence)PortalBeanLocatorUtil.locate(MBDiscussionPersistence.class.getName());
300 }
301
302 return _persistence;
303 }
304
305 public void setPersistence(MBDiscussionPersistence persistence) {
306 _persistence = persistence;
307 }
308
309 private static MBDiscussionPersistence _persistence;
310 }