001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
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    /**
022     * The utility for the expando value remote service. This utility wraps {@link com.liferay.portlet.expando.service.impl.ExpandoValueServiceImpl} 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 Brian Wing Shun Chan
029     * @see ExpandoValueService
030     * @see com.liferay.portlet.expando.service.base.ExpandoValueServiceBaseImpl
031     * @see com.liferay.portlet.expando.service.impl.ExpandoValueServiceImpl
032     * @generated
033     */
034    public class ExpandoValueServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.expando.service.impl.ExpandoValueServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
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    }