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 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 }