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 column remote service. This utility wraps {@link com.liferay.portlet.expando.service.impl.ExpandoColumnServiceImpl} 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 ExpandoColumnService
030     * @see com.liferay.portlet.expando.service.base.ExpandoColumnServiceBaseImpl
031     * @see com.liferay.portlet.expando.service.impl.ExpandoColumnServiceImpl
032     * @generated
033     */
034    public class ExpandoColumnServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.expando.service.impl.ExpandoColumnServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.expando.model.ExpandoColumn addColumn(
041                    long tableId, java.lang.String name, int type)
042                    throws com.liferay.portal.kernel.exception.PortalException,
043                            com.liferay.portal.kernel.exception.SystemException {
044                    return getService().addColumn(tableId, name, type);
045            }
046    
047            public static com.liferay.portlet.expando.model.ExpandoColumn addColumn(
048                    long tableId, java.lang.String name, int type,
049                    java.lang.Object defaultData)
050                    throws com.liferay.portal.kernel.exception.PortalException,
051                            com.liferay.portal.kernel.exception.SystemException {
052                    return getService().addColumn(tableId, name, type, defaultData);
053            }
054    
055            public static void deleteColumn(long columnId)
056                    throws com.liferay.portal.kernel.exception.PortalException,
057                            com.liferay.portal.kernel.exception.SystemException {
058                    getService().deleteColumn(columnId);
059            }
060    
061            public static com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
062                    long columnId, java.lang.String name, int type)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    return getService().updateColumn(columnId, name, type);
066            }
067    
068            public static com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
069                    long columnId, java.lang.String name, int type,
070                    java.lang.Object defaultData)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    return getService().updateColumn(columnId, name, type, defaultData);
074            }
075    
076            public static com.liferay.portlet.expando.model.ExpandoColumn updateTypeSettings(
077                    long columnId, java.lang.String typeSettings)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    return getService().updateTypeSettings(columnId, typeSettings);
081            }
082    
083            public static ExpandoColumnService getService() {
084                    if (_service == null) {
085                            _service = (ExpandoColumnService)PortalBeanLocatorUtil.locate(ExpandoColumnService.class.getName());
086    
087                            ReferenceRegistry.registerReference(ExpandoColumnServiceUtil.class,
088                                    "_service");
089                            MethodCache.remove(ExpandoColumnService.class);
090                    }
091    
092                    return _service;
093            }
094    
095            public void setService(ExpandoColumnService service) {
096                    MethodCache.remove(ExpandoColumnService.class);
097    
098                    _service = service;
099    
100                    ReferenceRegistry.registerReference(ExpandoColumnServiceUtil.class,
101                            "_service");
102                    MethodCache.remove(ExpandoColumnService.class);
103            }
104    
105            private static ExpandoColumnService _service;
106    }