1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.model.Subscription;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="SubscriptionUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       SubscriptionPersistence
34   * @see       SubscriptionPersistenceImpl
35   * @generated
36   */
37  public class SubscriptionUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static Subscription remove(Subscription subscription)
65          throws SystemException {
66          return getPersistence().remove(subscription);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
72      public static Subscription update(Subscription subscription, boolean merge)
73          throws SystemException {
74          return getPersistence().update(subscription, merge);
75      }
76  
77      public static void cacheResult(
78          com.liferay.portal.model.Subscription subscription) {
79          getPersistence().cacheResult(subscription);
80      }
81  
82      public static void cacheResult(
83          java.util.List<com.liferay.portal.model.Subscription> subscriptions) {
84          getPersistence().cacheResult(subscriptions);
85      }
86  
87      public static com.liferay.portal.model.Subscription create(
88          long subscriptionId) {
89          return getPersistence().create(subscriptionId);
90      }
91  
92      public static com.liferay.portal.model.Subscription remove(
93          long subscriptionId)
94          throws com.liferay.portal.NoSuchSubscriptionException,
95              com.liferay.portal.SystemException {
96          return getPersistence().remove(subscriptionId);
97      }
98  
99      /**
100      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
101      */
102     public static com.liferay.portal.model.Subscription update(
103         com.liferay.portal.model.Subscription subscription)
104         throws com.liferay.portal.SystemException {
105         return getPersistence().update(subscription);
106     }
107 
108     public static com.liferay.portal.model.Subscription updateImpl(
109         com.liferay.portal.model.Subscription subscription, boolean merge)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().updateImpl(subscription, merge);
112     }
113 
114     public static com.liferay.portal.model.Subscription findByPrimaryKey(
115         long subscriptionId)
116         throws com.liferay.portal.NoSuchSubscriptionException,
117             com.liferay.portal.SystemException {
118         return getPersistence().findByPrimaryKey(subscriptionId);
119     }
120 
121     public static com.liferay.portal.model.Subscription fetchByPrimaryKey(
122         long subscriptionId) throws com.liferay.portal.SystemException {
123         return getPersistence().fetchByPrimaryKey(subscriptionId);
124     }
125 
126     public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
127         long userId) throws com.liferay.portal.SystemException {
128         return getPersistence().findByUserId(userId);
129     }
130 
131     public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
132         long userId, int start, int end)
133         throws com.liferay.portal.SystemException {
134         return getPersistence().findByUserId(userId, start, end);
135     }
136 
137     public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
138         long userId, int start, int end,
139         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
140         throws com.liferay.portal.SystemException {
141         return getPersistence()
142                    .findByUserId(userId, start, end, orderByComparator);
143     }
144 
145     public static com.liferay.portal.model.Subscription findByUserId_First(
146         long userId,
147         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
148         throws com.liferay.portal.NoSuchSubscriptionException,
149             com.liferay.portal.SystemException {
150         return getPersistence().findByUserId_First(userId, orderByComparator);
151     }
152 
153     public static com.liferay.portal.model.Subscription findByUserId_Last(
154         long userId,
155         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156         throws com.liferay.portal.NoSuchSubscriptionException,
157             com.liferay.portal.SystemException {
158         return getPersistence().findByUserId_Last(userId, orderByComparator);
159     }
160 
161     public static com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
162         long subscriptionId, long userId,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.NoSuchSubscriptionException,
165             com.liferay.portal.SystemException {
166         return getPersistence()
167                    .findByUserId_PrevAndNext(subscriptionId, userId,
168             orderByComparator);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
172         long userId, long classNameId)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findByU_C(userId, classNameId);
175     }
176 
177     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
178         long userId, long classNameId, int start, int end)
179         throws com.liferay.portal.SystemException {
180         return getPersistence().findByU_C(userId, classNameId, start, end);
181     }
182 
183     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
184         long userId, long classNameId, int start, int end,
185         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
186         throws com.liferay.portal.SystemException {
187         return getPersistence()
188                    .findByU_C(userId, classNameId, start, end, orderByComparator);
189     }
190 
191     public static com.liferay.portal.model.Subscription findByU_C_First(
192         long userId, long classNameId,
193         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194         throws com.liferay.portal.NoSuchSubscriptionException,
195             com.liferay.portal.SystemException {
196         return getPersistence()
197                    .findByU_C_First(userId, classNameId, orderByComparator);
198     }
199 
200     public static com.liferay.portal.model.Subscription findByU_C_Last(
201         long userId, long classNameId,
202         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203         throws com.liferay.portal.NoSuchSubscriptionException,
204             com.liferay.portal.SystemException {
205         return getPersistence()
206                    .findByU_C_Last(userId, classNameId, orderByComparator);
207     }
208 
209     public static com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext(
210         long subscriptionId, long userId, long classNameId,
211         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212         throws com.liferay.portal.NoSuchSubscriptionException,
213             com.liferay.portal.SystemException {
214         return getPersistence()
215                    .findByU_C_PrevAndNext(subscriptionId, userId, classNameId,
216             orderByComparator);
217     }
218 
219     public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
220         long companyId, long classNameId, long classPK)
221         throws com.liferay.portal.SystemException {
222         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
223     }
224 
225     public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
226         long companyId, long classNameId, long classPK, int start, int end)
227         throws com.liferay.portal.SystemException {
228         return getPersistence()
229                    .findByC_C_C(companyId, classNameId, classPK, start, end);
230     }
231 
232     public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
233         long companyId, long classNameId, long classPK, int start, int end,
234         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
235         throws com.liferay.portal.SystemException {
236         return getPersistence()
237                    .findByC_C_C(companyId, classNameId, classPK, start, end,
238             orderByComparator);
239     }
240 
241     public static com.liferay.portal.model.Subscription findByC_C_C_First(
242         long companyId, long classNameId, long classPK,
243         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244         throws com.liferay.portal.NoSuchSubscriptionException,
245             com.liferay.portal.SystemException {
246         return getPersistence()
247                    .findByC_C_C_First(companyId, classNameId, classPK,
248             orderByComparator);
249     }
250 
251     public static com.liferay.portal.model.Subscription findByC_C_C_Last(
252         long companyId, long classNameId, long classPK,
253         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
254         throws com.liferay.portal.NoSuchSubscriptionException,
255             com.liferay.portal.SystemException {
256         return getPersistence()
257                    .findByC_C_C_Last(companyId, classNameId, classPK,
258             orderByComparator);
259     }
260 
261     public static com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
262         long subscriptionId, long companyId, long classNameId, long classPK,
263         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
264         throws com.liferay.portal.NoSuchSubscriptionException,
265             com.liferay.portal.SystemException {
266         return getPersistence()
267                    .findByC_C_C_PrevAndNext(subscriptionId, companyId,
268             classNameId, classPK, orderByComparator);
269     }
270 
271     public static com.liferay.portal.model.Subscription findByC_U_C_C(
272         long companyId, long userId, long classNameId, long classPK)
273         throws com.liferay.portal.NoSuchSubscriptionException,
274             com.liferay.portal.SystemException {
275         return getPersistence()
276                    .findByC_U_C_C(companyId, userId, classNameId, classPK);
277     }
278 
279     public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
280         long companyId, long userId, long classNameId, long classPK)
281         throws com.liferay.portal.SystemException {
282         return getPersistence()
283                    .fetchByC_U_C_C(companyId, userId, classNameId, classPK);
284     }
285 
286     public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
287         long companyId, long userId, long classNameId, long classPK,
288         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
289         return getPersistence()
290                    .fetchByC_U_C_C(companyId, userId, classNameId, classPK,
291             retrieveFromCache);
292     }
293 
294     public static java.util.List<com.liferay.portal.model.Subscription> findAll()
295         throws com.liferay.portal.SystemException {
296         return getPersistence().findAll();
297     }
298 
299     public static java.util.List<com.liferay.portal.model.Subscription> findAll(
300         int start, int end) throws com.liferay.portal.SystemException {
301         return getPersistence().findAll(start, end);
302     }
303 
304     public static java.util.List<com.liferay.portal.model.Subscription> findAll(
305         int start, int end,
306         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307         throws com.liferay.portal.SystemException {
308         return getPersistence().findAll(start, end, orderByComparator);
309     }
310 
311     public static void removeByUserId(long userId)
312         throws com.liferay.portal.SystemException {
313         getPersistence().removeByUserId(userId);
314     }
315 
316     public static void removeByU_C(long userId, long classNameId)
317         throws com.liferay.portal.SystemException {
318         getPersistence().removeByU_C(userId, classNameId);
319     }
320 
321     public static void removeByC_C_C(long companyId, long classNameId,
322         long classPK) throws com.liferay.portal.SystemException {
323         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
324     }
325 
326     public static void removeByC_U_C_C(long companyId, long userId,
327         long classNameId, long classPK)
328         throws com.liferay.portal.NoSuchSubscriptionException,
329             com.liferay.portal.SystemException {
330         getPersistence().removeByC_U_C_C(companyId, userId, classNameId, classPK);
331     }
332 
333     public static void removeAll() throws com.liferay.portal.SystemException {
334         getPersistence().removeAll();
335     }
336 
337     public static int countByUserId(long userId)
338         throws com.liferay.portal.SystemException {
339         return getPersistence().countByUserId(userId);
340     }
341 
342     public static int countByU_C(long userId, long classNameId)
343         throws com.liferay.portal.SystemException {
344         return getPersistence().countByU_C(userId, classNameId);
345     }
346 
347     public static int countByC_C_C(long companyId, long classNameId,
348         long classPK) throws com.liferay.portal.SystemException {
349         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
350     }
351 
352     public static int countByC_U_C_C(long companyId, long userId,
353         long classNameId, long classPK)
354         throws com.liferay.portal.SystemException {
355         return getPersistence()
356                    .countByC_U_C_C(companyId, userId, classNameId, classPK);
357     }
358 
359     public static int countAll() throws com.liferay.portal.SystemException {
360         return getPersistence().countAll();
361     }
362 
363     public static SubscriptionPersistence getPersistence() {
364         if (_persistence == null) {
365             _persistence = (SubscriptionPersistence)PortalBeanLocatorUtil.locate(SubscriptionPersistence.class.getName());
366         }
367 
368         return _persistence;
369     }
370 
371     public void setPersistence(SubscriptionPersistence persistence) {
372         _persistence = persistence;
373     }
374 
375     private static SubscriptionPersistence _persistence;
376 }