1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="CountryServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link CountryService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       CountryService
37   * @generated
38   */
39  public class CountryServiceUtil {
40      public static com.liferay.portal.model.Country addCountry(
41          java.lang.String name, java.lang.String a2, java.lang.String a3,
42          java.lang.String number, java.lang.String idd, boolean active)
43          throws com.liferay.portal.PortalException,
44              com.liferay.portal.SystemException {
45          return getService().addCountry(name, a2, a3, number, idd, active);
46      }
47  
48      public static java.util.List<com.liferay.portal.model.Country> getCountries()
49          throws com.liferay.portal.SystemException {
50          return getService().getCountries();
51      }
52  
53      public static java.util.List<com.liferay.portal.model.Country> getCountries(
54          boolean active) throws com.liferay.portal.SystemException {
55          return getService().getCountries(active);
56      }
57  
58      public static com.liferay.portal.model.Country getCountry(long countryId)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException {
61          return getService().getCountry(countryId);
62      }
63  
64      public static com.liferay.portal.model.Country getCountryByA2(
65          java.lang.String a2)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException {
68          return getService().getCountryByA2(a2);
69      }
70  
71      public static com.liferay.portal.model.Country getCountryByA3(
72          java.lang.String a3)
73          throws com.liferay.portal.PortalException,
74              com.liferay.portal.SystemException {
75          return getService().getCountryByA3(a3);
76      }
77  
78      public static com.liferay.portal.model.Country getCountryByName(
79          java.lang.String name)
80          throws com.liferay.portal.PortalException,
81              com.liferay.portal.SystemException {
82          return getService().getCountryByName(name);
83      }
84  
85      public static CountryService getService() {
86          if (_service == null) {
87              _service = (CountryService)PortalBeanLocatorUtil.locate(CountryService.class.getName());
88          }
89  
90          return _service;
91      }
92  
93      public void setService(CountryService service) {
94          _service = service;
95      }
96  
97      private static CountryService _service;
98  }