1
14
15 package com.liferay.counter.service.persistence;
16
17 import com.liferay.counter.model.Counter;
18
19 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
20 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
21 import com.liferay.portal.kernel.exception.SystemException;
22
23 import java.util.List;
24
25
38 public class CounterUtil {
39
42 public static void clearCache() {
43 getPersistence().clearCache();
44 }
45
46
49 public static void clearCache(Counter counter) {
50 getPersistence().clearCache(counter);
51 }
52
53
56 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
57 throws SystemException {
58 return getPersistence().countWithDynamicQuery(dynamicQuery);
59 }
60
61
64 public static List<Counter> findWithDynamicQuery(DynamicQuery dynamicQuery)
65 throws SystemException {
66 return getPersistence().findWithDynamicQuery(dynamicQuery);
67 }
68
69
72 public static List<Counter> findWithDynamicQuery(
73 DynamicQuery dynamicQuery, int start, int end)
74 throws SystemException {
75 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76 }
77
78
81 public static Counter remove(Counter counter) throws SystemException {
82 return getPersistence().remove(counter);
83 }
84
85
88 public static Counter update(Counter counter, boolean merge)
89 throws SystemException {
90 return getPersistence().update(counter, merge);
91 }
92
93 public static void cacheResult(com.liferay.counter.model.Counter counter) {
94 getPersistence().cacheResult(counter);
95 }
96
97 public static void cacheResult(
98 java.util.List<com.liferay.counter.model.Counter> counters) {
99 getPersistence().cacheResult(counters);
100 }
101
102 public static com.liferay.counter.model.Counter create(
103 java.lang.String name) {
104 return getPersistence().create(name);
105 }
106
107 public static com.liferay.counter.model.Counter remove(
108 java.lang.String name)
109 throws com.liferay.counter.NoSuchCounterException,
110 com.liferay.portal.kernel.exception.SystemException {
111 return getPersistence().remove(name);
112 }
113
114 public static com.liferay.counter.model.Counter updateImpl(
115 com.liferay.counter.model.Counter counter, boolean merge)
116 throws com.liferay.portal.kernel.exception.SystemException {
117 return getPersistence().updateImpl(counter, merge);
118 }
119
120 public static com.liferay.counter.model.Counter findByPrimaryKey(
121 java.lang.String name)
122 throws com.liferay.counter.NoSuchCounterException,
123 com.liferay.portal.kernel.exception.SystemException {
124 return getPersistence().findByPrimaryKey(name);
125 }
126
127 public static com.liferay.counter.model.Counter fetchByPrimaryKey(
128 java.lang.String name)
129 throws com.liferay.portal.kernel.exception.SystemException {
130 return getPersistence().fetchByPrimaryKey(name);
131 }
132
133 public static java.util.List<com.liferay.counter.model.Counter> findAll()
134 throws com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence().findAll();
136 }
137
138 public static java.util.List<com.liferay.counter.model.Counter> findAll(
139 int start, int end)
140 throws com.liferay.portal.kernel.exception.SystemException {
141 return getPersistence().findAll(start, end);
142 }
143
144 public static java.util.List<com.liferay.counter.model.Counter> findAll(
145 int start, int end,
146 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
147 throws com.liferay.portal.kernel.exception.SystemException {
148 return getPersistence().findAll(start, end, orderByComparator);
149 }
150
151 public static void removeAll()
152 throws com.liferay.portal.kernel.exception.SystemException {
153 getPersistence().removeAll();
154 }
155
156 public static int countAll()
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getPersistence().countAll();
159 }
160
161 public static CounterPersistence getPersistence() {
162 if (_persistence == null) {
163 _persistence = (CounterPersistence)PortalBeanLocatorUtil.locate(CounterPersistence.class.getName());
164 }
165
166 return _persistence;
167 }
168
169 public void setPersistence(CounterPersistence persistence) {
170 _persistence = persistence;
171 }
172
173 private static CounterPersistence _persistence;
174 }