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;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="SubscriptionLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link SubscriptionLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       SubscriptionLocalService
37   * @generated
38   */
39  public class SubscriptionLocalServiceUtil {
40      public static com.liferay.portal.model.Subscription addSubscription(
41          com.liferay.portal.model.Subscription subscription)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addSubscription(subscription);
44      }
45  
46      public static com.liferay.portal.model.Subscription createSubscription(
47          long subscriptionId) {
48          return getService().createSubscription(subscriptionId);
49      }
50  
51      public static void deleteSubscription(long subscriptionId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteSubscription(subscriptionId);
55      }
56  
57      public static void deleteSubscription(
58          com.liferay.portal.model.Subscription subscription)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteSubscription(subscription);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static com.liferay.portal.model.Subscription getSubscription(
76          long subscriptionId)
77          throws com.liferay.portal.kernel.exception.PortalException,
78              com.liferay.portal.kernel.exception.SystemException {
79          return getService().getSubscription(subscriptionId);
80      }
81  
82      public static java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
83          int start, int end)
84          throws com.liferay.portal.kernel.exception.SystemException {
85          return getService().getSubscriptions(start, end);
86      }
87  
88      public static int getSubscriptionsCount()
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().getSubscriptionsCount();
91      }
92  
93      public static com.liferay.portal.model.Subscription updateSubscription(
94          com.liferay.portal.model.Subscription subscription)
95          throws com.liferay.portal.kernel.exception.SystemException {
96          return getService().updateSubscription(subscription);
97      }
98  
99      public static com.liferay.portal.model.Subscription updateSubscription(
100         com.liferay.portal.model.Subscription subscription, boolean merge)
101         throws com.liferay.portal.kernel.exception.SystemException {
102         return getService().updateSubscription(subscription, merge);
103     }
104 
105     public static com.liferay.portal.model.Subscription addSubscription(
106         long userId, java.lang.String className, long classPK)
107         throws com.liferay.portal.kernel.exception.PortalException,
108             com.liferay.portal.kernel.exception.SystemException {
109         return getService().addSubscription(userId, className, classPK);
110     }
111 
112     public static com.liferay.portal.model.Subscription addSubscription(
113         long userId, java.lang.String className, long classPK,
114         java.lang.String frequency)
115         throws com.liferay.portal.kernel.exception.PortalException,
116             com.liferay.portal.kernel.exception.SystemException {
117         return getService()
118                    .addSubscription(userId, className, classPK, frequency);
119     }
120 
121     public static void deleteSubscription(long userId,
122         java.lang.String className, long classPK)
123         throws com.liferay.portal.kernel.exception.PortalException,
124             com.liferay.portal.kernel.exception.SystemException {
125         getService().deleteSubscription(userId, className, classPK);
126     }
127 
128     public static void deleteSubscriptions(long userId)
129         throws com.liferay.portal.kernel.exception.SystemException {
130         getService().deleteSubscriptions(userId);
131     }
132 
133     public static void deleteSubscriptions(long companyId,
134         java.lang.String className, long classPK)
135         throws com.liferay.portal.kernel.exception.SystemException {
136         getService().deleteSubscriptions(companyId, className, classPK);
137     }
138 
139     public static com.liferay.portal.model.Subscription getSubscription(
140         long companyId, long userId, java.lang.String className, long classPK)
141         throws com.liferay.portal.kernel.exception.PortalException,
142             com.liferay.portal.kernel.exception.SystemException {
143         return getService()
144                    .getSubscription(companyId, userId, className, classPK);
145     }
146 
147     public static java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
148         long companyId, java.lang.String className, long classPK)
149         throws com.liferay.portal.kernel.exception.SystemException {
150         return getService().getSubscriptions(companyId, className, classPK);
151     }
152 
153     public static java.util.List<com.liferay.portal.model.Subscription> getUserSubscriptions(
154         long userId, java.lang.String className)
155         throws com.liferay.portal.kernel.exception.SystemException {
156         return getService().getUserSubscriptions(userId, className);
157     }
158 
159     public static boolean isSubscribed(long companyId, long userId,
160         java.lang.String className, long classPK)
161         throws com.liferay.portal.kernel.exception.SystemException {
162         return getService().isSubscribed(companyId, userId, className, classPK);
163     }
164 
165     public static SubscriptionLocalService getService() {
166         if (_service == null) {
167             _service = (SubscriptionLocalService)PortalBeanLocatorUtil.locate(SubscriptionLocalService.class.getName());
168         }
169 
170         return _service;
171     }
172 
173     public void setService(SubscriptionLocalService service) {
174         _service = service;
175     }
176 
177     private static SubscriptionLocalService _service;
178 }