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 obc)
136 throws com.liferay.portal.SystemException {
137 return getPersistence().findByCountryId(countryId, start, end, obc);
138 }
139
140 public static com.liferay.portal.model.Region findByCountryId_First(
141 long countryId, com.liferay.portal.kernel.util.OrderByComparator obc)
142 throws com.liferay.portal.NoSuchRegionException,
143 com.liferay.portal.SystemException {
144 return getPersistence().findByCountryId_First(countryId, obc);
145 }
146
147 public static com.liferay.portal.model.Region findByCountryId_Last(
148 long countryId, com.liferay.portal.kernel.util.OrderByComparator obc)
149 throws com.liferay.portal.NoSuchRegionException,
150 com.liferay.portal.SystemException {
151 return getPersistence().findByCountryId_Last(countryId, obc);
152 }
153
154 public static com.liferay.portal.model.Region[] findByCountryId_PrevAndNext(
155 long regionId, long countryId,
156 com.liferay.portal.kernel.util.OrderByComparator obc)
157 throws com.liferay.portal.NoSuchRegionException,
158 com.liferay.portal.SystemException {
159 return getPersistence()
160 .findByCountryId_PrevAndNext(regionId, countryId, obc);
161 }
162
163 public static java.util.List<com.liferay.portal.model.Region> findByActive(
164 boolean active) throws com.liferay.portal.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.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 obc)
177 throws com.liferay.portal.SystemException {
178 return getPersistence().findByActive(active, start, end, obc);
179 }
180
181 public static com.liferay.portal.model.Region findByActive_First(
182 boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
183 throws com.liferay.portal.NoSuchRegionException,
184 com.liferay.portal.SystemException {
185 return getPersistence().findByActive_First(active, obc);
186 }
187
188 public static com.liferay.portal.model.Region findByActive_Last(
189 boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
190 throws com.liferay.portal.NoSuchRegionException,
191 com.liferay.portal.SystemException {
192 return getPersistence().findByActive_Last(active, obc);
193 }
194
195 public static com.liferay.portal.model.Region[] findByActive_PrevAndNext(
196 long regionId, boolean active,
197 com.liferay.portal.kernel.util.OrderByComparator obc)
198 throws com.liferay.portal.NoSuchRegionException,
199 com.liferay.portal.SystemException {
200 return getPersistence().findByActive_PrevAndNext(regionId, active, obc);
201 }
202
203 public static java.util.List<com.liferay.portal.model.Region> findByC_A(
204 long countryId, boolean active)
205 throws com.liferay.portal.SystemException {
206 return getPersistence().findByC_A(countryId, active);
207 }
208
209 public static java.util.List<com.liferay.portal.model.Region> findByC_A(
210 long countryId, boolean active, int start, int end)
211 throws com.liferay.portal.SystemException {
212 return getPersistence().findByC_A(countryId, active, start, end);
213 }
214
215 public static java.util.List<com.liferay.portal.model.Region> findByC_A(
216 long countryId, boolean active, int start, int end,
217 com.liferay.portal.kernel.util.OrderByComparator obc)
218 throws com.liferay.portal.SystemException {
219 return getPersistence().findByC_A(countryId, active, start, end, obc);
220 }
221
222 public static com.liferay.portal.model.Region findByC_A_First(
223 long countryId, boolean active,
224 com.liferay.portal.kernel.util.OrderByComparator obc)
225 throws com.liferay.portal.NoSuchRegionException,
226 com.liferay.portal.SystemException {
227 return getPersistence().findByC_A_First(countryId, active, obc);
228 }
229
230 public static com.liferay.portal.model.Region findByC_A_Last(
231 long countryId, boolean active,
232 com.liferay.portal.kernel.util.OrderByComparator obc)
233 throws com.liferay.portal.NoSuchRegionException,
234 com.liferay.portal.SystemException {
235 return getPersistence().findByC_A_Last(countryId, active, obc);
236 }
237
238 public static com.liferay.portal.model.Region[] findByC_A_PrevAndNext(
239 long regionId, long countryId, boolean active,
240 com.liferay.portal.kernel.util.OrderByComparator obc)
241 throws com.liferay.portal.NoSuchRegionException,
242 com.liferay.portal.SystemException {
243 return getPersistence()
244 .findByC_A_PrevAndNext(regionId, countryId, active, obc);
245 }
246
247 public static java.util.List<com.liferay.portal.model.Region> findAll()
248 throws com.liferay.portal.SystemException {
249 return getPersistence().findAll();
250 }
251
252 public static java.util.List<com.liferay.portal.model.Region> findAll(
253 int start, int end) throws com.liferay.portal.SystemException {
254 return getPersistence().findAll(start, end);
255 }
256
257 public static java.util.List<com.liferay.portal.model.Region> findAll(
258 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
259 throws com.liferay.portal.SystemException {
260 return getPersistence().findAll(start, end, obc);
261 }
262
263 public static void removeByCountryId(long countryId)
264 throws com.liferay.portal.SystemException {
265 getPersistence().removeByCountryId(countryId);
266 }
267
268 public static void removeByActive(boolean active)
269 throws com.liferay.portal.SystemException {
270 getPersistence().removeByActive(active);
271 }
272
273 public static void removeByC_A(long countryId, boolean active)
274 throws com.liferay.portal.SystemException {
275 getPersistence().removeByC_A(countryId, active);
276 }
277
278 public static void removeAll() throws com.liferay.portal.SystemException {
279 getPersistence().removeAll();
280 }
281
282 public static int countByCountryId(long countryId)
283 throws com.liferay.portal.SystemException {
284 return getPersistence().countByCountryId(countryId);
285 }
286
287 public static int countByActive(boolean active)
288 throws com.liferay.portal.SystemException {
289 return getPersistence().countByActive(active);
290 }
291
292 public static int countByC_A(long countryId, boolean active)
293 throws com.liferay.portal.SystemException {
294 return getPersistence().countByC_A(countryId, active);
295 }
296
297 public static int countAll() throws com.liferay.portal.SystemException {
298 return getPersistence().countAll();
299 }
300
301 public static RegionPersistence getPersistence() {
302 if (_persistence == null) {
303 _persistence = (RegionPersistence)PortalBeanLocatorUtil.locate(RegionPersistence.class.getName());
304 }
305
306 return _persistence;
307 }
308
309 public void setPersistence(RegionPersistence persistence) {
310 _persistence = persistence;
311 }
312
313 private static RegionPersistence _persistence;
314 }