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 orderByComparator)
188         throws com.liferay.portal.SystemException {
189         return getPersistence()
190                    .findByActive(active, start, end, orderByComparator);
191     }
192 
193     public static com.liferay.portal.model.Country findByActive_First(
194         boolean active,
195         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
196         throws com.liferay.portal.NoSuchCountryException,
197             com.liferay.portal.SystemException {
198         return getPersistence().findByActive_First(active, orderByComparator);
199     }
200 
201     public static com.liferay.portal.model.Country findByActive_Last(
202         boolean active,
203         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204         throws com.liferay.portal.NoSuchCountryException,
205             com.liferay.portal.SystemException {
206         return getPersistence().findByActive_Last(active, orderByComparator);
207     }
208 
209     public static com.liferay.portal.model.Country[] findByActive_PrevAndNext(
210         long countryId, boolean active,
211         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212         throws com.liferay.portal.NoSuchCountryException,
213             com.liferay.portal.SystemException {
214         return getPersistence()
215                    .findByActive_PrevAndNext(countryId, active,
216             orderByComparator);
217     }
218 
219     public static java.util.List<com.liferay.portal.model.Country> findAll()
220         throws com.liferay.portal.SystemException {
221         return getPersistence().findAll();
222     }
223 
224     public static java.util.List<com.liferay.portal.model.Country> findAll(
225         int start, int end) throws com.liferay.portal.SystemException {
226         return getPersistence().findAll(start, end);
227     }
228 
229     public static java.util.List<com.liferay.portal.model.Country> findAll(
230         int start, int end,
231         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
232         throws com.liferay.portal.SystemException {
233         return getPersistence().findAll(start, end, orderByComparator);
234     }
235 
236     public static void removeByName(java.lang.String name)
237         throws com.liferay.portal.NoSuchCountryException,
238             com.liferay.portal.SystemException {
239         getPersistence().removeByName(name);
240     }
241 
242     public static void removeByA2(java.lang.String a2)
243         throws com.liferay.portal.NoSuchCountryException,
244             com.liferay.portal.SystemException {
245         getPersistence().removeByA2(a2);
246     }
247 
248     public static void removeByA3(java.lang.String a3)
249         throws com.liferay.portal.NoSuchCountryException,
250             com.liferay.portal.SystemException {
251         getPersistence().removeByA3(a3);
252     }
253 
254     public static void removeByActive(boolean active)
255         throws com.liferay.portal.SystemException {
256         getPersistence().removeByActive(active);
257     }
258 
259     public static void removeAll() throws com.liferay.portal.SystemException {
260         getPersistence().removeAll();
261     }
262 
263     public static int countByName(java.lang.String name)
264         throws com.liferay.portal.SystemException {
265         return getPersistence().countByName(name);
266     }
267 
268     public static int countByA2(java.lang.String a2)
269         throws com.liferay.portal.SystemException {
270         return getPersistence().countByA2(a2);
271     }
272 
273     public static int countByA3(java.lang.String a3)
274         throws com.liferay.portal.SystemException {
275         return getPersistence().countByA3(a3);
276     }
277 
278     public static int countByActive(boolean active)
279         throws com.liferay.portal.SystemException {
280         return getPersistence().countByActive(active);
281     }
282 
283     public static int countAll() throws com.liferay.portal.SystemException {
284         return getPersistence().countAll();
285     }
286 
287     public static CountryPersistence getPersistence() {
288         if (_persistence == null) {
289             _persistence = (CountryPersistence)PortalBeanLocatorUtil.locate(CountryPersistence.class.getName());
290         }
291 
292         return _persistence;
293     }
294 
295     public void setPersistence(CountryPersistence persistence) {
296         _persistence = persistence;
297     }
298 
299     private static CountryPersistence _persistence;
300 }