001    /**
002     * Copyright (c) 2000-2013 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.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the region remote service. This utility wraps {@link com.liferay.portal.service.impl.RegionServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
022     *
023     * <p>
024     * 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.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see RegionService
029     * @see com.liferay.portal.service.base.RegionServiceBaseImpl
030     * @see com.liferay.portal.service.impl.RegionServiceImpl
031     * @generated
032     */
033    public class RegionServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.RegionServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Returns the Spring bean ID for this bean.
042            *
043            * @return the Spring bean ID for this bean
044            */
045            public static java.lang.String getBeanIdentifier() {
046                    return getService().getBeanIdentifier();
047            }
048    
049            /**
050            * Sets the Spring bean ID for this bean.
051            *
052            * @param beanIdentifier the Spring bean ID for this bean
053            */
054            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055                    getService().setBeanIdentifier(beanIdentifier);
056            }
057    
058            public static com.liferay.portal.model.Region addRegion(long countryId,
059                    java.lang.String regionCode, java.lang.String name, boolean active)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService().addRegion(countryId, regionCode, name, active);
063            }
064    
065            public static com.liferay.portal.model.Region fetchRegion(long countryId,
066                    java.lang.String regionCode)
067                    throws com.liferay.portal.kernel.exception.SystemException {
068                    return getService().fetchRegion(countryId, regionCode);
069            }
070    
071            public static com.liferay.portal.model.Region getRegion(long regionId)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    return getService().getRegion(regionId);
075            }
076    
077            public static com.liferay.portal.model.Region getRegion(long countryId,
078                    java.lang.String regionCode)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException {
081                    return getService().getRegion(countryId, regionCode);
082            }
083    
084            public static java.util.List<com.liferay.portal.model.Region> getRegions()
085                    throws com.liferay.portal.kernel.exception.SystemException {
086                    return getService().getRegions();
087            }
088    
089            public static java.util.List<com.liferay.portal.model.Region> getRegions(
090                    boolean active)
091                    throws com.liferay.portal.kernel.exception.SystemException {
092                    return getService().getRegions(active);
093            }
094    
095            public static java.util.List<com.liferay.portal.model.Region> getRegions(
096                    long countryId)
097                    throws com.liferay.portal.kernel.exception.SystemException {
098                    return getService().getRegions(countryId);
099            }
100    
101            public static java.util.List<com.liferay.portal.model.Region> getRegions(
102                    long countryId, boolean active)
103                    throws com.liferay.portal.kernel.exception.SystemException {
104                    return getService().getRegions(countryId, active);
105            }
106    
107            public static RegionService getService() {
108                    if (_service == null) {
109                            _service = (RegionService)PortalBeanLocatorUtil.locate(RegionService.class.getName());
110    
111                            ReferenceRegistry.registerReference(RegionServiceUtil.class,
112                                    "_service");
113                    }
114    
115                    return _service;
116            }
117    
118            /**
119             * @deprecated
120             */
121            public void setService(RegionService service) {
122            }
123    
124            private static RegionService _service;
125    }