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