001    /**
002     * Copyright (c) 2000-2010 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    
019    /**
020     * 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.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.RegionServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * 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.
028     * </p>
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    public class RegionServiceUtil {
037            public static com.liferay.portal.model.Region addRegion(long countryId,
038                    java.lang.String regionCode, java.lang.String name, boolean active)
039                    throws com.liferay.portal.kernel.exception.PortalException,
040                            com.liferay.portal.kernel.exception.SystemException {
041                    return getService().addRegion(countryId, regionCode, name, active);
042            }
043    
044            public static java.util.List<com.liferay.portal.model.Region> getRegions()
045                    throws com.liferay.portal.kernel.exception.SystemException {
046                    return getService().getRegions();
047            }
048    
049            public static java.util.List<com.liferay.portal.model.Region> getRegions(
050                    long countryId)
051                    throws com.liferay.portal.kernel.exception.SystemException {
052                    return getService().getRegions(countryId);
053            }
054    
055            public static java.util.List<com.liferay.portal.model.Region> getRegions(
056                    boolean active)
057                    throws com.liferay.portal.kernel.exception.SystemException {
058                    return getService().getRegions(active);
059            }
060    
061            public static java.util.List<com.liferay.portal.model.Region> getRegions(
062                    long countryId, boolean active)
063                    throws com.liferay.portal.kernel.exception.SystemException {
064                    return getService().getRegions(countryId, active);
065            }
066    
067            public static com.liferay.portal.model.Region getRegion(long regionId)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    return getService().getRegion(regionId);
071            }
072    
073            public static RegionService getService() {
074                    if (_service == null) {
075                            _service = (RegionService)PortalBeanLocatorUtil.locate(RegionService.class.getName());
076                    }
077    
078                    return _service;
079            }
080    
081            public void setService(RegionService service) {
082                    _service = service;
083            }
084    
085            private static RegionService _service;
086    }