1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
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  /**
25   * <a href="CountryUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       CountryPersistence
34   * @see       CountryPersistenceImpl
35   * @generated
36   */
37  public class CountryUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
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      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static Country remove(Country country) throws SystemException {
65          return getPersistence().remove(country);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
70       */
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 obc)
184         throws com.liferay.portal.kernel.exception.SystemException {
185         return getPersistence().findByActive(active, start, end, obc);
186     }
187 
188     public static com.liferay.portal.model.Country findByActive_First(
189         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.NoSuchCountryException,
191             com.liferay.portal.kernel.exception.SystemException {
192         return getPersistence().findByActive_First(active, obc);
193     }
194 
195     public static com.liferay.portal.model.Country findByActive_Last(
196         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.NoSuchCountryException,
198             com.liferay.portal.kernel.exception.SystemException {
199         return getPersistence().findByActive_Last(active, obc);
200     }
201 
202     public static com.liferay.portal.model.Country[] findByActive_PrevAndNext(
203         long countryId, boolean active,
204         com.liferay.portal.kernel.util.OrderByComparator obc)
205         throws com.liferay.portal.NoSuchCountryException,
206             com.liferay.portal.kernel.exception.SystemException {
207         return getPersistence().findByActive_PrevAndNext(countryId, active, obc);
208     }
209 
210     public static java.util.List<com.liferay.portal.model.Country> findAll()
211         throws com.liferay.portal.kernel.exception.SystemException {
212         return getPersistence().findAll();
213     }
214 
215     public static java.util.List<com.liferay.portal.model.Country> findAll(
216         int start, int end)
217         throws com.liferay.portal.kernel.exception.SystemException {
218         return getPersistence().findAll(start, end);
219     }
220 
221     public static java.util.List<com.liferay.portal.model.Country> findAll(
222         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.kernel.exception.SystemException {
224         return getPersistence().findAll(start, end, obc);
225     }
226 
227     public static void removeByName(java.lang.String name)
228         throws com.liferay.portal.NoSuchCountryException,
229             com.liferay.portal.kernel.exception.SystemException {
230         getPersistence().removeByName(name);
231     }
232 
233     public static void removeByA2(java.lang.String a2)
234         throws com.liferay.portal.NoSuchCountryException,
235             com.liferay.portal.kernel.exception.SystemException {
236         getPersistence().removeByA2(a2);
237     }
238 
239     public static void removeByA3(java.lang.String a3)
240         throws com.liferay.portal.NoSuchCountryException,
241             com.liferay.portal.kernel.exception.SystemException {
242         getPersistence().removeByA3(a3);
243     }
244 
245     public static void removeByActive(boolean active)
246         throws com.liferay.portal.kernel.exception.SystemException {
247         getPersistence().removeByActive(active);
248     }
249 
250     public static void removeAll()
251         throws com.liferay.portal.kernel.exception.SystemException {
252         getPersistence().removeAll();
253     }
254 
255     public static int countByName(java.lang.String name)
256         throws com.liferay.portal.kernel.exception.SystemException {
257         return getPersistence().countByName(name);
258     }
259 
260     public static int countByA2(java.lang.String a2)
261         throws com.liferay.portal.kernel.exception.SystemException {
262         return getPersistence().countByA2(a2);
263     }
264 
265     public static int countByA3(java.lang.String a3)
266         throws com.liferay.portal.kernel.exception.SystemException {
267         return getPersistence().countByA3(a3);
268     }
269 
270     public static int countByActive(boolean active)
271         throws com.liferay.portal.kernel.exception.SystemException {
272         return getPersistence().countByActive(active);
273     }
274 
275     public static int countAll()
276         throws com.liferay.portal.kernel.exception.SystemException {
277         return getPersistence().countAll();
278     }
279 
280     public static CountryPersistence getPersistence() {
281         if (_persistence == null) {
282             _persistence = (CountryPersistence)PortalBeanLocatorUtil.locate(CountryPersistence.class.getName());
283         }
284 
285         return _persistence;
286     }
287 
288     public void setPersistence(CountryPersistence persistence) {
289         _persistence = persistence;
290     }
291 
292     private static CountryPersistence _persistence;
293 }