001
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
034 public class CountryServiceUtil {
035
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 }