1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  
26  /**
27   * <a href="SubscriptionUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       SubscriptionPersistence
36   * @see       SubscriptionPersistenceImpl
37   * @generated
38   */
39  public class SubscriptionUtil {
40      public static void cacheResult(
41          com.liferay.portal.model.Subscription subscription) {
42          getPersistence().cacheResult(subscription);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portal.model.Subscription> subscriptions) {
47          getPersistence().cacheResult(subscriptions);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portal.model.Subscription create(
55          long subscriptionId) {
56          return getPersistence().create(subscriptionId);
57      }
58  
59      public static com.liferay.portal.model.Subscription remove(
60          long subscriptionId)
61          throws com.liferay.portal.NoSuchSubscriptionException,
62              com.liferay.portal.SystemException {
63          return getPersistence().remove(subscriptionId);
64      }
65  
66      public static com.liferay.portal.model.Subscription remove(
67          com.liferay.portal.model.Subscription subscription)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(subscription);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(Subscription, boolean merge)}.
74       */
75      public static com.liferay.portal.model.Subscription update(
76          com.liferay.portal.model.Subscription subscription)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(subscription);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  subscription the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when subscription is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portal.model.Subscription update(
94          com.liferay.portal.model.Subscription subscription, boolean merge)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().update(subscription, merge);
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.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.SystemException {
109         return getPersistence().findByPrimaryKey(subscriptionId);
110     }
111 
112     public static com.liferay.portal.model.Subscription fetchByPrimaryKey(
113         long subscriptionId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(subscriptionId);
115     }
116 
117     public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
118         long userId) throws com.liferay.portal.SystemException {
119         return getPersistence().findByUserId(userId);
120     }
121 
122     public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
123         long userId, int start, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByUserId(userId, start, end);
126     }
127 
128     public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
129         long userId, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByUserId(userId, start, end, obc);
133     }
134 
135     public static com.liferay.portal.model.Subscription findByUserId_First(
136         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.NoSuchSubscriptionException,
138             com.liferay.portal.SystemException {
139         return getPersistence().findByUserId_First(userId, obc);
140     }
141 
142     public static com.liferay.portal.model.Subscription findByUserId_Last(
143         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.NoSuchSubscriptionException,
145             com.liferay.portal.SystemException {
146         return getPersistence().findByUserId_Last(userId, obc);
147     }
148 
149     public static com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
150         long subscriptionId, long userId,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.NoSuchSubscriptionException,
153             com.liferay.portal.SystemException {
154         return getPersistence()
155                    .findByUserId_PrevAndNext(subscriptionId, userId, obc);
156     }
157 
158     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
159         long userId, long classNameId)
160         throws com.liferay.portal.SystemException {
161         return getPersistence().findByU_C(userId, classNameId);
162     }
163 
164     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
165         long userId, long classNameId, int start, int end)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findByU_C(userId, classNameId, start, end);
168     }
169 
170     public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
171         long userId, long classNameId, int start, int end,
172         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findByU_C(userId, classNameId, start, end, obc);
175     }
176 
177     public static com.liferay.portal.model.Subscription findByU_C_First(
178         long userId, long classNameId,
179         com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.NoSuchSubscriptionException,
181             com.liferay.portal.SystemException {
182         return getPersistence().findByU_C_First(userId, classNameId, obc);
183     }
184 
185     public static com.liferay.portal.model.Subscription findByU_C_Last(
186         long userId, long classNameId,
187         com.liferay.portal.kernel.util.OrderByComparator obc)
188         throws com.liferay.portal.NoSuchSubscriptionException,
189             com.liferay.portal.SystemException {
190         return getPersistence().findByU_C_Last(userId, classNameId, obc);
191     }
192 
193     public static com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext(
194         long subscriptionId, long userId, long classNameId,
195         com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.NoSuchSubscriptionException,
197             com.liferay.portal.SystemException {
198         return getPersistence()
199                    .findByU_C_PrevAndNext(subscriptionId, userId, classNameId,
200             obc);
201     }
202 
203     public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
204         long companyId, long classNameId, long classPK)
205         throws com.liferay.portal.SystemException {
206         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
207     }
208 
209     public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
210         long companyId, long classNameId, long classPK, int start, int end)
211         throws com.liferay.portal.SystemException {
212         return getPersistence()
213                    .findByC_C_C(companyId, classNameId, classPK, start, end);
214     }
215 
216     public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
217         long companyId, long classNameId, long classPK, int start, int end,
218         com.liferay.portal.kernel.util.OrderByComparator obc)
219         throws com.liferay.portal.SystemException {
220         return getPersistence()
221                    .findByC_C_C(companyId, classNameId, classPK, start, end, obc);
222     }
223 
224     public static com.liferay.portal.model.Subscription findByC_C_C_First(
225         long companyId, long classNameId, long classPK,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.NoSuchSubscriptionException,
228             com.liferay.portal.SystemException {
229         return getPersistence()
230                    .findByC_C_C_First(companyId, classNameId, classPK, obc);
231     }
232 
233     public static com.liferay.portal.model.Subscription findByC_C_C_Last(
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_Last(companyId, classNameId, classPK, obc);
240     }
241 
242     public static com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
243         long subscriptionId, 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_PrevAndNext(subscriptionId, companyId,
249             classNameId, classPK, obc);
250     }
251 
252     public static com.liferay.portal.model.Subscription findByC_U_C_C(
253         long companyId, long userId, long classNameId, long classPK)
254         throws com.liferay.portal.NoSuchSubscriptionException,
255             com.liferay.portal.SystemException {
256         return getPersistence()
257                    .findByC_U_C_C(companyId, userId, classNameId, classPK);
258     }
259 
260     public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
261         long companyId, long userId, long classNameId, long classPK)
262         throws com.liferay.portal.SystemException {
263         return getPersistence()
264                    .fetchByC_U_C_C(companyId, userId, classNameId, classPK);
265     }
266 
267     public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
268         long companyId, long userId, long classNameId, long classPK,
269         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
270         return getPersistence()
271                    .fetchByC_U_C_C(companyId, userId, classNameId, classPK,
272             retrieveFromCache);
273     }
274 
275     public static java.util.List<Object> findWithDynamicQuery(
276         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
277         throws com.liferay.portal.SystemException {
278         return getPersistence().findWithDynamicQuery(dynamicQuery);
279     }
280 
281     public static java.util.List<Object> findWithDynamicQuery(
282         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
283         int end) throws com.liferay.portal.SystemException {
284         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
285     }
286 
287     public static java.util.List<com.liferay.portal.model.Subscription> findAll()
288         throws com.liferay.portal.SystemException {
289         return getPersistence().findAll();
290     }
291 
292     public static java.util.List<com.liferay.portal.model.Subscription> findAll(
293         int start, int end) throws com.liferay.portal.SystemException {
294         return getPersistence().findAll(start, end);
295     }
296 
297     public static java.util.List<com.liferay.portal.model.Subscription> findAll(
298         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
299         throws com.liferay.portal.SystemException {
300         return getPersistence().findAll(start, end, obc);
301     }
302 
303     public static void removeByUserId(long userId)
304         throws com.liferay.portal.SystemException {
305         getPersistence().removeByUserId(userId);
306     }
307 
308     public static void removeByU_C(long userId, long classNameId)
309         throws com.liferay.portal.SystemException {
310         getPersistence().removeByU_C(userId, classNameId);
311     }
312 
313     public static void removeByC_C_C(long companyId, long classNameId,
314         long classPK) throws com.liferay.portal.SystemException {
315         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
316     }
317 
318     public static void removeByC_U_C_C(long companyId, long userId,
319         long classNameId, long classPK)
320         throws com.liferay.portal.NoSuchSubscriptionException,
321             com.liferay.portal.SystemException {
322         getPersistence().removeByC_U_C_C(companyId, userId, classNameId, classPK);
323     }
324 
325     public static void removeAll() throws com.liferay.portal.SystemException {
326         getPersistence().removeAll();
327     }
328 
329     public static int countByUserId(long userId)
330         throws com.liferay.portal.SystemException {
331         return getPersistence().countByUserId(userId);
332     }
333 
334     public static int countByU_C(long userId, long classNameId)
335         throws com.liferay.portal.SystemException {
336         return getPersistence().countByU_C(userId, classNameId);
337     }
338 
339     public static int countByC_C_C(long companyId, long classNameId,
340         long classPK) throws com.liferay.portal.SystemException {
341         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
342     }
343 
344     public static int countByC_U_C_C(long companyId, long userId,
345         long classNameId, long classPK)
346         throws com.liferay.portal.SystemException {
347         return getPersistence()
348                    .countByC_U_C_C(companyId, userId, classNameId, classPK);
349     }
350 
351     public static int countAll() throws com.liferay.portal.SystemException {
352         return getPersistence().countAll();
353     }
354 
355     public static SubscriptionPersistence getPersistence() {
356         return _persistence;
357     }
358 
359     public void setPersistence(SubscriptionPersistence persistence) {
360         _persistence = persistence;
361     }
362 
363     private static SubscriptionPersistence _persistence;
364 }