001
014
015 package com.liferay.portlet.expando.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 ExpandoValueServiceUtil {
035
040 public static com.liferay.portlet.expando.model.ExpandoValue addValue(
041 long companyId, java.lang.String className, java.lang.String tableName,
042 java.lang.String columnName, long classPK, java.lang.Object data)
043 throws com.liferay.portal.kernel.exception.PortalException,
044 com.liferay.portal.kernel.exception.SystemException {
045 return getService()
046 .addValue(companyId, className, tableName, columnName,
047 classPK, data);
048 }
049
050 public static com.liferay.portlet.expando.model.ExpandoValue addValue(
051 long companyId, java.lang.String className, java.lang.String tableName,
052 java.lang.String columnName, long classPK, java.lang.String data)
053 throws com.liferay.portal.kernel.exception.PortalException,
054 com.liferay.portal.kernel.exception.SystemException {
055 return getService()
056 .addValue(companyId, className, tableName, columnName,
057 classPK, data);
058 }
059
060 public static java.io.Serializable getData(long companyId,
061 java.lang.String className, java.lang.String tableName,
062 java.lang.String columnName, long classPK)
063 throws com.liferay.portal.kernel.exception.PortalException,
064 com.liferay.portal.kernel.exception.SystemException {
065 return getService()
066 .getData(companyId, className, tableName, columnName, classPK);
067 }
068
069 public static com.liferay.portal.kernel.json.JSONObject getJSONData(
070 long companyId, java.lang.String className, java.lang.String tableName,
071 java.lang.String columnName, long classPK)
072 throws com.liferay.portal.kernel.exception.PortalException,
073 com.liferay.portal.kernel.exception.SystemException {
074 return getService()
075 .getJSONData(companyId, className, tableName, columnName,
076 classPK);
077 }
078
079 public static ExpandoValueService getService() {
080 if (_service == null) {
081 _service = (ExpandoValueService)PortalBeanLocatorUtil.locate(ExpandoValueService.class.getName());
082
083 ReferenceRegistry.registerReference(ExpandoValueServiceUtil.class,
084 "_service");
085 MethodCache.remove(ExpandoValueService.class);
086 }
087
088 return _service;
089 }
090
091 public void setService(ExpandoValueService service) {
092 MethodCache.remove(ExpandoValueService.class);
093
094 _service = service;
095
096 ReferenceRegistry.registerReference(ExpandoValueServiceUtil.class,
097 "_service");
098 MethodCache.remove(ExpandoValueService.class);
099 }
100
101 private static ExpandoValueService _service;
102 }