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.portal.service.persistence;
022:
023: /**
024: * <a href="SubscriptionUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class SubscriptionUtil {
030: public static com.liferay.portal.model.Subscription create(
031: long subscriptionId) {
032: return getPersistence().create(subscriptionId);
033: }
034:
035: public static com.liferay.portal.model.Subscription remove(
036: long subscriptionId)
037: throws com.liferay.portal.SystemException,
038: com.liferay.portal.NoSuchSubscriptionException {
039: return getPersistence().remove(subscriptionId);
040: }
041:
042: public static com.liferay.portal.model.Subscription remove(
043: com.liferay.portal.model.Subscription subscription)
044: throws com.liferay.portal.SystemException {
045: return getPersistence().remove(subscription);
046: }
047:
048: public static com.liferay.portal.model.Subscription update(
049: com.liferay.portal.model.Subscription subscription)
050: throws com.liferay.portal.SystemException {
051: return getPersistence().update(subscription);
052: }
053:
054: public static com.liferay.portal.model.Subscription update(
055: com.liferay.portal.model.Subscription subscription,
056: boolean merge) throws com.liferay.portal.SystemException {
057: return getPersistence().update(subscription, merge);
058: }
059:
060: public static com.liferay.portal.model.Subscription updateImpl(
061: com.liferay.portal.model.Subscription subscription,
062: boolean merge) throws com.liferay.portal.SystemException {
063: return getPersistence().updateImpl(subscription, merge);
064: }
065:
066: public static com.liferay.portal.model.Subscription findByPrimaryKey(
067: long subscriptionId)
068: throws com.liferay.portal.SystemException,
069: com.liferay.portal.NoSuchSubscriptionException {
070: return getPersistence().findByPrimaryKey(subscriptionId);
071: }
072:
073: public static com.liferay.portal.model.Subscription fetchByPrimaryKey(
074: long subscriptionId)
075: throws com.liferay.portal.SystemException {
076: return getPersistence().fetchByPrimaryKey(subscriptionId);
077: }
078:
079: public static java.util.List findByUserId(long userId)
080: throws com.liferay.portal.SystemException {
081: return getPersistence().findByUserId(userId);
082: }
083:
084: public static java.util.List findByUserId(long userId, int begin,
085: int end) throws com.liferay.portal.SystemException {
086: return getPersistence().findByUserId(userId, begin, end);
087: }
088:
089: public static java.util.List findByUserId(long userId, int begin,
090: int end,
091: com.liferay.portal.kernel.util.OrderByComparator obc)
092: throws com.liferay.portal.SystemException {
093: return getPersistence().findByUserId(userId, begin, end, obc);
094: }
095:
096: public static com.liferay.portal.model.Subscription findByUserId_First(
097: long userId,
098: com.liferay.portal.kernel.util.OrderByComparator obc)
099: throws com.liferay.portal.SystemException,
100: com.liferay.portal.NoSuchSubscriptionException {
101: return getPersistence().findByUserId_First(userId, obc);
102: }
103:
104: public static com.liferay.portal.model.Subscription findByUserId_Last(
105: long userId,
106: com.liferay.portal.kernel.util.OrderByComparator obc)
107: throws com.liferay.portal.SystemException,
108: com.liferay.portal.NoSuchSubscriptionException {
109: return getPersistence().findByUserId_Last(userId, obc);
110: }
111:
112: public static com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
113: long subscriptionId, long userId,
114: com.liferay.portal.kernel.util.OrderByComparator obc)
115: throws com.liferay.portal.SystemException,
116: com.liferay.portal.NoSuchSubscriptionException {
117: return getPersistence().findByUserId_PrevAndNext(
118: subscriptionId, userId, obc);
119: }
120:
121: public static java.util.List findByC_C_C(long companyId,
122: long classNameId, long classPK)
123: throws com.liferay.portal.SystemException {
124: return getPersistence().findByC_C_C(companyId, classNameId,
125: classPK);
126: }
127:
128: public static java.util.List findByC_C_C(long companyId,
129: long classNameId, long classPK, int begin, int end)
130: throws com.liferay.portal.SystemException {
131: return getPersistence().findByC_C_C(companyId, classNameId,
132: classPK, begin, end);
133: }
134:
135: public static java.util.List findByC_C_C(long companyId,
136: long classNameId, long classPK, int begin, int end,
137: com.liferay.portal.kernel.util.OrderByComparator obc)
138: throws com.liferay.portal.SystemException {
139: return getPersistence().findByC_C_C(companyId, classNameId,
140: classPK, begin, end, obc);
141: }
142:
143: public static com.liferay.portal.model.Subscription findByC_C_C_First(
144: long companyId, long classNameId, long classPK,
145: com.liferay.portal.kernel.util.OrderByComparator obc)
146: throws com.liferay.portal.SystemException,
147: com.liferay.portal.NoSuchSubscriptionException {
148: return getPersistence().findByC_C_C_First(companyId,
149: classNameId, classPK, obc);
150: }
151:
152: public static com.liferay.portal.model.Subscription findByC_C_C_Last(
153: long companyId, long classNameId, long classPK,
154: com.liferay.portal.kernel.util.OrderByComparator obc)
155: throws com.liferay.portal.SystemException,
156: com.liferay.portal.NoSuchSubscriptionException {
157: return getPersistence().findByC_C_C_Last(companyId,
158: classNameId, classPK, obc);
159: }
160:
161: public static com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
162: long subscriptionId, long companyId, long classNameId,
163: long classPK,
164: com.liferay.portal.kernel.util.OrderByComparator obc)
165: throws com.liferay.portal.SystemException,
166: com.liferay.portal.NoSuchSubscriptionException {
167: return getPersistence().findByC_C_C_PrevAndNext(subscriptionId,
168: companyId, classNameId, classPK, obc);
169: }
170:
171: public static com.liferay.portal.model.Subscription findByC_U_C_C(
172: long companyId, long userId, long classNameId, long classPK)
173: throws com.liferay.portal.SystemException,
174: com.liferay.portal.NoSuchSubscriptionException {
175: return getPersistence().findByC_U_C_C(companyId, userId,
176: classNameId, classPK);
177: }
178:
179: public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
180: long companyId, long userId, long classNameId, long classPK)
181: throws com.liferay.portal.SystemException {
182: return getPersistence().fetchByC_U_C_C(companyId, userId,
183: classNameId, classPK);
184: }
185:
186: public static java.util.List findWithDynamicQuery(
187: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
188: throws com.liferay.portal.SystemException {
189: return getPersistence().findWithDynamicQuery(queryInitializer);
190: }
191:
192: public static java.util.List findWithDynamicQuery(
193: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
194: int begin, int end)
195: throws com.liferay.portal.SystemException {
196: return getPersistence().findWithDynamicQuery(queryInitializer,
197: begin, end);
198: }
199:
200: public static java.util.List findAll()
201: throws com.liferay.portal.SystemException {
202: return getPersistence().findAll();
203: }
204:
205: public static java.util.List findAll(int begin, int end)
206: throws com.liferay.portal.SystemException {
207: return getPersistence().findAll(begin, end);
208: }
209:
210: public static java.util.List findAll(int begin, int end,
211: com.liferay.portal.kernel.util.OrderByComparator obc)
212: throws com.liferay.portal.SystemException {
213: return getPersistence().findAll(begin, end, obc);
214: }
215:
216: public static void removeByUserId(long userId)
217: throws com.liferay.portal.SystemException {
218: getPersistence().removeByUserId(userId);
219: }
220:
221: public static void removeByC_C_C(long companyId, long classNameId,
222: long classPK) throws com.liferay.portal.SystemException {
223: getPersistence().removeByC_C_C(companyId, classNameId, classPK);
224: }
225:
226: public static void removeByC_U_C_C(long companyId, long userId,
227: long classNameId, long classPK)
228: throws com.liferay.portal.SystemException,
229: com.liferay.portal.NoSuchSubscriptionException {
230: getPersistence().removeByC_U_C_C(companyId, userId,
231: classNameId, classPK);
232: }
233:
234: public static void removeAll()
235: throws com.liferay.portal.SystemException {
236: getPersistence().removeAll();
237: }
238:
239: public static int countByUserId(long userId)
240: throws com.liferay.portal.SystemException {
241: return getPersistence().countByUserId(userId);
242: }
243:
244: public static int countByC_C_C(long companyId, long classNameId,
245: long classPK) throws com.liferay.portal.SystemException {
246: return getPersistence().countByC_C_C(companyId, classNameId,
247: classPK);
248: }
249:
250: public static int countByC_U_C_C(long companyId, long userId,
251: long classNameId, long classPK)
252: throws com.liferay.portal.SystemException {
253: return getPersistence().countByC_U_C_C(companyId, userId,
254: classNameId, classPK);
255: }
256:
257: public static int countAll()
258: throws com.liferay.portal.SystemException {
259: return getPersistence().countAll();
260: }
261:
262: public static SubscriptionPersistence getPersistence() {
263: return _getUtil()._persistence;
264: }
265:
266: public void setPersistence(SubscriptionPersistence persistence) {
267: _persistence = persistence;
268: }
269:
270: private static SubscriptionUtil _getUtil() {
271: if (_util == null) {
272: _util = (SubscriptionUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
273: .locate(_UTIL);
274: }
275:
276: return _util;
277: }
278:
279: private static final String _UTIL = SubscriptionUtil.class
280: .getName();
281: private static SubscriptionUtil _util;
282: private SubscriptionPersistence _persistence;
283: }
|