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 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 }