001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance addRuleGroupInstance(
052                    long groupId, java.lang.String className, long classPK,
053                    long ruleGroupId,
054                    com.liferay.portal.service.ServiceContext serviceContext)
055                    throws com.liferay.portal.kernel.exception.PortalException,
056                            com.liferay.portal.kernel.exception.SystemException {
057                    return getService()
058                                       .addRuleGroupInstance(groupId, className, classPK,
059                            ruleGroupId, serviceContext);
060            }
061    
062            public static void deleteRuleGroupInstance(long ruleGroupInstanceId)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    getService().deleteRuleGroupInstance(ruleGroupInstanceId);
066            }
067    
068            public static java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance> getRuleGroupInstances(
069                    java.lang.String className, long classPK, int start, int end,
070                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
071                    throws com.liferay.portal.kernel.exception.SystemException {
072                    return getService()
073                                       .getRuleGroupInstances(className, classPK, start, end,
074                            orderByComparator);
075            }
076    
077            public static int getRuleGroupInstancesCount(java.lang.String className,
078                    long classPK)
079                    throws com.liferay.portal.kernel.exception.SystemException {
080                    return getService().getRuleGroupInstancesCount(className, classPK);
081            }
082    
083            public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance updateRuleGroupInstance(
084                    long ruleGroupInstanceId, int priority)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    return getService()
088                                       .updateRuleGroupInstance(ruleGroupInstanceId, priority);
089            }
090    
091            public static MDRRuleGroupInstanceService getService() {
092                    if (_service == null) {
093                            _service = (MDRRuleGroupInstanceService)PortalBeanLocatorUtil.locate(MDRRuleGroupInstanceService.class.getName());
094    
095                            ReferenceRegistry.registerReference(MDRRuleGroupInstanceServiceUtil.class,
096                                    "_service");
097                            MethodCache.remove(MDRRuleGroupInstanceService.class);
098                    }
099    
100                    return _service;
101            }
102    
103            public void setService(MDRRuleGroupInstanceService service) {
104                    MethodCache.remove(MDRRuleGroupInstanceService.class);
105    
106                    _service = service;
107    
108                    ReferenceRegistry.registerReference(MDRRuleGroupInstanceServiceUtil.class,
109                            "_service");
110                    MethodCache.remove(MDRRuleGroupInstanceService.class);
111            }
112    
113            private static MDRRuleGroupInstanceService _service;
114    }