001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 java.util.List<com.liferay.portal.model.Country> getCountries()
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getService().getCountries();
051            }
052    
053            public static java.util.List<com.liferay.portal.model.Country> getCountries(
054                    boolean active)
055                    throws com.liferay.portal.kernel.exception.SystemException {
056                    return getService().getCountries(active);
057            }
058    
059            public static com.liferay.portal.model.Country getCountry(long countryId)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService().getCountry(countryId);
063            }
064    
065            public static com.liferay.portal.model.Country getCountryByA2(
066                    java.lang.String a2)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException {
069                    return getService().getCountryByA2(a2);
070            }
071    
072            public static com.liferay.portal.model.Country getCountryByA3(
073                    java.lang.String a3)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().getCountryByA3(a3);
077            }
078    
079            public static com.liferay.portal.model.Country getCountryByName(
080                    java.lang.String name)
081                    throws com.liferay.portal.kernel.exception.PortalException,
082                            com.liferay.portal.kernel.exception.SystemException {
083                    return getService().getCountryByName(name);
084            }
085    
086            public static CountryService getService() {
087                    if (_service == null) {
088                            _service = (CountryService)PortalBeanLocatorUtil.locate(CountryService.class.getName());
089    
090                            ReferenceRegistry.registerReference(CountryServiceUtil.class,
091                                    "_service");
092                            MethodCache.remove(CountryService.class);
093                    }
094    
095                    return _service;
096            }
097    
098            public void setService(CountryService service) {
099                    MethodCache.remove(CountryService.class);
100    
101                    _service = service;
102    
103                    ReferenceRegistry.registerReference(CountryServiceUtil.class, "_service");
104                    MethodCache.remove(CountryService.class);
105            }
106    
107            private static CountryService _service;
108    }