1
22
23 package com.liferay.counter.service.persistence;
24
25 import com.liferay.portal.SystemException;
26
27 import java.util.List;
28
29
34 public class CounterUtil {
35
36 public static List<String> getNames() throws SystemException {
37 return getPersistence().getNames();
38 }
39
40 public static long increment() throws SystemException {
41 return getPersistence().increment();
42 }
43
44 public static long increment(String name) throws SystemException {
45 return getPersistence().increment(name);
46 }
47
48 public static long increment(String name, int size)
49 throws SystemException {
50
51 return getPersistence().increment(name, size);
52 }
53
54 public static void rename(String oldName, String newName)
55 throws SystemException {
56
57 getPersistence().rename(oldName, newName);
58 }
59
60 public static void reset(String name) throws SystemException {
61 getPersistence().reset(name);
62 }
63
64 public static void reset(String name, long size) throws SystemException {
65 getPersistence().reset(name, size);
66 }
67
68 public static CounterPersistence getPersistence() {
69 return _persistence;
70 }
71
72 public void setPersistence(CounterPersistence persistence) {
73 _persistence = persistence;
74 }
75
76 private static CounterPersistence _persistence;
77
78 }