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