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