1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
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.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.SystemException {
92          return getPersistence().remove(countryId);
93      }
94  
95      /**
96       * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
97       */
98      public static com.liferay.portal.model.Country update(
99          com.liferay.portal.model.Country country)
100         throws com.liferay.portal.SystemException {
101         return getPersistence().update(country);
102     }
103 
104     public static com.liferay.portal.model.Country updateImpl(
105         com.liferay.portal.model.Country country, boolean merge)
106         throws com.liferay.portal.SystemException {
107         return getPersistence().updateImpl(country, merge);
108     }
109 
110     public static com.liferay.portal.model.Country findByPrimaryKey(
111         long countryId)
112         throws com.liferay.portal.NoSuchCountryException,
113             com.liferay.portal.SystemException {
114         return getPersistence().findByPrimaryKey(countryId);
115     }
116 
117     public static com.liferay.portal.model.Country fetchByPrimaryKey(
118         long countryId) throws com.liferay.portal.SystemException {
119         return getPersistence().fetchByPrimaryKey(countryId);
120     }
121 
122     public static com.liferay.portal.model.Country findByName(
123         java.lang.String name)
124         throws com.liferay.portal.NoSuchCountryException,
125             com.liferay.portal.SystemException {
126         return getPersistence().findByName(name);
127     }
128 
129     public static com.liferay.portal.model.Country fetchByName(
130         java.lang.String name) throws com.liferay.portal.SystemException {
131         return getPersistence().fetchByName(name);
132     }
133 
134     public static com.liferay.portal.model.Country fetchByName(
135         java.lang.String name, boolean retrieveFromCache)
136         throws com.liferay.portal.SystemException {
137         return getPersistence().fetchByName(name, retrieveFromCache);
138     }
139 
140     public static com.liferay.portal.model.Country findByA2(java.lang.String a2)
141         throws com.liferay.portal.NoSuchCountryException,
142             com.liferay.portal.SystemException {
143         return getPersistence().findByA2(a2);
144     }
145 
146     public static com.liferay.portal.model.Country fetchByA2(
147         java.lang.String a2) throws com.liferay.portal.SystemException {
148         return getPersistence().fetchByA2(a2);
149     }
150 
151     public static com.liferay.portal.model.Country fetchByA2(
152         java.lang.String a2, boolean retrieveFromCache)
153         throws com.liferay.portal.SystemException {
154         return getPersistence().fetchByA2(a2, retrieveFromCache);
155     }
156 
157     public static com.liferay.portal.model.Country findByA3(java.lang.String a3)
158         throws com.liferay.portal.NoSuchCountryException,
159             com.liferay.portal.SystemException {
160         return getPersistence().findByA3(a3);
161     }
162 
163     public static com.liferay.portal.model.Country fetchByA3(
164         java.lang.String a3) throws com.liferay.portal.SystemException {
165         return getPersistence().fetchByA3(a3);
166     }
167 
168     public static com.liferay.portal.model.Country fetchByA3(
169         java.lang.String a3, boolean retrieveFromCache)
170         throws com.liferay.portal.SystemException {
171         return getPersistence().fetchByA3(a3, retrieveFromCache);
172     }
173 
174     public static java.util.List<com.liferay.portal.model.Country> findByActive(
175         boolean active) throws com.liferay.portal.SystemException {
176         return getPersistence().findByActive(active);
177     }
178 
179     public static java.util.List<com.liferay.portal.model.Country> findByActive(
180         boolean active, int start, int end)
181         throws com.liferay.portal.SystemException {
182         return getPersistence().findByActive(active, start, end);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.Country> findByActive(
186         boolean active, int start, int end,
187         com.liferay.portal.kernel.util.OrderByComparator obc)
188         throws com.liferay.portal.SystemException {
189         return getPersistence().findByActive(active, start, end, obc);
190     }
191 
192     public static com.liferay.portal.model.Country findByActive_First(
193         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.NoSuchCountryException,
195             com.liferay.portal.SystemException {
196         return getPersistence().findByActive_First(active, obc);
197     }
198 
199     public static com.liferay.portal.model.Country findByActive_Last(
200         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.NoSuchCountryException,
202             com.liferay.portal.SystemException {
203         return getPersistence().findByActive_Last(active, obc);
204     }
205 
206     public static com.liferay.portal.model.Country[] findByActive_PrevAndNext(
207         long countryId, boolean active,
208         com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.NoSuchCountryException,
210             com.liferay.portal.SystemException {
211         return getPersistence().findByActive_PrevAndNext(countryId, active, obc);
212     }
213 
214     public static java.util.List<com.liferay.portal.model.Country> findAll()
215         throws com.liferay.portal.SystemException {
216         return getPersistence().findAll();
217     }
218 
219     public static java.util.List<com.liferay.portal.model.Country> findAll(
220         int start, int end) throws com.liferay.portal.SystemException {
221         return getPersistence().findAll(start, end);
222     }
223 
224     public static java.util.List<com.liferay.portal.model.Country> findAll(
225         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().findAll(start, end, obc);
228     }
229 
230     public static void removeByName(java.lang.String name)
231         throws com.liferay.portal.NoSuchCountryException,
232             com.liferay.portal.SystemException {
233         getPersistence().removeByName(name);
234     }
235 
236     public static void removeByA2(java.lang.String a2)
237         throws com.liferay.portal.NoSuchCountryException,
238             com.liferay.portal.SystemException {
239         getPersistence().removeByA2(a2);
240     }
241 
242     public static void removeByA3(java.lang.String a3)
243         throws com.liferay.portal.NoSuchCountryException,
244             com.liferay.portal.SystemException {
245         getPersistence().removeByA3(a3);
246     }
247 
248     public static void removeByActive(boolean active)
249         throws com.liferay.portal.SystemException {
250         getPersistence().removeByActive(active);
251     }
252 
253     public static void removeAll() throws com.liferay.portal.SystemException {
254         getPersistence().removeAll();
255     }
256 
257     public static int countByName(java.lang.String name)
258         throws com.liferay.portal.SystemException {
259         return getPersistence().countByName(name);
260     }
261 
262     public static int countByA2(java.lang.String a2)
263         throws com.liferay.portal.SystemException {
264         return getPersistence().countByA2(a2);
265     }
266 
267     public static int countByA3(java.lang.String a3)
268         throws com.liferay.portal.SystemException {
269         return getPersistence().countByA3(a3);
270     }
271 
272     public static int countByActive(boolean active)
273         throws com.liferay.portal.SystemException {
274         return getPersistence().countByActive(active);
275     }
276 
277     public static int countAll() throws com.liferay.portal.SystemException {
278         return getPersistence().countAll();
279     }
280 
281     public static CountryPersistence getPersistence() {
282         if (_persistence == null) {
283             _persistence = (CountryPersistence)PortalBeanLocatorUtil.locate(CountryPersistence.class.getName());
284         }
285 
286         return _persistence;
287     }
288 
289     public void setPersistence(CountryPersistence persistence) {
290         _persistence = persistence;
291     }
292 
293     private static CountryPersistence _persistence;
294 }