001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.Country;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       CountryPersistence
029     * @see       CountryPersistenceImpl
030     * @generated
031     */
032    public class CountryUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(Country country) {
044                    getPersistence().clearCache(country);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<Country> findWithDynamicQuery(DynamicQuery dynamicQuery)
059                    throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<Country> findWithDynamicQuery(
067                    DynamicQuery dynamicQuery, int start, int end)
068                    throws SystemException {
069                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
074             */
075            public static List<Country> findWithDynamicQuery(
076                    DynamicQuery dynamicQuery, int start, int end,
077                    OrderByComparator orderByComparator) throws SystemException {
078                    return getPersistence()
079                                       .findWithDynamicQuery(dynamicQuery, start, end,
080                            orderByComparator);
081            }
082    
083            /**
084             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
085             */
086            public static Country remove(Country country) throws SystemException {
087                    return getPersistence().remove(country);
088            }
089    
090            /**
091             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
092             */
093            public static Country update(Country country, boolean merge)
094                    throws SystemException {
095                    return getPersistence().update(country, merge);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
100             */
101            public static Country update(Country country, boolean merge,
102                    ServiceContext serviceContext) throws SystemException {
103                    return getPersistence().update(country, merge, serviceContext);
104            }
105    
106            public static void cacheResult(com.liferay.portal.model.Country country) {
107                    getPersistence().cacheResult(country);
108            }
109    
110            public static void cacheResult(
111                    java.util.List<com.liferay.portal.model.Country> countries) {
112                    getPersistence().cacheResult(countries);
113            }
114    
115            public static com.liferay.portal.model.Country create(long countryId) {
116                    return getPersistence().create(countryId);
117            }
118    
119            public static com.liferay.portal.model.Country remove(long countryId)
120                    throws com.liferay.portal.NoSuchCountryException,
121                            com.liferay.portal.kernel.exception.SystemException {
122                    return getPersistence().remove(countryId);
123            }
124    
125            public static com.liferay.portal.model.Country updateImpl(
126                    com.liferay.portal.model.Country country, boolean merge)
127                    throws com.liferay.portal.kernel.exception.SystemException {
128                    return getPersistence().updateImpl(country, merge);
129            }
130    
131            public static com.liferay.portal.model.Country findByPrimaryKey(
132                    long countryId)
133                    throws com.liferay.portal.NoSuchCountryException,
134                            com.liferay.portal.kernel.exception.SystemException {
135                    return getPersistence().findByPrimaryKey(countryId);
136            }
137    
138            public static com.liferay.portal.model.Country fetchByPrimaryKey(
139                    long countryId)
140                    throws com.liferay.portal.kernel.exception.SystemException {
141                    return getPersistence().fetchByPrimaryKey(countryId);
142            }
143    
144            public static com.liferay.portal.model.Country findByName(
145                    java.lang.String name)
146                    throws com.liferay.portal.NoSuchCountryException,
147                            com.liferay.portal.kernel.exception.SystemException {
148                    return getPersistence().findByName(name);
149            }
150    
151            public static com.liferay.portal.model.Country fetchByName(
152                    java.lang.String name)
153                    throws com.liferay.portal.kernel.exception.SystemException {
154                    return getPersistence().fetchByName(name);
155            }
156    
157            public static com.liferay.portal.model.Country fetchByName(
158                    java.lang.String name, boolean retrieveFromCache)
159                    throws com.liferay.portal.kernel.exception.SystemException {
160                    return getPersistence().fetchByName(name, retrieveFromCache);
161            }
162    
163            public static com.liferay.portal.model.Country findByA2(java.lang.String a2)
164                    throws com.liferay.portal.NoSuchCountryException,
165                            com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence().findByA2(a2);
167            }
168    
169            public static com.liferay.portal.model.Country fetchByA2(
170                    java.lang.String a2)
171                    throws com.liferay.portal.kernel.exception.SystemException {
172                    return getPersistence().fetchByA2(a2);
173            }
174    
175            public static com.liferay.portal.model.Country fetchByA2(
176                    java.lang.String a2, boolean retrieveFromCache)
177                    throws com.liferay.portal.kernel.exception.SystemException {
178                    return getPersistence().fetchByA2(a2, retrieveFromCache);
179            }
180    
181            public static com.liferay.portal.model.Country findByA3(java.lang.String a3)
182                    throws com.liferay.portal.NoSuchCountryException,
183                            com.liferay.portal.kernel.exception.SystemException {
184                    return getPersistence().findByA3(a3);
185            }
186    
187            public static com.liferay.portal.model.Country fetchByA3(
188                    java.lang.String a3)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().fetchByA3(a3);
191            }
192    
193            public static com.liferay.portal.model.Country fetchByA3(
194                    java.lang.String a3, boolean retrieveFromCache)
195                    throws com.liferay.portal.kernel.exception.SystemException {
196                    return getPersistence().fetchByA3(a3, retrieveFromCache);
197            }
198    
199            public static java.util.List<com.liferay.portal.model.Country> findByActive(
200                    boolean active)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return getPersistence().findByActive(active);
203            }
204    
205            public static java.util.List<com.liferay.portal.model.Country> findByActive(
206                    boolean active, int start, int end)
207                    throws com.liferay.portal.kernel.exception.SystemException {
208                    return getPersistence().findByActive(active, start, end);
209            }
210    
211            public static java.util.List<com.liferay.portal.model.Country> findByActive(
212                    boolean active, int start, int end,
213                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214                    throws com.liferay.portal.kernel.exception.SystemException {
215                    return getPersistence()
216                                       .findByActive(active, start, end, orderByComparator);
217            }
218    
219            public static com.liferay.portal.model.Country findByActive_First(
220                    boolean active,
221                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222                    throws com.liferay.portal.NoSuchCountryException,
223                            com.liferay.portal.kernel.exception.SystemException {
224                    return getPersistence().findByActive_First(active, orderByComparator);
225            }
226    
227            public static com.liferay.portal.model.Country findByActive_Last(
228                    boolean active,
229                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230                    throws com.liferay.portal.NoSuchCountryException,
231                            com.liferay.portal.kernel.exception.SystemException {
232                    return getPersistence().findByActive_Last(active, orderByComparator);
233            }
234    
235            public static com.liferay.portal.model.Country[] findByActive_PrevAndNext(
236                    long countryId, boolean active,
237                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
238                    throws com.liferay.portal.NoSuchCountryException,
239                            com.liferay.portal.kernel.exception.SystemException {
240                    return getPersistence()
241                                       .findByActive_PrevAndNext(countryId, active,
242                            orderByComparator);
243            }
244    
245            public static java.util.List<com.liferay.portal.model.Country> findAll()
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return getPersistence().findAll();
248            }
249    
250            public static java.util.List<com.liferay.portal.model.Country> findAll(
251                    int start, int end)
252                    throws com.liferay.portal.kernel.exception.SystemException {
253                    return getPersistence().findAll(start, end);
254            }
255    
256            public static java.util.List<com.liferay.portal.model.Country> findAll(
257                    int start, int end,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.kernel.exception.SystemException {
260                    return getPersistence().findAll(start, end, orderByComparator);
261            }
262    
263            public static void removeByName(java.lang.String name)
264                    throws com.liferay.portal.NoSuchCountryException,
265                            com.liferay.portal.kernel.exception.SystemException {
266                    getPersistence().removeByName(name);
267            }
268    
269            public static void removeByA2(java.lang.String a2)
270                    throws com.liferay.portal.NoSuchCountryException,
271                            com.liferay.portal.kernel.exception.SystemException {
272                    getPersistence().removeByA2(a2);
273            }
274    
275            public static void removeByA3(java.lang.String a3)
276                    throws com.liferay.portal.NoSuchCountryException,
277                            com.liferay.portal.kernel.exception.SystemException {
278                    getPersistence().removeByA3(a3);
279            }
280    
281            public static void removeByActive(boolean active)
282                    throws com.liferay.portal.kernel.exception.SystemException {
283                    getPersistence().removeByActive(active);
284            }
285    
286            public static void removeAll()
287                    throws com.liferay.portal.kernel.exception.SystemException {
288                    getPersistence().removeAll();
289            }
290    
291            public static int countByName(java.lang.String name)
292                    throws com.liferay.portal.kernel.exception.SystemException {
293                    return getPersistence().countByName(name);
294            }
295    
296            public static int countByA2(java.lang.String a2)
297                    throws com.liferay.portal.kernel.exception.SystemException {
298                    return getPersistence().countByA2(a2);
299            }
300    
301            public static int countByA3(java.lang.String a3)
302                    throws com.liferay.portal.kernel.exception.SystemException {
303                    return getPersistence().countByA3(a3);
304            }
305    
306            public static int countByActive(boolean active)
307                    throws com.liferay.portal.kernel.exception.SystemException {
308                    return getPersistence().countByActive(active);
309            }
310    
311            public static int countAll()
312                    throws com.liferay.portal.kernel.exception.SystemException {
313                    return getPersistence().countAll();
314            }
315    
316            public static CountryPersistence getPersistence() {
317                    if (_persistence == null) {
318                            _persistence = (CountryPersistence)PortalBeanLocatorUtil.locate(CountryPersistence.class.getName());
319                    }
320    
321                    return _persistence;
322            }
323    
324            public void setPersistence(CountryPersistence persistence) {
325                    _persistence = persistence;
326            }
327    
328            private static CountryPersistence _persistence;
329    }