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