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