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 obc)
140         throws com.liferay.portal.SystemException {
141         return getPersistence().findByUserId(userId, start, end, obc);
142     }
143 
144     public static com.liferay.portal.model.Subscription findByUserId_First(
145         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.NoSuchSubscriptionException,
147             com.liferay.portal.SystemException {
148         return getPersistence().findByUserId_First(userId, obc);
149     }
150 
151     public static com.liferay.portal.model.Subscription findByUserId_Last(
152         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.NoSuchSubscriptionException,
154             com.liferay.portal.SystemException {
155         return getPersistence().findByUserId_Last(userId, obc);
156     }
157 
158     public static com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
159         long subscriptionId, long userId,
160         com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.NoSuchSubscriptionException,
162             com.liferay.portal.SystemException {
163         return getPersistence()
164                    .findByUserId_PrevAndNext(subscriptionId, userId, obc);
165     }
166 
167     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
168         long userId, long classNameId)
169         throws com.liferay.portal.SystemException {
170         return getPersistence().findByU_C(userId, classNameId);
171     }
172 
173     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
174         long userId, long classNameId, int start, int end)
175         throws com.liferay.portal.SystemException {
176         return getPersistence().findByU_C(userId, classNameId, start, end);
177     }
178 
179     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
180         long userId, long classNameId, int start, int end,
181         com.liferay.portal.kernel.util.OrderByComparator obc)
182         throws com.liferay.portal.SystemException {
183         return getPersistence().findByU_C(userId, classNameId, start, end, obc);
184     }
185 
186     public static com.liferay.portal.model.Subscription findByU_C_First(
187         long userId, long classNameId,
188         com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.NoSuchSubscriptionException,
190             com.liferay.portal.SystemException {
191         return getPersistence().findByU_C_First(userId, classNameId, obc);
192     }
193 
194     public static com.liferay.portal.model.Subscription findByU_C_Last(
195         long userId, long classNameId,
196         com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.NoSuchSubscriptionException,
198             com.liferay.portal.SystemException {
199         return getPersistence().findByU_C_Last(userId, classNameId, obc);
200     }
201 
202     public static com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext(
203         long subscriptionId, long userId, long classNameId,
204         com.liferay.portal.kernel.util.OrderByComparator obc)
205         throws com.liferay.portal.NoSuchSubscriptionException,
206             com.liferay.portal.SystemException {
207         return getPersistence()
208                    .findByU_C_PrevAndNext(subscriptionId, userId, classNameId,
209             obc);
210     }
211 
212     public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
213         long companyId, long classNameId, long classPK)
214         throws com.liferay.portal.SystemException {
215         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
216     }
217 
218     public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
219         long companyId, long classNameId, long classPK, int start, int end)
220         throws com.liferay.portal.SystemException {
221         return getPersistence()
222                    .findByC_C_C(companyId, classNameId, classPK, start, end);
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         com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException {
229         return getPersistence()
230                    .findByC_C_C(companyId, classNameId, classPK, start, end, obc);
231     }
232 
233     public static com.liferay.portal.model.Subscription findByC_C_C_First(
234         long companyId, long classNameId, long classPK,
235         com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.NoSuchSubscriptionException,
237             com.liferay.portal.SystemException {
238         return getPersistence()
239                    .findByC_C_C_First(companyId, classNameId, classPK, obc);
240     }
241 
242     public static com.liferay.portal.model.Subscription findByC_C_C_Last(
243         long companyId, long classNameId, long classPK,
244         com.liferay.portal.kernel.util.OrderByComparator obc)
245         throws com.liferay.portal.NoSuchSubscriptionException,
246             com.liferay.portal.SystemException {
247         return getPersistence()
248                    .findByC_C_C_Last(companyId, classNameId, classPK, obc);
249     }
250 
251     public static com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
252         long subscriptionId, long companyId, long classNameId, long classPK,
253         com.liferay.portal.kernel.util.OrderByComparator obc)
254         throws com.liferay.portal.NoSuchSubscriptionException,
255             com.liferay.portal.SystemException {
256         return getPersistence()
257                    .findByC_C_C_PrevAndNext(subscriptionId, companyId,
258             classNameId, classPK, obc);
259     }
260 
261     public static com.liferay.portal.model.Subscription findByC_U_C_C(
262         long companyId, long userId, long classNameId, long classPK)
263         throws com.liferay.portal.NoSuchSubscriptionException,
264             com.liferay.portal.SystemException {
265         return getPersistence()
266                    .findByC_U_C_C(companyId, userId, classNameId, classPK);
267     }
268 
269     public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
270         long companyId, long userId, long classNameId, long classPK)
271         throws com.liferay.portal.SystemException {
272         return getPersistence()
273                    .fetchByC_U_C_C(companyId, userId, classNameId, classPK);
274     }
275 
276     public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
277         long companyId, long userId, long classNameId, long classPK,
278         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
279         return getPersistence()
280                    .fetchByC_U_C_C(companyId, userId, classNameId, classPK,
281             retrieveFromCache);
282     }
283 
284     public static java.util.List<com.liferay.portal.model.Subscription> findAll()
285         throws com.liferay.portal.SystemException {
286         return getPersistence().findAll();
287     }
288 
289     public static java.util.List<com.liferay.portal.model.Subscription> findAll(
290         int start, int end) throws com.liferay.portal.SystemException {
291         return getPersistence().findAll(start, end);
292     }
293 
294     public static java.util.List<com.liferay.portal.model.Subscription> findAll(
295         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
296         throws com.liferay.portal.SystemException {
297         return getPersistence().findAll(start, end, obc);
298     }
299 
300     public static void removeByUserId(long userId)
301         throws com.liferay.portal.SystemException {
302         getPersistence().removeByUserId(userId);
303     }
304 
305     public static void removeByU_C(long userId, long classNameId)
306         throws com.liferay.portal.SystemException {
307         getPersistence().removeByU_C(userId, classNameId);
308     }
309 
310     public static void removeByC_C_C(long companyId, long classNameId,
311         long classPK) throws com.liferay.portal.SystemException {
312         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
313     }
314 
315     public static void removeByC_U_C_C(long companyId, long userId,
316         long classNameId, long classPK)
317         throws com.liferay.portal.NoSuchSubscriptionException,
318             com.liferay.portal.SystemException {
319         getPersistence().removeByC_U_C_C(companyId, userId, classNameId, classPK);
320     }
321 
322     public static void removeAll() throws com.liferay.portal.SystemException {
323         getPersistence().removeAll();
324     }
325 
326     public static int countByUserId(long userId)
327         throws com.liferay.portal.SystemException {
328         return getPersistence().countByUserId(userId);
329     }
330 
331     public static int countByU_C(long userId, long classNameId)
332         throws com.liferay.portal.SystemException {
333         return getPersistence().countByU_C(userId, classNameId);
334     }
335 
336     public static int countByC_C_C(long companyId, long classNameId,
337         long classPK) throws com.liferay.portal.SystemException {
338         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
339     }
340 
341     public static int countByC_U_C_C(long companyId, long userId,
342         long classNameId, long classPK)
343         throws com.liferay.portal.SystemException {
344         return getPersistence()
345                    .countByC_U_C_C(companyId, userId, classNameId, classPK);
346     }
347 
348     public static int countAll() throws com.liferay.portal.SystemException {
349         return getPersistence().countAll();
350     }
351 
352     public static SubscriptionPersistence getPersistence() {
353         if (_persistence == null) {
354             _persistence = (SubscriptionPersistence)PortalBeanLocatorUtil.locate(SubscriptionPersistence.class.getName());
355         }
356 
357         return _persistence;
358     }
359 
360     public void setPersistence(SubscriptionPersistence persistence) {
361         _persistence = persistence;
362     }
363 
364     private static SubscriptionPersistence _persistence;
365 }