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     * <p>
021     * This class provides static methods for the
022     * {@link CountryService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       CountryService
030     * @generated
031     */
032    public class CountryServiceUtil {
033            public static com.liferay.portal.model.Country addCountry(
034                    java.lang.String name, java.lang.String a2, java.lang.String a3,
035                    java.lang.String number, java.lang.String idd, boolean active)
036                    throws com.liferay.portal.kernel.exception.PortalException,
037                            com.liferay.portal.kernel.exception.SystemException {
038                    return getService().addCountry(name, a2, a3, number, idd, active);
039            }
040    
041            public static java.util.List<com.liferay.portal.model.Country> getCountries()
042                    throws com.liferay.portal.kernel.exception.SystemException {
043                    return getService().getCountries();
044            }
045    
046            public static java.util.List<com.liferay.portal.model.Country> getCountries(
047                    boolean active)
048                    throws com.liferay.portal.kernel.exception.SystemException {
049                    return getService().getCountries(active);
050            }
051    
052            public static com.liferay.portal.model.Country getCountry(long countryId)
053                    throws com.liferay.portal.kernel.exception.PortalException,
054                            com.liferay.portal.kernel.exception.SystemException {
055                    return getService().getCountry(countryId);
056            }
057    
058            public static com.liferay.portal.model.Country getCountryByA2(
059                    java.lang.String a2)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService().getCountryByA2(a2);
063            }
064    
065            public static com.liferay.portal.model.Country getCountryByA3(
066                    java.lang.String a3)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException {
069                    return getService().getCountryByA3(a3);
070            }
071    
072            public static com.liferay.portal.model.Country getCountryByName(
073                    java.lang.String name)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().getCountryByName(name);
077            }
078    
079            public static CountryService getService() {
080                    if (_service == null) {
081                            _service = (CountryService)PortalBeanLocatorUtil.locate(CountryService.class.getName());
082                    }
083    
084                    return _service;
085            }
086    
087            public void setService(CountryService service) {
088                    _service = service;
089            }
090    
091            private static CountryService _service;
092    }