1
14
15 package com.liferay.counter.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class CounterLocalServiceUtil {
40 public static com.liferay.counter.model.Counter addCounter(
41 com.liferay.counter.model.Counter counter)
42 throws com.liferay.portal.kernel.exception.SystemException {
43 return getService().addCounter(counter);
44 }
45
46 public static com.liferay.counter.model.Counter createCounter(
47 java.lang.String name) {
48 return getService().createCounter(name);
49 }
50
51 public static void deleteCounter(java.lang.String name)
52 throws com.liferay.portal.kernel.exception.PortalException,
53 com.liferay.portal.kernel.exception.SystemException {
54 getService().deleteCounter(name);
55 }
56
57 public static void deleteCounter(com.liferay.counter.model.Counter counter)
58 throws com.liferay.portal.kernel.exception.SystemException {
59 getService().deleteCounter(counter);
60 }
61
62 @SuppressWarnings("unchecked")
63 public static java.util.List dynamicQuery(
64 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65 throws com.liferay.portal.kernel.exception.SystemException {
66 return getService().dynamicQuery(dynamicQuery);
67 }
68
69 @SuppressWarnings("unchecked")
70 public static java.util.List dynamicQuery(
71 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
72 int end) throws com.liferay.portal.kernel.exception.SystemException {
73 return getService().dynamicQuery(dynamicQuery, start, end);
74 }
75
76 @SuppressWarnings("unchecked")
77 public static java.util.List dynamicQuery(
78 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79 int end,
80 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
81 throws com.liferay.portal.kernel.exception.SystemException {
82 return getService()
83 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
84 }
85
86 public static long dynamicQueryCount(
87 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
88 throws com.liferay.portal.kernel.exception.SystemException {
89 return getService().dynamicQueryCount(dynamicQuery);
90 }
91
92 public static com.liferay.counter.model.Counter getCounter(
93 java.lang.String name)
94 throws com.liferay.portal.kernel.exception.PortalException,
95 com.liferay.portal.kernel.exception.SystemException {
96 return getService().getCounter(name);
97 }
98
99 public static java.util.List<com.liferay.counter.model.Counter> getCounters(
100 int start, int end)
101 throws com.liferay.portal.kernel.exception.SystemException {
102 return getService().getCounters(start, end);
103 }
104
105 public static int getCountersCount()
106 throws com.liferay.portal.kernel.exception.SystemException {
107 return getService().getCountersCount();
108 }
109
110 public static com.liferay.counter.model.Counter updateCounter(
111 com.liferay.counter.model.Counter counter)
112 throws com.liferay.portal.kernel.exception.SystemException {
113 return getService().updateCounter(counter);
114 }
115
116 public static com.liferay.counter.model.Counter updateCounter(
117 com.liferay.counter.model.Counter counter, boolean merge)
118 throws com.liferay.portal.kernel.exception.SystemException {
119 return getService().updateCounter(counter, merge);
120 }
121
122 public static java.util.List<java.lang.String> getNames()
123 throws com.liferay.portal.kernel.exception.SystemException {
124 return getService().getNames();
125 }
126
127 public static long increment()
128 throws com.liferay.portal.kernel.exception.SystemException {
129 return getService().increment();
130 }
131
132 public static long increment(java.lang.String name)
133 throws com.liferay.portal.kernel.exception.SystemException {
134 return getService().increment(name);
135 }
136
137 public static long increment(java.lang.String name, int size)
138 throws com.liferay.portal.kernel.exception.SystemException {
139 return getService().increment(name, size);
140 }
141
142 public static void rename(java.lang.String oldName, java.lang.String newName)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 getService().rename(oldName, newName);
145 }
146
147 public static void reset(java.lang.String name)
148 throws com.liferay.portal.kernel.exception.SystemException {
149 getService().reset(name);
150 }
151
152 public static void reset(java.lang.String name, long size)
153 throws com.liferay.portal.kernel.exception.SystemException {
154 getService().reset(name, size);
155 }
156
157 public static CounterLocalService getService() {
158 if (_service == null) {
159 _service = (CounterLocalService)PortalBeanLocatorUtil.locate(CounterLocalService.class.getName());
160 }
161
162 return _service;
163 }
164
165 public void setService(CounterLocalService service) {
166 _service = service;
167 }
168
169 private static CounterLocalService _service;
170 }