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.counter.service;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  
20  import java.util.List;
21  
22  /**
23   * <a href="CounterLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   */
27  public class CounterLocalServiceUtil {
28  
29      public static List<String> getNames() throws SystemException {
30          return getService().getNames();
31      }
32  
33      public static CounterLocalService getService() {
34          if (_service == null) {
35              _service = (CounterLocalService)PortalBeanLocatorUtil.locate(
36                  CounterLocalService.class.getName());
37          }
38  
39          return _service;
40      }
41  
42      public static long increment() throws SystemException {
43          return getService().increment();
44      }
45  
46      public static long increment(String name) throws SystemException {
47          return getService().increment(name);
48      }
49  
50      public static long increment(String name, int size) throws SystemException {
51          return getService().increment(name, size);
52      }
53  
54      public static void rename(String oldName, String newName)
55          throws SystemException {
56  
57          getService().rename(oldName, newName);
58      }
59  
60      public static void reset(String name) throws SystemException {
61          getService().reset(name);
62      }
63  
64      public static void reset(String name, long size) throws SystemException {
65          getService().reset(name, size);
66      }
67  
68      public void setService(CounterLocalService service) {
69          _service = service;
70      }
71  
72      private static CounterLocalService _service;
73  
74  }