001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link SubscriptionLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       SubscriptionLocalService
030     * @generated
031     */
032    public class SubscriptionLocalServiceUtil {
033            public static com.liferay.portal.model.Subscription addSubscription(
034                    com.liferay.portal.model.Subscription subscription)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addSubscription(subscription);
037            }
038    
039            public static com.liferay.portal.model.Subscription createSubscription(
040                    long subscriptionId) {
041                    return getService().createSubscription(subscriptionId);
042            }
043    
044            public static void deleteSubscription(long subscriptionId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteSubscription(subscriptionId);
048            }
049    
050            public static void deleteSubscription(
051                    com.liferay.portal.model.Subscription subscription)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteSubscription(subscription);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portal.model.Subscription getSubscription(
087                    long subscriptionId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getSubscription(subscriptionId);
091            }
092    
093            public static java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
094                    int start, int end)
095                    throws com.liferay.portal.kernel.exception.SystemException {
096                    return getService().getSubscriptions(start, end);
097            }
098    
099            public static int getSubscriptionsCount()
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().getSubscriptionsCount();
102            }
103    
104            public static com.liferay.portal.model.Subscription updateSubscription(
105                    com.liferay.portal.model.Subscription subscription)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().updateSubscription(subscription);
108            }
109    
110            public static com.liferay.portal.model.Subscription updateSubscription(
111                    com.liferay.portal.model.Subscription subscription, boolean merge)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getService().updateSubscription(subscription, merge);
114            }
115    
116            public static com.liferay.portal.model.Subscription addSubscription(
117                    long userId, java.lang.String className, long classPK)
118                    throws com.liferay.portal.kernel.exception.PortalException,
119                            com.liferay.portal.kernel.exception.SystemException {
120                    return getService().addSubscription(userId, className, classPK);
121            }
122    
123            public static com.liferay.portal.model.Subscription addSubscription(
124                    long userId, java.lang.String className, long classPK,
125                    java.lang.String frequency)
126                    throws com.liferay.portal.kernel.exception.PortalException,
127                            com.liferay.portal.kernel.exception.SystemException {
128                    return getService()
129                                       .addSubscription(userId, className, classPK, frequency);
130            }
131    
132            public static void deleteSubscription(long userId,
133                    java.lang.String className, long classPK)
134                    throws com.liferay.portal.kernel.exception.PortalException,
135                            com.liferay.portal.kernel.exception.SystemException {
136                    getService().deleteSubscription(userId, className, classPK);
137            }
138    
139            public static void deleteSubscriptions(long userId)
140                    throws com.liferay.portal.kernel.exception.SystemException {
141                    getService().deleteSubscriptions(userId);
142            }
143    
144            public static void deleteSubscriptions(long companyId,
145                    java.lang.String className, long classPK)
146                    throws com.liferay.portal.kernel.exception.SystemException {
147                    getService().deleteSubscriptions(companyId, className, classPK);
148            }
149    
150            public static com.liferay.portal.model.Subscription getSubscription(
151                    long companyId, long userId, java.lang.String className, long classPK)
152                    throws com.liferay.portal.kernel.exception.PortalException,
153                            com.liferay.portal.kernel.exception.SystemException {
154                    return getService()
155                                       .getSubscription(companyId, userId, className, classPK);
156            }
157    
158            public static java.util.List<com.liferay.portal.model.Subscription> getSubscriptions(
159                    long companyId, java.lang.String className, long classPK)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getService().getSubscriptions(companyId, className, classPK);
162            }
163    
164            public static java.util.List<com.liferay.portal.model.Subscription> getUserSubscriptions(
165                    long userId, java.lang.String className)
166                    throws com.liferay.portal.kernel.exception.SystemException {
167                    return getService().getUserSubscriptions(userId, className);
168            }
169    
170            public static boolean isSubscribed(long companyId, long userId,
171                    java.lang.String className, long classPK)
172                    throws com.liferay.portal.kernel.exception.SystemException {
173                    return getService().isSubscribed(companyId, userId, className, classPK);
174            }
175    
176            public static SubscriptionLocalService getService() {
177                    if (_service == null) {
178                            _service = (SubscriptionLocalService)PortalBeanLocatorUtil.locate(SubscriptionLocalService.class.getName());
179                    }
180    
181                    return _service;
182            }
183    
184            public void setService(SubscriptionLocalService service) {
185                    _service = service;
186            }
187    
188            private static SubscriptionLocalService _service;
189    }