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="MBThreadUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class MBThreadUtil {
030: public static com.liferay.portlet.messageboards.model.MBThread create(
031: long threadId) {
032: return getPersistence().create(threadId);
033: }
034:
035: public static com.liferay.portlet.messageboards.model.MBThread remove(
036: long threadId) throws com.liferay.portal.SystemException,
037: com.liferay.portlet.messageboards.NoSuchThreadException {
038: return getPersistence().remove(threadId);
039: }
040:
041: public static com.liferay.portlet.messageboards.model.MBThread remove(
042: com.liferay.portlet.messageboards.model.MBThread mbThread)
043: throws com.liferay.portal.SystemException {
044: return getPersistence().remove(mbThread);
045: }
046:
047: public static com.liferay.portlet.messageboards.model.MBThread update(
048: com.liferay.portlet.messageboards.model.MBThread mbThread)
049: throws com.liferay.portal.SystemException {
050: return getPersistence().update(mbThread);
051: }
052:
053: public static com.liferay.portlet.messageboards.model.MBThread update(
054: com.liferay.portlet.messageboards.model.MBThread mbThread,
055: boolean merge) throws com.liferay.portal.SystemException {
056: return getPersistence().update(mbThread, merge);
057: }
058:
059: public static com.liferay.portlet.messageboards.model.MBThread updateImpl(
060: com.liferay.portlet.messageboards.model.MBThread mbThread,
061: boolean merge) throws com.liferay.portal.SystemException {
062: return getPersistence().updateImpl(mbThread, merge);
063: }
064:
065: public static com.liferay.portlet.messageboards.model.MBThread findByPrimaryKey(
066: long threadId) throws com.liferay.portal.SystemException,
067: com.liferay.portlet.messageboards.NoSuchThreadException {
068: return getPersistence().findByPrimaryKey(threadId);
069: }
070:
071: public static com.liferay.portlet.messageboards.model.MBThread fetchByPrimaryKey(
072: long threadId) throws com.liferay.portal.SystemException {
073: return getPersistence().fetchByPrimaryKey(threadId);
074: }
075:
076: public static java.util.List findByCategoryId(long categoryId)
077: throws com.liferay.portal.SystemException {
078: return getPersistence().findByCategoryId(categoryId);
079: }
080:
081: public static java.util.List findByCategoryId(long categoryId,
082: int begin, int end)
083: throws com.liferay.portal.SystemException {
084: return getPersistence()
085: .findByCategoryId(categoryId, begin, end);
086: }
087:
088: public static java.util.List findByCategoryId(long categoryId,
089: int begin, int end,
090: com.liferay.portal.kernel.util.OrderByComparator obc)
091: throws com.liferay.portal.SystemException {
092: return getPersistence().findByCategoryId(categoryId, begin,
093: end, obc);
094: }
095:
096: public static com.liferay.portlet.messageboards.model.MBThread findByCategoryId_First(
097: long categoryId,
098: com.liferay.portal.kernel.util.OrderByComparator obc)
099: throws com.liferay.portal.SystemException,
100: com.liferay.portlet.messageboards.NoSuchThreadException {
101: return getPersistence().findByCategoryId_First(categoryId, obc);
102: }
103:
104: public static com.liferay.portlet.messageboards.model.MBThread findByCategoryId_Last(
105: long categoryId,
106: com.liferay.portal.kernel.util.OrderByComparator obc)
107: throws com.liferay.portal.SystemException,
108: com.liferay.portlet.messageboards.NoSuchThreadException {
109: return getPersistence().findByCategoryId_Last(categoryId, obc);
110: }
111:
112: public static com.liferay.portlet.messageboards.model.MBThread[] findByCategoryId_PrevAndNext(
113: long threadId, long categoryId,
114: com.liferay.portal.kernel.util.OrderByComparator obc)
115: throws com.liferay.portal.SystemException,
116: com.liferay.portlet.messageboards.NoSuchThreadException {
117: return getPersistence().findByCategoryId_PrevAndNext(threadId,
118: categoryId, obc);
119: }
120:
121: public static java.util.List findWithDynamicQuery(
122: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
123: throws com.liferay.portal.SystemException {
124: return getPersistence().findWithDynamicQuery(queryInitializer);
125: }
126:
127: public static java.util.List findWithDynamicQuery(
128: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
129: int begin, int end)
130: throws com.liferay.portal.SystemException {
131: return getPersistence().findWithDynamicQuery(queryInitializer,
132: begin, end);
133: }
134:
135: public static java.util.List findAll()
136: throws com.liferay.portal.SystemException {
137: return getPersistence().findAll();
138: }
139:
140: public static java.util.List findAll(int begin, int end)
141: throws com.liferay.portal.SystemException {
142: return getPersistence().findAll(begin, end);
143: }
144:
145: public static java.util.List findAll(int begin, int end,
146: com.liferay.portal.kernel.util.OrderByComparator obc)
147: throws com.liferay.portal.SystemException {
148: return getPersistence().findAll(begin, end, obc);
149: }
150:
151: public static void removeByCategoryId(long categoryId)
152: throws com.liferay.portal.SystemException {
153: getPersistence().removeByCategoryId(categoryId);
154: }
155:
156: public static void removeAll()
157: throws com.liferay.portal.SystemException {
158: getPersistence().removeAll();
159: }
160:
161: public static int countByCategoryId(long categoryId)
162: throws com.liferay.portal.SystemException {
163: return getPersistence().countByCategoryId(categoryId);
164: }
165:
166: public static int countAll()
167: throws com.liferay.portal.SystemException {
168: return getPersistence().countAll();
169: }
170:
171: public static MBThreadPersistence getPersistence() {
172: return _getUtil()._persistence;
173: }
174:
175: public void setPersistence(MBThreadPersistence persistence) {
176: _persistence = persistence;
177: }
178:
179: private static MBThreadUtil _getUtil() {
180: if (_util == null) {
181: _util = (MBThreadUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
182: .locate(_UTIL);
183: }
184:
185: return _util;
186: }
187:
188: private static final String _UTIL = MBThreadUtil.class.getName();
189: private static MBThreadUtil _util;
190: private MBThreadPersistence _persistence;
191: }
|