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