1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="RegionServiceUtil.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 RegionService} 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       RegionService
37   * @generated
38   */
39  public class RegionServiceUtil {
40      public static com.liferay.portal.model.Region addRegion(long countryId,
41          java.lang.String regionCode, java.lang.String name, boolean active)
42          throws com.liferay.portal.kernel.exception.PortalException,
43              com.liferay.portal.kernel.exception.SystemException {
44          return getService().addRegion(countryId, regionCode, name, active);
45      }
46  
47      public static java.util.List<com.liferay.portal.model.Region> getRegions()
48          throws com.liferay.portal.kernel.exception.SystemException {
49          return getService().getRegions();
50      }
51  
52      public static java.util.List<com.liferay.portal.model.Region> getRegions(
53          long countryId)
54          throws com.liferay.portal.kernel.exception.SystemException {
55          return getService().getRegions(countryId);
56      }
57  
58      public static java.util.List<com.liferay.portal.model.Region> getRegions(
59          boolean active)
60          throws com.liferay.portal.kernel.exception.SystemException {
61          return getService().getRegions(active);
62      }
63  
64      public static java.util.List<com.liferay.portal.model.Region> getRegions(
65          long countryId, boolean active)
66          throws com.liferay.portal.kernel.exception.SystemException {
67          return getService().getRegions(countryId, active);
68      }
69  
70      public static com.liferay.portal.model.Region getRegion(long regionId)
71          throws com.liferay.portal.kernel.exception.PortalException,
72              com.liferay.portal.kernel.exception.SystemException {
73          return getService().getRegion(regionId);
74      }
75  
76      public static RegionService getService() {
77          if (_service == null) {
78              _service = (RegionService)PortalBeanLocatorUtil.locate(RegionService.class.getName());
79          }
80  
81          return _service;
82      }
83  
84      public void setService(RegionService service) {
85          _service = service;
86      }
87  
88      private static RegionService _service;
89  }