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