001
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
034 public class MDRRuleGroupInstanceServiceUtil {
035
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 }