001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.messageboards.service.persistence;
022:
023: /**
024: * <a href="MBMessageUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class MBMessageUtil {
030: public static com.liferay.portlet.messageboards.model.MBMessage create(
031: long messageId) {
032: return getPersistence().create(messageId);
033: }
034:
035: public static com.liferay.portlet.messageboards.model.MBMessage remove(
036: long messageId) throws com.liferay.portal.SystemException,
037: com.liferay.portlet.messageboards.NoSuchMessageException {
038: return getPersistence().remove(messageId);
039: }
040:
041: public static com.liferay.portlet.messageboards.model.MBMessage remove(
042: com.liferay.portlet.messageboards.model.MBMessage mbMessage)
043: throws com.liferay.portal.SystemException {
044: return getPersistence().remove(mbMessage);
045: }
046:
047: public static com.liferay.portlet.messageboards.model.MBMessage update(
048: com.liferay.portlet.messageboards.model.MBMessage mbMessage)
049: throws com.liferay.portal.SystemException {
050: return getPersistence().update(mbMessage);
051: }
052:
053: public static com.liferay.portlet.messageboards.model.MBMessage update(
054: com.liferay.portlet.messageboards.model.MBMessage mbMessage,
055: boolean merge) throws com.liferay.portal.SystemException {
056: return getPersistence().update(mbMessage, merge);
057: }
058:
059: public static com.liferay.portlet.messageboards.model.MBMessage updateImpl(
060: com.liferay.portlet.messageboards.model.MBMessage mbMessage,
061: boolean merge) throws com.liferay.portal.SystemException {
062: return getPersistence().updateImpl(mbMessage, merge);
063: }
064:
065: public static com.liferay.portlet.messageboards.model.MBMessage findByPrimaryKey(
066: long messageId) throws com.liferay.portal.SystemException,
067: com.liferay.portlet.messageboards.NoSuchMessageException {
068: return getPersistence().findByPrimaryKey(messageId);
069: }
070:
071: public static com.liferay.portlet.messageboards.model.MBMessage fetchByPrimaryKey(
072: long messageId) throws com.liferay.portal.SystemException {
073: return getPersistence().fetchByPrimaryKey(messageId);
074: }
075:
076: public static java.util.List findByUuid(java.lang.String uuid)
077: throws com.liferay.portal.SystemException {
078: return getPersistence().findByUuid(uuid);
079: }
080:
081: public static java.util.List findByUuid(java.lang.String uuid,
082: int begin, int end)
083: throws com.liferay.portal.SystemException {
084: return getPersistence().findByUuid(uuid, begin, end);
085: }
086:
087: public static java.util.List findByUuid(java.lang.String uuid,
088: int begin, int end,
089: com.liferay.portal.kernel.util.OrderByComparator obc)
090: throws com.liferay.portal.SystemException {
091: return getPersistence().findByUuid(uuid, begin, end, obc);
092: }
093:
094: public static com.liferay.portlet.messageboards.model.MBMessage findByUuid_First(
095: java.lang.String uuid,
096: com.liferay.portal.kernel.util.OrderByComparator obc)
097: throws com.liferay.portal.SystemException,
098: com.liferay.portlet.messageboards.NoSuchMessageException {
099: return getPersistence().findByUuid_First(uuid, obc);
100: }
101:
102: public static com.liferay.portlet.messageboards.model.MBMessage findByUuid_Last(
103: java.lang.String uuid,
104: com.liferay.portal.kernel.util.OrderByComparator obc)
105: throws com.liferay.portal.SystemException,
106: com.liferay.portlet.messageboards.NoSuchMessageException {
107: return getPersistence().findByUuid_Last(uuid, obc);
108: }
109:
110: public static com.liferay.portlet.messageboards.model.MBMessage[] findByUuid_PrevAndNext(
111: long messageId, java.lang.String uuid,
112: com.liferay.portal.kernel.util.OrderByComparator obc)
113: throws com.liferay.portal.SystemException,
114: com.liferay.portlet.messageboards.NoSuchMessageException {
115: return getPersistence().findByUuid_PrevAndNext(messageId, uuid,
116: obc);
117: }
118:
119: public static java.util.List findByCompanyId(long companyId)
120: throws com.liferay.portal.SystemException {
121: return getPersistence().findByCompanyId(companyId);
122: }
123:
124: public static java.util.List findByCompanyId(long companyId,
125: int begin, int end)
126: throws com.liferay.portal.SystemException {
127: return getPersistence().findByCompanyId(companyId, begin, end);
128: }
129:
130: public static java.util.List findByCompanyId(long companyId,
131: int begin, int end,
132: com.liferay.portal.kernel.util.OrderByComparator obc)
133: throws com.liferay.portal.SystemException {
134: return getPersistence().findByCompanyId(companyId, begin, end,
135: obc);
136: }
137:
138: public static com.liferay.portlet.messageboards.model.MBMessage findByCompanyId_First(
139: long companyId,
140: com.liferay.portal.kernel.util.OrderByComparator obc)
141: throws com.liferay.portal.SystemException,
142: com.liferay.portlet.messageboards.NoSuchMessageException {
143: return getPersistence().findByCompanyId_First(companyId, obc);
144: }
145:
146: public static com.liferay.portlet.messageboards.model.MBMessage findByCompanyId_Last(
147: long companyId,
148: com.liferay.portal.kernel.util.OrderByComparator obc)
149: throws com.liferay.portal.SystemException,
150: com.liferay.portlet.messageboards.NoSuchMessageException {
151: return getPersistence().findByCompanyId_Last(companyId, obc);
152: }
153:
154: public static com.liferay.portlet.messageboards.model.MBMessage[] findByCompanyId_PrevAndNext(
155: long messageId, long companyId,
156: com.liferay.portal.kernel.util.OrderByComparator obc)
157: throws com.liferay.portal.SystemException,
158: com.liferay.portlet.messageboards.NoSuchMessageException {
159: return getPersistence().findByCompanyId_PrevAndNext(messageId,
160: companyId, obc);
161: }
162:
163: public static java.util.List findByCategoryId(long categoryId)
164: throws com.liferay.portal.SystemException {
165: return getPersistence().findByCategoryId(categoryId);
166: }
167:
168: public static java.util.List findByCategoryId(long categoryId,
169: int begin, int end)
170: throws com.liferay.portal.SystemException {
171: return getPersistence()
172: .findByCategoryId(categoryId, begin, end);
173: }
174:
175: public static java.util.List findByCategoryId(long categoryId,
176: int begin, int end,
177: com.liferay.portal.kernel.util.OrderByComparator obc)
178: throws com.liferay.portal.SystemException {
179: return getPersistence().findByCategoryId(categoryId, begin,
180: end, obc);
181: }
182:
183: public static com.liferay.portlet.messageboards.model.MBMessage findByCategoryId_First(
184: long categoryId,
185: com.liferay.portal.kernel.util.OrderByComparator obc)
186: throws com.liferay.portal.SystemException,
187: com.liferay.portlet.messageboards.NoSuchMessageException {
188: return getPersistence().findByCategoryId_First(categoryId, obc);
189: }
190:
191: public static com.liferay.portlet.messageboards.model.MBMessage findByCategoryId_Last(
192: long categoryId,
193: com.liferay.portal.kernel.util.OrderByComparator obc)
194: throws com.liferay.portal.SystemException,
195: com.liferay.portlet.messageboards.NoSuchMessageException {
196: return getPersistence().findByCategoryId_Last(categoryId, obc);
197: }
198:
199: public static com.liferay.portlet.messageboards.model.MBMessage[] findByCategoryId_PrevAndNext(
200: long messageId, long categoryId,
201: com.liferay.portal.kernel.util.OrderByComparator obc)
202: throws com.liferay.portal.SystemException,
203: com.liferay.portlet.messageboards.NoSuchMessageException {
204: return getPersistence().findByCategoryId_PrevAndNext(messageId,
205: categoryId, obc);
206: }
207:
208: public static java.util.List findByThreadId(long threadId)
209: throws com.liferay.portal.SystemException {
210: return getPersistence().findByThreadId(threadId);
211: }
212:
213: public static java.util.List findByThreadId(long threadId,
214: int begin, int end)
215: throws com.liferay.portal.SystemException {
216: return getPersistence().findByThreadId(threadId, begin, end);
217: }
218:
219: public static java.util.List findByThreadId(long threadId,
220: int begin, int end,
221: com.liferay.portal.kernel.util.OrderByComparator obc)
222: throws com.liferay.portal.SystemException {
223: return getPersistence().findByThreadId(threadId, begin, end,
224: obc);
225: }
226:
227: public static com.liferay.portlet.messageboards.model.MBMessage findByThreadId_First(
228: long threadId,
229: com.liferay.portal.kernel.util.OrderByComparator obc)
230: throws com.liferay.portal.SystemException,
231: com.liferay.portlet.messageboards.NoSuchMessageException {
232: return getPersistence().findByThreadId_First(threadId, obc);
233: }
234:
235: public static com.liferay.portlet.messageboards.model.MBMessage findByThreadId_Last(
236: long threadId,
237: com.liferay.portal.kernel.util.OrderByComparator obc)
238: throws com.liferay.portal.SystemException,
239: com.liferay.portlet.messageboards.NoSuchMessageException {
240: return getPersistence().findByThreadId_Last(threadId, obc);
241: }
242:
243: public static com.liferay.portlet.messageboards.model.MBMessage[] findByThreadId_PrevAndNext(
244: long messageId, long threadId,
245: com.liferay.portal.kernel.util.OrderByComparator obc)
246: throws com.liferay.portal.SystemException,
247: com.liferay.portlet.messageboards.NoSuchMessageException {
248: return getPersistence().findByThreadId_PrevAndNext(messageId,
249: threadId, obc);
250: }
251:
252: public static java.util.List findByC_T(long categoryId,
253: long threadId) throws com.liferay.portal.SystemException {
254: return getPersistence().findByC_T(categoryId, threadId);
255: }
256:
257: public static java.util.List findByC_T(long categoryId,
258: long threadId, int begin, int end)
259: throws com.liferay.portal.SystemException {
260: return getPersistence().findByC_T(categoryId, threadId, begin,
261: end);
262: }
263:
264: public static java.util.List findByC_T(long categoryId,
265: long threadId, int begin, int end,
266: com.liferay.portal.kernel.util.OrderByComparator obc)
267: throws com.liferay.portal.SystemException {
268: return getPersistence().findByC_T(categoryId, threadId, begin,
269: end, obc);
270: }
271:
272: public static com.liferay.portlet.messageboards.model.MBMessage findByC_T_First(
273: long categoryId, long threadId,
274: com.liferay.portal.kernel.util.OrderByComparator obc)
275: throws com.liferay.portal.SystemException,
276: com.liferay.portlet.messageboards.NoSuchMessageException {
277: return getPersistence().findByC_T_First(categoryId, threadId,
278: obc);
279: }
280:
281: public static com.liferay.portlet.messageboards.model.MBMessage findByC_T_Last(
282: long categoryId, long threadId,
283: com.liferay.portal.kernel.util.OrderByComparator obc)
284: throws com.liferay.portal.SystemException,
285: com.liferay.portlet.messageboards.NoSuchMessageException {
286: return getPersistence().findByC_T_Last(categoryId, threadId,
287: obc);
288: }
289:
290: public static com.liferay.portlet.messageboards.model.MBMessage[] findByC_T_PrevAndNext(
291: long messageId, long categoryId, long threadId,
292: com.liferay.portal.kernel.util.OrderByComparator obc)
293: throws com.liferay.portal.SystemException,
294: com.liferay.portlet.messageboards.NoSuchMessageException {
295: return getPersistence().findByC_T_PrevAndNext(messageId,
296: categoryId, threadId, obc);
297: }
298:
299: public static java.util.List findByT_P(long threadId,
300: long parentMessageId)
301: throws com.liferay.portal.SystemException {
302: return getPersistence().findByT_P(threadId, parentMessageId);
303: }
304:
305: public static java.util.List findByT_P(long threadId,
306: long parentMessageId, int begin, int end)
307: throws com.liferay.portal.SystemException {
308: return getPersistence().findByT_P(threadId, parentMessageId,
309: begin, end);
310: }
311:
312: public static java.util.List findByT_P(long threadId,
313: long parentMessageId, int begin, int end,
314: com.liferay.portal.kernel.util.OrderByComparator obc)
315: throws com.liferay.portal.SystemException {
316: return getPersistence().findByT_P(threadId, parentMessageId,
317: begin, end, obc);
318: }
319:
320: public static com.liferay.portlet.messageboards.model.MBMessage findByT_P_First(
321: long threadId, long parentMessageId,
322: com.liferay.portal.kernel.util.OrderByComparator obc)
323: throws com.liferay.portal.SystemException,
324: com.liferay.portlet.messageboards.NoSuchMessageException {
325: return getPersistence().findByT_P_First(threadId,
326: parentMessageId, obc);
327: }
328:
329: public static com.liferay.portlet.messageboards.model.MBMessage findByT_P_Last(
330: long threadId, long parentMessageId,
331: com.liferay.portal.kernel.util.OrderByComparator obc)
332: throws com.liferay.portal.SystemException,
333: com.liferay.portlet.messageboards.NoSuchMessageException {
334: return getPersistence().findByT_P_Last(threadId,
335: parentMessageId, obc);
336: }
337:
338: public static com.liferay.portlet.messageboards.model.MBMessage[] findByT_P_PrevAndNext(
339: long messageId, long threadId, long parentMessageId,
340: com.liferay.portal.kernel.util.OrderByComparator obc)
341: throws com.liferay.portal.SystemException,
342: com.liferay.portlet.messageboards.NoSuchMessageException {
343: return getPersistence().findByT_P_PrevAndNext(messageId,
344: threadId, parentMessageId, obc);
345: }
346:
347: public static java.util.List findWithDynamicQuery(
348: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
349: throws com.liferay.portal.SystemException {
350: return getPersistence().findWithDynamicQuery(queryInitializer);
351: }
352:
353: public static java.util.List findWithDynamicQuery(
354: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
355: int begin, int end)
356: throws com.liferay.portal.SystemException {
357: return getPersistence().findWithDynamicQuery(queryInitializer,
358: begin, end);
359: }
360:
361: public static java.util.List findAll()
362: throws com.liferay.portal.SystemException {
363: return getPersistence().findAll();
364: }
365:
366: public static java.util.List findAll(int begin, int end)
367: throws com.liferay.portal.SystemException {
368: return getPersistence().findAll(begin, end);
369: }
370:
371: public static java.util.List findAll(int begin, int end,
372: com.liferay.portal.kernel.util.OrderByComparator obc)
373: throws com.liferay.portal.SystemException {
374: return getPersistence().findAll(begin, end, obc);
375: }
376:
377: public static void removeByUuid(java.lang.String uuid)
378: throws com.liferay.portal.SystemException {
379: getPersistence().removeByUuid(uuid);
380: }
381:
382: public static void removeByCompanyId(long companyId)
383: throws com.liferay.portal.SystemException {
384: getPersistence().removeByCompanyId(companyId);
385: }
386:
387: public static void removeByCategoryId(long categoryId)
388: throws com.liferay.portal.SystemException {
389: getPersistence().removeByCategoryId(categoryId);
390: }
391:
392: public static void removeByThreadId(long threadId)
393: throws com.liferay.portal.SystemException {
394: getPersistence().removeByThreadId(threadId);
395: }
396:
397: public static void removeByC_T(long categoryId, long threadId)
398: throws com.liferay.portal.SystemException {
399: getPersistence().removeByC_T(categoryId, threadId);
400: }
401:
402: public static void removeByT_P(long threadId, long parentMessageId)
403: throws com.liferay.portal.SystemException {
404: getPersistence().removeByT_P(threadId, parentMessageId);
405: }
406:
407: public static void removeAll()
408: throws com.liferay.portal.SystemException {
409: getPersistence().removeAll();
410: }
411:
412: public static int countByUuid(java.lang.String uuid)
413: throws com.liferay.portal.SystemException {
414: return getPersistence().countByUuid(uuid);
415: }
416:
417: public static int countByCompanyId(long companyId)
418: throws com.liferay.portal.SystemException {
419: return getPersistence().countByCompanyId(companyId);
420: }
421:
422: public static int countByCategoryId(long categoryId)
423: throws com.liferay.portal.SystemException {
424: return getPersistence().countByCategoryId(categoryId);
425: }
426:
427: public static int countByThreadId(long threadId)
428: throws com.liferay.portal.SystemException {
429: return getPersistence().countByThreadId(threadId);
430: }
431:
432: public static int countByC_T(long categoryId, long threadId)
433: throws com.liferay.portal.SystemException {
434: return getPersistence().countByC_T(categoryId, threadId);
435: }
436:
437: public static int countByT_P(long threadId, long parentMessageId)
438: throws com.liferay.portal.SystemException {
439: return getPersistence().countByT_P(threadId, parentMessageId);
440: }
441:
442: public static int countAll()
443: throws com.liferay.portal.SystemException {
444: return getPersistence().countAll();
445: }
446:
447: public static MBMessagePersistence getPersistence() {
448: return _getUtil()._persistence;
449: }
450:
451: public void setPersistence(MBMessagePersistence persistence) {
452: _persistence = persistence;
453: }
454:
455: private static MBMessageUtil _getUtil() {
456: if (_util == null) {
457: _util = (MBMessageUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
458: .locate(_UTIL);
459: }
460:
461: return _util;
462: }
463:
464: private static final String _UTIL = MBMessageUtil.class.getName();
465: private static MBMessageUtil _util;
466: private MBMessagePersistence _persistence;
467: }
|