001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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 void addValues(long companyId, java.lang.String className,
061                    java.lang.String tableName, long classPK,
062                    java.util.Map<java.lang.String, java.io.Serializable> attributeValues)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    getService()
066                            .addValues(companyId, className, tableName, classPK, attributeValues);
067            }
068    
069            public static java.util.Map<java.lang.String, java.io.Serializable> getData(
070                    long companyId, java.lang.String className, java.lang.String tableName,
071                    java.util.Collection<java.lang.String> columnNames, long classPK)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    return getService()
075                                       .getData(companyId, className, tableName, columnNames,
076                            classPK);
077            }
078    
079            public static java.io.Serializable getData(long companyId,
080                    java.lang.String className, java.lang.String tableName,
081                    java.lang.String columnName, long classPK)
082                    throws com.liferay.portal.kernel.exception.PortalException,
083                            com.liferay.portal.kernel.exception.SystemException {
084                    return getService()
085                                       .getData(companyId, className, tableName, columnName, classPK);
086            }
087    
088            public static com.liferay.portal.kernel.json.JSONObject getJSONData(
089                    long companyId, java.lang.String className, java.lang.String tableName,
090                    java.lang.String columnName, long classPK)
091                    throws com.liferay.portal.kernel.exception.PortalException,
092                            com.liferay.portal.kernel.exception.SystemException {
093                    return getService()
094                                       .getJSONData(companyId, className, tableName, columnName,
095                            classPK);
096            }
097    
098            public static ExpandoValueService getService() {
099                    if (_service == null) {
100                            _service = (ExpandoValueService)PortalBeanLocatorUtil.locate(ExpandoValueService.class.getName());
101    
102                            ReferenceRegistry.registerReference(ExpandoValueServiceUtil.class,
103                                    "_service");
104                            MethodCache.remove(ExpandoValueService.class);
105                    }
106    
107                    return _service;
108            }
109    
110            public void setService(ExpandoValueService service) {
111                    MethodCache.remove(ExpandoValueService.class);
112    
113                    _service = service;
114    
115                    ReferenceRegistry.registerReference(ExpandoValueServiceUtil.class,
116                            "_service");
117                    MethodCache.remove(ExpandoValueService.class);
118            }
119    
120            private static ExpandoValueService _service;
121    }