1
14
15 package com.liferay.portal.service.persistence;
16
17 import com.liferay.portal.SystemException;
18 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20 import com.liferay.portal.kernel.util.ReferenceRegistry;
21 import com.liferay.portal.model.Region;
22
23 import java.util.List;
24
25
38 public class RegionUtil {
39
42 public static void clearCache() {
43 getPersistence().clearCache();
44 }
45
46
49 public static void clearCache(Region region) {
50 getPersistence().clearCache(region);
51 }
52
53
56 public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57 throws SystemException {
58 return getPersistence().countWithDynamicQuery(dynamicQuery);
59 }
60
61
64 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65 throws SystemException {
66 return getPersistence().findWithDynamicQuery(dynamicQuery);
67 }
68
69
72 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73 int start, int end) throws SystemException {
74 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75 }
76
77
80 public static Region remove(Region region) throws SystemException {
81 return getPersistence().remove(region);
82 }
83
84
87 public static Region update(Region region, boolean merge)
88 throws SystemException {
89 return getPersistence().update(region, merge);
90 }
91
92 public static void cacheResult(com.liferay.portal.model.Region region) {
93 getPersistence().cacheResult(region);
94 }
95
96 public static void cacheResult(
97 java.util.List<com.liferay.portal.model.Region> regions) {
98 getPersistence().cacheResult(regions);
99 }
100
101 public static com.liferay.portal.model.Region create(long regionId) {
102 return getPersistence().create(regionId);
103 }
104
105 public static com.liferay.portal.model.Region remove(long regionId)
106 throws com.liferay.portal.NoSuchRegionException,
107 com.liferay.portal.SystemException {
108 return getPersistence().remove(regionId);
109 }
110
111
114 public static com.liferay.portal.model.Region update(
115 com.liferay.portal.model.Region region)
116 throws com.liferay.portal.SystemException {
117 return getPersistence().update(region);
118 }
119
120 public static com.liferay.portal.model.Region updateImpl(
121 com.liferay.portal.model.Region region, boolean merge)
122 throws com.liferay.portal.SystemException {
123 return getPersistence().updateImpl(region, merge);
124 }
125
126 public static com.liferay.portal.model.Region findByPrimaryKey(
127 long regionId)
128 throws com.liferay.portal.NoSuchRegionException,
129 com.liferay.portal.SystemException {
130 return getPersistence().findByPrimaryKey(regionId);
131 }
132
133 public static com.liferay.portal.model.Region fetchByPrimaryKey(
134 long regionId) throws com.liferay.portal.SystemException {
135 return getPersistence().fetchByPrimaryKey(regionId);
136 }
137
138 public static java.util.List<com.liferay.portal.model.Region> findByCountryId(
139 long countryId) throws com.liferay.portal.SystemException {
140 return getPersistence().findByCountryId(countryId);
141 }
142
143 public static java.util.List<com.liferay.portal.model.Region> findByCountryId(
144 long countryId, int start, int end)
145 throws com.liferay.portal.SystemException {
146 return getPersistence().findByCountryId(countryId, start, end);
147 }
148
149 public static java.util.List<com.liferay.portal.model.Region> findByCountryId(
150 long countryId, int start, int end,
151 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152 throws com.liferay.portal.SystemException {
153 return getPersistence()
154 .findByCountryId(countryId, start, end, orderByComparator);
155 }
156
157 public static com.liferay.portal.model.Region findByCountryId_First(
158 long countryId,
159 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160 throws com.liferay.portal.NoSuchRegionException,
161 com.liferay.portal.SystemException {
162 return getPersistence()
163 .findByCountryId_First(countryId, orderByComparator);
164 }
165
166 public static com.liferay.portal.model.Region findByCountryId_Last(
167 long countryId,
168 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169 throws com.liferay.portal.NoSuchRegionException,
170 com.liferay.portal.SystemException {
171 return getPersistence()
172 .findByCountryId_Last(countryId, orderByComparator);
173 }
174
175 public static com.liferay.portal.model.Region[] findByCountryId_PrevAndNext(
176 long regionId, long countryId,
177 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178 throws com.liferay.portal.NoSuchRegionException,
179 com.liferay.portal.SystemException {
180 return getPersistence()
181 .findByCountryId_PrevAndNext(regionId, countryId,
182 orderByComparator);
183 }
184
185 public static java.util.List<com.liferay.portal.model.Region> findByActive(
186 boolean active) throws com.liferay.portal.SystemException {
187 return getPersistence().findByActive(active);
188 }
189
190 public static java.util.List<com.liferay.portal.model.Region> findByActive(
191 boolean active, int start, int end)
192 throws com.liferay.portal.SystemException {
193 return getPersistence().findByActive(active, start, end);
194 }
195
196 public static java.util.List<com.liferay.portal.model.Region> findByActive(
197 boolean active, int start, int end,
198 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
199 throws com.liferay.portal.SystemException {
200 return getPersistence()
201 .findByActive(active, start, end, orderByComparator);
202 }
203
204 public static com.liferay.portal.model.Region findByActive_First(
205 boolean active,
206 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207 throws com.liferay.portal.NoSuchRegionException,
208 com.liferay.portal.SystemException {
209 return getPersistence().findByActive_First(active, orderByComparator);
210 }
211
212 public static com.liferay.portal.model.Region findByActive_Last(
213 boolean active,
214 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
215 throws com.liferay.portal.NoSuchRegionException,
216 com.liferay.portal.SystemException {
217 return getPersistence().findByActive_Last(active, orderByComparator);
218 }
219
220 public static com.liferay.portal.model.Region[] findByActive_PrevAndNext(
221 long regionId, boolean active,
222 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
223 throws com.liferay.portal.NoSuchRegionException,
224 com.liferay.portal.SystemException {
225 return getPersistence()
226 .findByActive_PrevAndNext(regionId, active, orderByComparator);
227 }
228
229 public static java.util.List<com.liferay.portal.model.Region> findByC_A(
230 long countryId, boolean active)
231 throws com.liferay.portal.SystemException {
232 return getPersistence().findByC_A(countryId, active);
233 }
234
235 public static java.util.List<com.liferay.portal.model.Region> findByC_A(
236 long countryId, boolean active, int start, int end)
237 throws com.liferay.portal.SystemException {
238 return getPersistence().findByC_A(countryId, active, start, end);
239 }
240
241 public static java.util.List<com.liferay.portal.model.Region> findByC_A(
242 long countryId, boolean active, int start, int end,
243 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244 throws com.liferay.portal.SystemException {
245 return getPersistence()
246 .findByC_A(countryId, active, start, end, orderByComparator);
247 }
248
249 public static com.liferay.portal.model.Region findByC_A_First(
250 long countryId, boolean active,
251 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252 throws com.liferay.portal.NoSuchRegionException,
253 com.liferay.portal.SystemException {
254 return getPersistence()
255 .findByC_A_First(countryId, active, orderByComparator);
256 }
257
258 public static com.liferay.portal.model.Region findByC_A_Last(
259 long countryId, boolean active,
260 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261 throws com.liferay.portal.NoSuchRegionException,
262 com.liferay.portal.SystemException {
263 return getPersistence()
264 .findByC_A_Last(countryId, active, orderByComparator);
265 }
266
267 public static com.liferay.portal.model.Region[] findByC_A_PrevAndNext(
268 long regionId, long countryId, boolean active,
269 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
270 throws com.liferay.portal.NoSuchRegionException,
271 com.liferay.portal.SystemException {
272 return getPersistence()
273 .findByC_A_PrevAndNext(regionId, countryId, active,
274 orderByComparator);
275 }
276
277 public static java.util.List<com.liferay.portal.model.Region> findAll()
278 throws com.liferay.portal.SystemException {
279 return getPersistence().findAll();
280 }
281
282 public static java.util.List<com.liferay.portal.model.Region> findAll(
283 int start, int end) throws com.liferay.portal.SystemException {
284 return getPersistence().findAll(start, end);
285 }
286
287 public static java.util.List<com.liferay.portal.model.Region> findAll(
288 int start, int end,
289 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
290 throws com.liferay.portal.SystemException {
291 return getPersistence().findAll(start, end, orderByComparator);
292 }
293
294 public static void removeByCountryId(long countryId)
295 throws com.liferay.portal.SystemException {
296 getPersistence().removeByCountryId(countryId);
297 }
298
299 public static void removeByActive(boolean active)
300 throws com.liferay.portal.SystemException {
301 getPersistence().removeByActive(active);
302 }
303
304 public static void removeByC_A(long countryId, boolean active)
305 throws com.liferay.portal.SystemException {
306 getPersistence().removeByC_A(countryId, active);
307 }
308
309 public static void removeAll() throws com.liferay.portal.SystemException {
310 getPersistence().removeAll();
311 }
312
313 public static int countByCountryId(long countryId)
314 throws com.liferay.portal.SystemException {
315 return getPersistence().countByCountryId(countryId);
316 }
317
318 public static int countByActive(boolean active)
319 throws com.liferay.portal.SystemException {
320 return getPersistence().countByActive(active);
321 }
322
323 public static int countByC_A(long countryId, boolean active)
324 throws com.liferay.portal.SystemException {
325 return getPersistence().countByC_A(countryId, active);
326 }
327
328 public static int countAll() throws com.liferay.portal.SystemException {
329 return getPersistence().countAll();
330 }
331
332 public static RegionPersistence getPersistence() {
333 if (_persistence == null) {
334 _persistence = (RegionPersistence)PortalBeanLocatorUtil.locate(RegionPersistence.class.getName());
335
336 ReferenceRegistry.registerReference(RegionUtil.class, "_persistence");
337 }
338
339 return _persistence;
340 }
341
342 public void setPersistence(RegionPersistence persistence) {
343 _persistence = persistence;
344
345 ReferenceRegistry.registerReference(RegionUtil.class, "_persistence");
346 }
347
348 private static RegionPersistence _persistence;
349 }