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