001    /**
002     * Copyright (c) 2000-2011 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.portlet.mobiledevicerules.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    /**
022     * The utility for the m d r rule group instance remote service. This utility wraps {@link com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleGroupInstanceServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Edward C. Han
029     * @see MDRRuleGroupInstanceService
030     * @see com.liferay.portlet.mobiledevicerules.service.base.MDRRuleGroupInstanceServiceBaseImpl
031     * @see com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleGroupInstanceServiceImpl
032     * @generated
033     */
034    public class MDRRuleGroupInstanceServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleGroupInstanceServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance addRuleGroupInstance(
041                    long groupId, java.lang.String className, long classPK,
042                    long ruleGroupId, int priority,
043                    com.liferay.portal.service.ServiceContext serviceContext)
044                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException {
046                    return getService()
047                                       .addRuleGroupInstance(groupId, className, classPK,
048                            ruleGroupId, priority, serviceContext);
049            }
050    
051            public static void deleteRuleGroupInstance(long ruleGroupInstanceId)
052                    throws com.liferay.portal.kernel.exception.PortalException,
053                            com.liferay.portal.kernel.exception.SystemException {
054                    getService().deleteRuleGroupInstance(ruleGroupInstanceId);
055            }
056    
057            public static void deleteRuleGroupInstance(
058                    com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance ruleGroupInstance)
059                    throws com.liferay.portal.kernel.exception.PortalException,
060                            com.liferay.portal.kernel.exception.SystemException {
061                    getService().deleteRuleGroupInstance(ruleGroupInstance);
062            }
063    
064            public static java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance> getRuleGroupInstances(
065                    java.lang.String className, long classPK, int start, int end,
066                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
067                    throws com.liferay.portal.kernel.exception.SystemException {
068                    return getService()
069                                       .getRuleGroupInstances(className, classPK, start, end,
070                            orderByComparator);
071            }
072    
073            public static int getRuleGroupInstancesCount(java.lang.String className,
074                    long classPK)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService().getRuleGroupInstancesCount(className, classPK);
077            }
078    
079            public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance updateRuleGroupInstance(
080                    long ruleGroupInstanceId, int priority)
081                    throws com.liferay.portal.kernel.exception.PortalException,
082                            com.liferay.portal.kernel.exception.SystemException {
083                    return getService()
084                                       .updateRuleGroupInstance(ruleGroupInstanceId, priority);
085            }
086    
087            public static MDRRuleGroupInstanceService getService() {
088                    if (_service == null) {
089                            _service = (MDRRuleGroupInstanceService)PortalBeanLocatorUtil.locate(MDRRuleGroupInstanceService.class.getName());
090    
091                            ReferenceRegistry.registerReference(MDRRuleGroupInstanceServiceUtil.class,
092                                    "_service");
093                            MethodCache.remove(MDRRuleGroupInstanceService.class);
094                    }
095    
096                    return _service;
097            }
098    
099            public void setService(MDRRuleGroupInstanceService service) {
100                    MethodCache.remove(MDRRuleGroupInstanceService.class);
101    
102                    _service = service;
103    
104                    ReferenceRegistry.registerReference(MDRRuleGroupInstanceServiceUtil.class,
105                            "_service");
106                    MethodCache.remove(MDRRuleGroupInstanceService.class);
107            }
108    
109            private static MDRRuleGroupInstanceService _service;
110    }