1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.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  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#clearCache(Subscription)
47       */
48      public static void clearCache(Subscription subscription) {
49          getPersistence().clearCache(subscription);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<Subscription> findWithDynamicQuery(
64          DynamicQuery dynamicQuery) throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<Subscription> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static Subscription remove(Subscription subscription)
81          throws SystemException {
82          return getPersistence().remove(subscription);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static Subscription update(Subscription subscription, boolean merge)
89          throws SystemException {
90          return getPersistence().update(subscription, merge);
91      }
92  
93      public static void cacheResult(
94          com.liferay.portal.model.Subscription subscription) {
95          getPersistence().cacheResult(subscription);
96      }
97  
98      public static void cacheResult(
99          java.util.List<com.liferay.portal.model.Subscription> subscriptions) {
100         getPersistence().cacheResult(subscriptions);
101     }
102 
103     public static com.liferay.portal.model.Subscription create(
104         long subscriptionId) {
105         return getPersistence().create(subscriptionId);
106     }
107 
108     public static com.liferay.portal.model.Subscription remove(
109         long subscriptionId)
110         throws com.liferay.portal.NoSuchSubscriptionException,
111             com.liferay.portal.kernel.exception.SystemException {
112         return getPersistence().remove(subscriptionId);
113     }
114 
115     public static com.liferay.portal.model.Subscription updateImpl(
116         com.liferay.portal.model.Subscription subscription, boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getPersistence().updateImpl(subscription, merge);
119     }
120 
121     public static com.liferay.portal.model.Subscription findByPrimaryKey(
122         long subscriptionId)
123         throws com.liferay.portal.NoSuchSubscriptionException,
124             com.liferay.portal.kernel.exception.SystemException {
125         return getPersistence().findByPrimaryKey(subscriptionId);
126     }
127 
128     public static com.liferay.portal.model.Subscription fetchByPrimaryKey(
129         long subscriptionId)
130         throws com.liferay.portal.kernel.exception.SystemException {
131         return getPersistence().fetchByPrimaryKey(subscriptionId);
132     }
133 
134     public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
135         long userId) throws com.liferay.portal.kernel.exception.SystemException {
136         return getPersistence().findByUserId(userId);
137     }
138 
139     public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
140         long userId, int start, int end)
141         throws com.liferay.portal.kernel.exception.SystemException {
142         return getPersistence().findByUserId(userId, start, end);
143     }
144 
145     public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
146         long userId, int start, int end,
147         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
148         throws com.liferay.portal.kernel.exception.SystemException {
149         return getPersistence()
150                    .findByUserId(userId, start, end, orderByComparator);
151     }
152 
153     public static com.liferay.portal.model.Subscription findByUserId_First(
154         long userId,
155         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156         throws com.liferay.portal.NoSuchSubscriptionException,
157             com.liferay.portal.kernel.exception.SystemException {
158         return getPersistence().findByUserId_First(userId, orderByComparator);
159     }
160 
161     public static com.liferay.portal.model.Subscription findByUserId_Last(
162         long userId,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.NoSuchSubscriptionException,
165             com.liferay.portal.kernel.exception.SystemException {
166         return getPersistence().findByUserId_Last(userId, orderByComparator);
167     }
168 
169     public static com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
170         long subscriptionId, long userId,
171         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172         throws com.liferay.portal.NoSuchSubscriptionException,
173             com.liferay.portal.kernel.exception.SystemException {
174         return getPersistence()
175                    .findByUserId_PrevAndNext(subscriptionId, userId,
176             orderByComparator);
177     }
178 
179     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
180         long userId, long classNameId)
181         throws com.liferay.portal.kernel.exception.SystemException {
182         return getPersistence().findByU_C(userId, classNameId);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
186         long userId, long classNameId, int start, int end)
187         throws com.liferay.portal.kernel.exception.SystemException {
188         return getPersistence().findByU_C(userId, classNameId, start, end);
189     }
190 
191     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
192         long userId, long classNameId, int start, int end,
193         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194         throws com.liferay.portal.kernel.exception.SystemException {
195         return getPersistence()
196                    .findByU_C(userId, classNameId, start, end, orderByComparator);
197     }
198 
199     public static com.liferay.portal.model.Subscription findByU_C_First(
200         long userId, long classNameId,
201         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202         throws com.liferay.portal.NoSuchSubscriptionException,
203             com.liferay.portal.kernel.exception.SystemException {
204         return getPersistence()
205                    .findByU_C_First(userId, classNameId, orderByComparator);
206     }
207 
208     public static com.liferay.portal.model.Subscription findByU_C_Last(
209         long userId, long classNameId,
210         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211         throws com.liferay.portal.NoSuchSubscriptionException,
212             com.liferay.portal.kernel.exception.SystemException {
213         return getPersistence()
214                    .findByU_C_Last(userId, classNameId, orderByComparator);
215     }
216 
217     public static com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext(
218         long subscriptionId, long userId, long classNameId,
219         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
220         throws com.liferay.portal.NoSuchSubscriptionException,
221             com.liferay.portal.kernel.exception.SystemException {
222         return getPersistence()
223                    .findByU_C_PrevAndNext(subscriptionId, userId, classNameId,
224             orderByComparator);
225     }
226 
227     public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
228         long companyId, long classNameId, long classPK)
229         throws com.liferay.portal.kernel.exception.SystemException {
230         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
231     }
232 
233     public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
234         long companyId, long classNameId, long classPK, int start, int end)
235         throws com.liferay.portal.kernel.exception.SystemException {
236         return getPersistence()
237                    .findByC_C_C(companyId, classNameId, classPK, start, end);
238     }
239 
240     public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
241         long companyId, long classNameId, long classPK, int start, int end,
242         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243         throws com.liferay.portal.kernel.exception.SystemException {
244         return getPersistence()
245                    .findByC_C_C(companyId, classNameId, classPK, start, end,
246             orderByComparator);
247     }
248 
249     public static com.liferay.portal.model.Subscription findByC_C_C_First(
250         long companyId, long classNameId, long classPK,
251         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252         throws com.liferay.portal.NoSuchSubscriptionException,
253             com.liferay.portal.kernel.exception.SystemException {
254         return getPersistence()
255                    .findByC_C_C_First(companyId, classNameId, classPK,
256             orderByComparator);
257     }
258 
259     public static com.liferay.portal.model.Subscription findByC_C_C_Last(
260         long companyId, long classNameId, long classPK,
261         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
262         throws com.liferay.portal.NoSuchSubscriptionException,
263             com.liferay.portal.kernel.exception.SystemException {
264         return getPersistence()
265                    .findByC_C_C_Last(companyId, classNameId, classPK,
266             orderByComparator);
267     }
268 
269     public static com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
270         long subscriptionId, long companyId, long classNameId, long classPK,
271         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272         throws com.liferay.portal.NoSuchSubscriptionException,
273             com.liferay.portal.kernel.exception.SystemException {
274         return getPersistence()
275                    .findByC_C_C_PrevAndNext(subscriptionId, companyId,
276             classNameId, classPK, orderByComparator);
277     }
278 
279     public static com.liferay.portal.model.Subscription findByC_U_C_C(
280         long companyId, long userId, long classNameId, long classPK)
281         throws com.liferay.portal.NoSuchSubscriptionException,
282             com.liferay.portal.kernel.exception.SystemException {
283         return getPersistence()
284                    .findByC_U_C_C(companyId, userId, classNameId, classPK);
285     }
286 
287     public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
288         long companyId, long userId, long classNameId, long classPK)
289         throws com.liferay.portal.kernel.exception.SystemException {
290         return getPersistence()
291                    .fetchByC_U_C_C(companyId, userId, classNameId, classPK);
292     }
293 
294     public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
295         long companyId, long userId, long classNameId, long classPK,
296         boolean retrieveFromCache)
297         throws com.liferay.portal.kernel.exception.SystemException {
298         return getPersistence()
299                    .fetchByC_U_C_C(companyId, userId, classNameId, classPK,
300             retrieveFromCache);
301     }
302 
303     public static java.util.List<com.liferay.portal.model.Subscription> findAll()
304         throws com.liferay.portal.kernel.exception.SystemException {
305         return getPersistence().findAll();
306     }
307 
308     public static java.util.List<com.liferay.portal.model.Subscription> findAll(
309         int start, int end)
310         throws com.liferay.portal.kernel.exception.SystemException {
311         return getPersistence().findAll(start, end);
312     }
313 
314     public static java.util.List<com.liferay.portal.model.Subscription> findAll(
315         int start, int end,
316         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
317         throws com.liferay.portal.kernel.exception.SystemException {
318         return getPersistence().findAll(start, end, orderByComparator);
319     }
320 
321     public static void removeByUserId(long userId)
322         throws com.liferay.portal.kernel.exception.SystemException {
323         getPersistence().removeByUserId(userId);
324     }
325 
326     public static void removeByU_C(long userId, long classNameId)
327         throws com.liferay.portal.kernel.exception.SystemException {
328         getPersistence().removeByU_C(userId, classNameId);
329     }
330 
331     public static void removeByC_C_C(long companyId, long classNameId,
332         long classPK)
333         throws com.liferay.portal.kernel.exception.SystemException {
334         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
335     }
336 
337     public static void removeByC_U_C_C(long companyId, long userId,
338         long classNameId, long classPK)
339         throws com.liferay.portal.NoSuchSubscriptionException,
340             com.liferay.portal.kernel.exception.SystemException {
341         getPersistence().removeByC_U_C_C(companyId, userId, classNameId, classPK);
342     }
343 
344     public static void removeAll()
345         throws com.liferay.portal.kernel.exception.SystemException {
346         getPersistence().removeAll();
347     }
348 
349     public static int countByUserId(long userId)
350         throws com.liferay.portal.kernel.exception.SystemException {
351         return getPersistence().countByUserId(userId);
352     }
353 
354     public static int countByU_C(long userId, long classNameId)
355         throws com.liferay.portal.kernel.exception.SystemException {
356         return getPersistence().countByU_C(userId, classNameId);
357     }
358 
359     public static int countByC_C_C(long companyId, long classNameId,
360         long classPK)
361         throws com.liferay.portal.kernel.exception.SystemException {
362         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
363     }
364 
365     public static int countByC_U_C_C(long companyId, long userId,
366         long classNameId, long classPK)
367         throws com.liferay.portal.kernel.exception.SystemException {
368         return getPersistence()
369                    .countByC_U_C_C(companyId, userId, classNameId, classPK);
370     }
371 
372     public static int countAll()
373         throws com.liferay.portal.kernel.exception.SystemException {
374         return getPersistence().countAll();
375     }
376 
377     public static SubscriptionPersistence getPersistence() {
378         if (_persistence == null) {
379             _persistence = (SubscriptionPersistence)PortalBeanLocatorUtil.locate(SubscriptionPersistence.class.getName());
380         }
381 
382         return _persistence;
383     }
384 
385     public void setPersistence(SubscriptionPersistence persistence) {
386         _persistence = persistence;
387     }
388 
389     private static SubscriptionPersistence _persistence;
390 }