001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class SubscriptionLocalServiceUtil {
035
040
041
048 public static com.liferay.portal.model.Subscription addSubscription(
049 com.liferay.portal.model.Subscription subscription)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addSubscription(subscription);
052 }
053
054
060 public static com.liferay.portal.model.Subscription createSubscription(
061 long subscriptionId) {
062 return getService().createSubscription(subscriptionId);
063 }
064
065
072 public static void deleteSubscription(long subscriptionId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().deleteSubscription(subscriptionId);
076 }
077
078
085 public static void deleteSubscription(
086 com.liferay.portal.model.Subscription subscription)
087 throws com.liferay.portal.kernel.exception.PortalException,
088 com.liferay.portal.kernel.exception.SystemException {
089 getService().deleteSubscription(subscription);
090 }
091
092
099 @SuppressWarnings("rawtypes")
100 public static java.util.List dynamicQuery(
101 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
102 throws com.liferay.portal.kernel.exception.SystemException {
103 return getService().dynamicQuery(dynamicQuery);
104 }
105
106
119 @SuppressWarnings("rawtypes")
120 public static java.util.List dynamicQuery(
121 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
122 int end) throws com.liferay.portal.kernel.exception.SystemException {
123 return getService().dynamicQuery(dynamicQuery, start, end);
124 }
125
126
140 @SuppressWarnings("rawtypes")
141 public static java.util.List dynamicQuery(
142 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
143 int end,
144 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
145 throws com.liferay.portal.kernel.exception.SystemException {
146 return getService()
147 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
148 }
149
150
157 public static long dynamicQueryCount(
158 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
159 throws com.liferay.portal.kernel.exception.SystemException {
160 return getService().dynamicQueryCount(dynamicQuery);
161 }
162
163 public static com.liferay.portal.model.Subscription fetchSubscription(
164 long subscriptionId)
165 throws com.liferay.portal.kernel.exception.SystemException {
166 return getService().fetchSubscription(subscriptionId);
167 }
168
169
177 public static com.liferay.portal.model.Subscription getSubscription(
178 long subscriptionId)
179 throws com.liferay.portal.kernel.exception.PortalException,
180 com.liferay.portal.kernel.exception.SystemException {
181 return getService().getSubscription(subscriptionId);
182 }
183
184 public static com.liferay.portal.model.PersistedModel getPersistedModel(
185 java.io.Serializable primaryKeyObj)
186 throws com.liferay.portal.kernel.exception.PortalException,
187 com.liferay.portal.kernel.exception.SystemException {
188 return getService().getPersistedModel(primaryKeyObj);
189 }
190
191
203 public static java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
204 int start, int end)
205 throws com.liferay.portal.kernel.exception.SystemException {
206 return getService().getSubscriptions(start, end);
207 }
208
209
215 public static int getSubscriptionsCount()
216 throws com.liferay.portal.kernel.exception.SystemException {
217 return getService().getSubscriptionsCount();
218 }
219
220
227 public static com.liferay.portal.model.Subscription updateSubscription(
228 com.liferay.portal.model.Subscription subscription)
229 throws com.liferay.portal.kernel.exception.SystemException {
230 return getService().updateSubscription(subscription);
231 }
232
233
241 public static com.liferay.portal.model.Subscription updateSubscription(
242 com.liferay.portal.model.Subscription subscription, boolean merge)
243 throws com.liferay.portal.kernel.exception.SystemException {
244 return getService().updateSubscription(subscription, merge);
245 }
246
247
252 public static java.lang.String getBeanIdentifier() {
253 return getService().getBeanIdentifier();
254 }
255
256
261 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
262 getService().setBeanIdentifier(beanIdentifier);
263 }
264
265 public static com.liferay.portal.model.Subscription addSubscription(
266 long userId, long groupId, java.lang.String className, long classPK)
267 throws com.liferay.portal.kernel.exception.PortalException,
268 com.liferay.portal.kernel.exception.SystemException {
269 return getService().addSubscription(userId, groupId, className, classPK);
270 }
271
272 public static com.liferay.portal.model.Subscription addSubscription(
273 long userId, long groupId, java.lang.String className, long classPK,
274 java.lang.String frequency)
275 throws com.liferay.portal.kernel.exception.PortalException,
276 com.liferay.portal.kernel.exception.SystemException {
277 return getService()
278 .addSubscription(userId, groupId, className, classPK,
279 frequency);
280 }
281
282 public static void deleteSubscription(long userId,
283 java.lang.String className, long classPK)
284 throws com.liferay.portal.kernel.exception.PortalException,
285 com.liferay.portal.kernel.exception.SystemException {
286 getService().deleteSubscription(userId, className, classPK);
287 }
288
289 public static void deleteSubscriptions(long userId)
290 throws com.liferay.portal.kernel.exception.PortalException,
291 com.liferay.portal.kernel.exception.SystemException {
292 getService().deleteSubscriptions(userId);
293 }
294
295 public static void deleteSubscriptions(long companyId,
296 java.lang.String className, long classPK)
297 throws com.liferay.portal.kernel.exception.PortalException,
298 com.liferay.portal.kernel.exception.SystemException {
299 getService().deleteSubscriptions(companyId, className, classPK);
300 }
301
302 public static com.liferay.portal.model.Subscription getSubscription(
303 long companyId, long userId, java.lang.String className, long classPK)
304 throws com.liferay.portal.kernel.exception.PortalException,
305 com.liferay.portal.kernel.exception.SystemException {
306 return getService()
307 .getSubscription(companyId, userId, className, classPK);
308 }
309
310 public static java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
311 long companyId, java.lang.String className, long classPK)
312 throws com.liferay.portal.kernel.exception.SystemException {
313 return getService().getSubscriptions(companyId, className, classPK);
314 }
315
316 public static java.util.List<com.liferay.portal.model.Subscription> getUserSubscriptions(
317 long userId, int start, int end,
318 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
319 throws com.liferay.portal.kernel.exception.SystemException {
320 return getService()
321 .getUserSubscriptions(userId, start, end, orderByComparator);
322 }
323
324 public static java.util.List<com.liferay.portal.model.Subscription> getUserSubscriptions(
325 long userId, java.lang.String className)
326 throws com.liferay.portal.kernel.exception.SystemException {
327 return getService().getUserSubscriptions(userId, className);
328 }
329
330 public static int getUserSubscriptionsCount(long userId)
331 throws com.liferay.portal.kernel.exception.SystemException {
332 return getService().getUserSubscriptionsCount(userId);
333 }
334
335 public static boolean isSubscribed(long companyId, long userId,
336 java.lang.String className, long classPK)
337 throws com.liferay.portal.kernel.exception.SystemException {
338 return getService().isSubscribed(companyId, userId, className, classPK);
339 }
340
341 public static SubscriptionLocalService getService() {
342 if (_service == null) {
343 _service = (SubscriptionLocalService)PortalBeanLocatorUtil.locate(SubscriptionLocalService.class.getName());
344
345 ReferenceRegistry.registerReference(SubscriptionLocalServiceUtil.class,
346 "_service");
347 MethodCache.remove(SubscriptionLocalService.class);
348 }
349
350 return _service;
351 }
352
353 public void setService(SubscriptionLocalService service) {
354 MethodCache.remove(SubscriptionLocalService.class);
355
356 _service = service;
357
358 ReferenceRegistry.registerReference(SubscriptionLocalServiceUtil.class,
359 "_service");
360 MethodCache.remove(SubscriptionLocalService.class);
361 }
362
363 private static SubscriptionLocalService _service;
364 }