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.portal.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 country remote service. This utility wraps {@link com.liferay.portal.service.impl.CountryServiceImpl} 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 CountryService
030     * @see com.liferay.portal.service.base.CountryServiceBaseImpl
031     * @see com.liferay.portal.service.impl.CountryServiceImpl
032     * @generated
033     */
034    public class CountryServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.CountryServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portal.model.Country addCountry(
041                    java.lang.String name, java.lang.String a2, java.lang.String a3,
042                    java.lang.String number, java.lang.String idd, boolean active)
043                    throws com.liferay.portal.kernel.exception.PortalException,
044                            com.liferay.portal.kernel.exception.SystemException {
045                    return getService().addCountry(name, a2, a3, number, idd, active);
046            }
047    
048            public static com.liferay.portal.model.Country fetchCountry(long countryId)
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getService().fetchCountry(countryId);
051            }
052    
053            public static java.util.List<com.liferay.portal.model.Country> getCountries()
054                    throws com.liferay.portal.kernel.exception.SystemException {
055                    return getService().getCountries();
056            }
057    
058            public static java.util.List<com.liferay.portal.model.Country> getCountries(
059                    boolean active)
060                    throws com.liferay.portal.kernel.exception.SystemException {
061                    return getService().getCountries(active);
062            }
063    
064            public static com.liferay.portal.model.Country getCountry(long countryId)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    return getService().getCountry(countryId);
068            }
069    
070            public static com.liferay.portal.model.Country getCountryByA2(
071                    java.lang.String a2)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    return getService().getCountryByA2(a2);
075            }
076    
077            public static com.liferay.portal.model.Country getCountryByA3(
078                    java.lang.String a3)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException {
081                    return getService().getCountryByA3(a3);
082            }
083    
084            public static com.liferay.portal.model.Country getCountryByName(
085                    java.lang.String name)
086                    throws com.liferay.portal.kernel.exception.PortalException,
087                            com.liferay.portal.kernel.exception.SystemException {
088                    return getService().getCountryByName(name);
089            }
090    
091            public static CountryService getService() {
092                    if (_service == null) {
093                            _service = (CountryService)PortalBeanLocatorUtil.locate(CountryService.class.getName());
094    
095                            ReferenceRegistry.registerReference(CountryServiceUtil.class,
096                                    "_service");
097                            MethodCache.remove(CountryService.class);
098                    }
099    
100                    return _service;
101            }
102    
103            public void setService(CountryService service) {
104                    MethodCache.remove(CountryService.class);
105    
106                    _service = service;
107    
108                    ReferenceRegistry.registerReference(CountryServiceUtil.class, "_service");
109                    MethodCache.remove(CountryService.class);
110            }
111    
112            private static CountryService _service;
113    }