1
22
23 package com.liferay.counter.service;
24
25 import com.liferay.portal.SystemException;
26 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27
28 import java.util.List;
29
30
35 public class CounterLocalServiceUtil {
36
37 public static List<String> getNames() throws SystemException {
38 return getService().getNames();
39 }
40
41 public static CounterLocalService getService() {
42 if (_service == null) {
43 _service = (CounterLocalService)PortalBeanLocatorUtil.locate(
44 CounterLocalService.class.getName());
45 }
46
47 return _service;
48 }
49
50 public static long increment() throws SystemException {
51 return getService().increment();
52 }
53
54 public static long increment(String name) throws SystemException {
55 return getService().increment(name);
56 }
57
58 public static long increment(String name, int size) throws SystemException {
59 return getService().increment(name, size);
60 }
61
62 public static void rename(String oldName, String newName)
63 throws SystemException {
64
65 getService().rename(oldName, newName);
66 }
67
68 public static void reset(String name) throws SystemException {
69 getService().reset(name);
70 }
71
72 public static void reset(String name, long size) throws SystemException {
73 getService().reset(name, size);
74 }
75
76 public void setService(CounterLocalService service) {
77 _service = service;
78 }
79
80 private static CounterLocalService _service;
81
82 }