1
14
15 package com.liferay.portlet.messageboards.service.persistence;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19 import com.liferay.portal.kernel.exception.SystemException;
20
21 import com.liferay.portlet.messageboards.model.MBDiscussion;
22
23 import java.util.List;
24
25
38 public class MBDiscussionUtil {
39
42 public static void clearCache() {
43 getPersistence().clearCache();
44 }
45
46
49 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50 throws SystemException {
51 return getPersistence().findWithDynamicQuery(dynamicQuery);
52 }
53
54
57 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
58 int start, int end) throws SystemException {
59 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
60 }
61
62
65 public static MBDiscussion remove(MBDiscussion mbDiscussion)
66 throws SystemException {
67 return getPersistence().remove(mbDiscussion);
68 }
69
70
73 public static MBDiscussion update(MBDiscussion mbDiscussion, boolean merge)
74 throws SystemException {
75 return getPersistence().update(mbDiscussion, merge);
76 }
77
78 public static void cacheResult(
79 com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion) {
80 getPersistence().cacheResult(mbDiscussion);
81 }
82
83 public static void cacheResult(
84 java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> mbDiscussions) {
85 getPersistence().cacheResult(mbDiscussions);
86 }
87
88 public static com.liferay.portlet.messageboards.model.MBDiscussion create(
89 long discussionId) {
90 return getPersistence().create(discussionId);
91 }
92
93 public static com.liferay.portlet.messageboards.model.MBDiscussion remove(
94 long discussionId)
95 throws com.liferay.portal.kernel.exception.SystemException,
96 com.liferay.portlet.messageboards.NoSuchDiscussionException {
97 return getPersistence().remove(discussionId);
98 }
99
100 public static com.liferay.portlet.messageboards.model.MBDiscussion updateImpl(
101 com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion,
102 boolean merge)
103 throws com.liferay.portal.kernel.exception.SystemException {
104 return getPersistence().updateImpl(mbDiscussion, merge);
105 }
106
107 public static com.liferay.portlet.messageboards.model.MBDiscussion findByPrimaryKey(
108 long discussionId)
109 throws com.liferay.portal.kernel.exception.SystemException,
110 com.liferay.portlet.messageboards.NoSuchDiscussionException {
111 return getPersistence().findByPrimaryKey(discussionId);
112 }
113
114 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByPrimaryKey(
115 long discussionId)
116 throws com.liferay.portal.kernel.exception.SystemException {
117 return getPersistence().fetchByPrimaryKey(discussionId);
118 }
119
120 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
121 long classNameId)
122 throws com.liferay.portal.kernel.exception.SystemException {
123 return getPersistence().findByClassNameId(classNameId);
124 }
125
126 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
127 long classNameId, int start, int end)
128 throws com.liferay.portal.kernel.exception.SystemException {
129 return getPersistence().findByClassNameId(classNameId, start, end);
130 }
131
132 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
133 long classNameId, int start, int end,
134 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135 throws com.liferay.portal.kernel.exception.SystemException {
136 return getPersistence()
137 .findByClassNameId(classNameId, start, end, orderByComparator);
138 }
139
140 public static com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_First(
141 long classNameId,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException,
144 com.liferay.portlet.messageboards.NoSuchDiscussionException {
145 return getPersistence()
146 .findByClassNameId_First(classNameId, orderByComparator);
147 }
148
149 public static com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_Last(
150 long classNameId,
151 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152 throws com.liferay.portal.kernel.exception.SystemException,
153 com.liferay.portlet.messageboards.NoSuchDiscussionException {
154 return getPersistence()
155 .findByClassNameId_Last(classNameId, orderByComparator);
156 }
157
158 public static com.liferay.portlet.messageboards.model.MBDiscussion[] findByClassNameId_PrevAndNext(
159 long discussionId, long classNameId,
160 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161 throws com.liferay.portal.kernel.exception.SystemException,
162 com.liferay.portlet.messageboards.NoSuchDiscussionException {
163 return getPersistence()
164 .findByClassNameId_PrevAndNext(discussionId, classNameId,
165 orderByComparator);
166 }
167
168 public static com.liferay.portlet.messageboards.model.MBDiscussion findByThreadId(
169 long threadId)
170 throws com.liferay.portal.kernel.exception.SystemException,
171 com.liferay.portlet.messageboards.NoSuchDiscussionException {
172 return getPersistence().findByThreadId(threadId);
173 }
174
175 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId(
176 long threadId)
177 throws com.liferay.portal.kernel.exception.SystemException {
178 return getPersistence().fetchByThreadId(threadId);
179 }
180
181 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId(
182 long threadId, boolean retrieveFromCache)
183 throws com.liferay.portal.kernel.exception.SystemException {
184 return getPersistence().fetchByThreadId(threadId, retrieveFromCache);
185 }
186
187 public static com.liferay.portlet.messageboards.model.MBDiscussion findByC_C(
188 long classNameId, long classPK)
189 throws com.liferay.portal.kernel.exception.SystemException,
190 com.liferay.portlet.messageboards.NoSuchDiscussionException {
191 return getPersistence().findByC_C(classNameId, classPK);
192 }
193
194 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C(
195 long classNameId, long classPK)
196 throws com.liferay.portal.kernel.exception.SystemException {
197 return getPersistence().fetchByC_C(classNameId, classPK);
198 }
199
200 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C(
201 long classNameId, long classPK, boolean retrieveFromCache)
202 throws com.liferay.portal.kernel.exception.SystemException {
203 return getPersistence()
204 .fetchByC_C(classNameId, classPK, retrieveFromCache);
205 }
206
207 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll()
208 throws com.liferay.portal.kernel.exception.SystemException {
209 return getPersistence().findAll();
210 }
211
212 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll(
213 int start, int end)
214 throws com.liferay.portal.kernel.exception.SystemException {
215 return getPersistence().findAll(start, end);
216 }
217
218 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll(
219 int start, int end,
220 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
221 throws com.liferay.portal.kernel.exception.SystemException {
222 return getPersistence().findAll(start, end, orderByComparator);
223 }
224
225 public static void removeByClassNameId(long classNameId)
226 throws com.liferay.portal.kernel.exception.SystemException {
227 getPersistence().removeByClassNameId(classNameId);
228 }
229
230 public static void removeByThreadId(long threadId)
231 throws com.liferay.portal.kernel.exception.SystemException,
232 com.liferay.portlet.messageboards.NoSuchDiscussionException {
233 getPersistence().removeByThreadId(threadId);
234 }
235
236 public static void removeByC_C(long classNameId, long classPK)
237 throws com.liferay.portal.kernel.exception.SystemException,
238 com.liferay.portlet.messageboards.NoSuchDiscussionException {
239 getPersistence().removeByC_C(classNameId, classPK);
240 }
241
242 public static void removeAll()
243 throws com.liferay.portal.kernel.exception.SystemException {
244 getPersistence().removeAll();
245 }
246
247 public static int countByClassNameId(long classNameId)
248 throws com.liferay.portal.kernel.exception.SystemException {
249 return getPersistence().countByClassNameId(classNameId);
250 }
251
252 public static int countByThreadId(long threadId)
253 throws com.liferay.portal.kernel.exception.SystemException {
254 return getPersistence().countByThreadId(threadId);
255 }
256
257 public static int countByC_C(long classNameId, long classPK)
258 throws com.liferay.portal.kernel.exception.SystemException {
259 return getPersistence().countByC_C(classNameId, classPK);
260 }
261
262 public static int countAll()
263 throws com.liferay.portal.kernel.exception.SystemException {
264 return getPersistence().countAll();
265 }
266
267 public static MBDiscussionPersistence getPersistence() {
268 if (_persistence == null) {
269 _persistence = (MBDiscussionPersistence)PortalBeanLocatorUtil.locate(MBDiscussionPersistence.class.getName());
270 }
271
272 return _persistence;
273 }
274
275 public void setPersistence(MBDiscussionPersistence persistence) {
276 _persistence = persistence;
277 }
278
279 private static MBDiscussionPersistence _persistence;
280 }