001
014
015 package com.liferay.portlet.dynamicdatalists.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 DDLRecordServiceUtil {
035
040 public static com.liferay.portlet.dynamicdatalists.model.DDLRecord addRecord(
041 long groupId, long recordSetId, int displayIndex,
042 com.liferay.portlet.dynamicdatamapping.storage.Fields fields,
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 .addRecord(groupId, recordSetId, displayIndex, fields,
048 serviceContext);
049 }
050
051 public static com.liferay.portlet.dynamicdatalists.model.DDLRecord addRecord(
052 long groupId, long recordSetId, int displayIndex,
053 java.util.Map<java.lang.String, java.io.Serializable> fieldsMap,
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 .addRecord(groupId, recordSetId, displayIndex, fieldsMap,
059 serviceContext);
060 }
061
062 public static com.liferay.portlet.dynamicdatalists.model.DDLRecord getRecord(
063 long recordId)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException {
066 return getService().getRecord(recordId);
067 }
068
069 public static com.liferay.portlet.dynamicdatalists.model.DDLRecord updateRecord(
070 long recordId, boolean majorVersion, int displayIndex,
071 com.liferay.portlet.dynamicdatamapping.storage.Fields fields,
072 boolean mergeFields,
073 com.liferay.portal.service.ServiceContext serviceContext)
074 throws com.liferay.portal.kernel.exception.PortalException,
075 com.liferay.portal.kernel.exception.SystemException {
076 return getService()
077 .updateRecord(recordId, majorVersion, displayIndex, fields,
078 mergeFields, serviceContext);
079 }
080
081 public static com.liferay.portlet.dynamicdatalists.model.DDLRecord updateRecord(
082 long recordId, int displayIndex,
083 java.util.Map<java.lang.String, java.io.Serializable> fieldsMap,
084 boolean mergeFields,
085 com.liferay.portal.service.ServiceContext serviceContext)
086 throws com.liferay.portal.kernel.exception.PortalException,
087 com.liferay.portal.kernel.exception.SystemException {
088 return getService()
089 .updateRecord(recordId, displayIndex, fieldsMap,
090 mergeFields, serviceContext);
091 }
092
093 public static DDLRecordService getService() {
094 if (_service == null) {
095 _service = (DDLRecordService)PortalBeanLocatorUtil.locate(DDLRecordService.class.getName());
096
097 ReferenceRegistry.registerReference(DDLRecordServiceUtil.class,
098 "_service");
099 MethodCache.remove(DDLRecordService.class);
100 }
101
102 return _service;
103 }
104
105 public void setService(DDLRecordService service) {
106 MethodCache.remove(DDLRecordService.class);
107
108 _service = service;
109
110 ReferenceRegistry.registerReference(DDLRecordServiceUtil.class,
111 "_service");
112 MethodCache.remove(DDLRecordService.class);
113 }
114
115 private static DDLRecordService _service;
116 }