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