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.Region;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="RegionUtil.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       RegionPersistence
34   * @see       RegionPersistenceImpl
35   * @generated
36   */
37  public class RegionUtil {
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 Region remove(Region region) throws SystemException {
65          return getPersistence().remove(region);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
70       */
71      public static Region update(Region region, boolean merge)
72          throws SystemException {
73          return getPersistence().update(region, merge);
74      }
75  
76      public static void cacheResult(com.liferay.portal.model.Region region) {
77          getPersistence().cacheResult(region);
78      }
79  
80      public static void cacheResult(
81          java.util.List<com.liferay.portal.model.Region> regions) {
82          getPersistence().cacheResult(regions);
83      }
84  
85      public static com.liferay.portal.model.Region create(long regionId) {
86          return getPersistence().create(regionId);
87      }
88  
89      public static com.liferay.portal.model.Region remove(long regionId)
90          throws com.liferay.portal.NoSuchRegionException,
91              com.liferay.portal.kernel.exception.SystemException {
92          return getPersistence().remove(regionId);
93      }
94  
95      public static com.liferay.portal.model.Region updateImpl(
96          com.liferay.portal.model.Region region, boolean merge)
97          throws com.liferay.portal.kernel.exception.SystemException {
98          return getPersistence().updateImpl(region, merge);
99      }
100 
101     public static com.liferay.portal.model.Region findByPrimaryKey(
102         long regionId)
103         throws com.liferay.portal.NoSuchRegionException,
104             com.liferay.portal.kernel.exception.SystemException {
105         return getPersistence().findByPrimaryKey(regionId);
106     }
107 
108     public static com.liferay.portal.model.Region fetchByPrimaryKey(
109         long regionId)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getPersistence().fetchByPrimaryKey(regionId);
112     }
113 
114     public static java.util.List<com.liferay.portal.model.Region> findByCountryId(
115         long countryId)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getPersistence().findByCountryId(countryId);
118     }
119 
120     public static java.util.List<com.liferay.portal.model.Region> findByCountryId(
121         long countryId, int start, int end)
122         throws com.liferay.portal.kernel.exception.SystemException {
123         return getPersistence().findByCountryId(countryId, start, end);
124     }
125 
126     public static java.util.List<com.liferay.portal.model.Region> findByCountryId(
127         long countryId, int start, int end,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.kernel.exception.SystemException {
130         return getPersistence().findByCountryId(countryId, start, end, obc);
131     }
132 
133     public static com.liferay.portal.model.Region findByCountryId_First(
134         long countryId, com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.NoSuchRegionException,
136             com.liferay.portal.kernel.exception.SystemException {
137         return getPersistence().findByCountryId_First(countryId, obc);
138     }
139 
140     public static com.liferay.portal.model.Region findByCountryId_Last(
141         long countryId, com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.NoSuchRegionException,
143             com.liferay.portal.kernel.exception.SystemException {
144         return getPersistence().findByCountryId_Last(countryId, obc);
145     }
146 
147     public static com.liferay.portal.model.Region[] findByCountryId_PrevAndNext(
148         long regionId, long countryId,
149         com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.NoSuchRegionException,
151             com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence()
153                    .findByCountryId_PrevAndNext(regionId, countryId, obc);
154     }
155 
156     public static java.util.List<com.liferay.portal.model.Region> findByActive(
157         boolean active)
158         throws com.liferay.portal.kernel.exception.SystemException {
159         return getPersistence().findByActive(active);
160     }
161 
162     public static java.util.List<com.liferay.portal.model.Region> findByActive(
163         boolean active, int start, int end)
164         throws com.liferay.portal.kernel.exception.SystemException {
165         return getPersistence().findByActive(active, start, end);
166     }
167 
168     public static java.util.List<com.liferay.portal.model.Region> findByActive(
169         boolean active, int start, int end,
170         com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.kernel.exception.SystemException {
172         return getPersistence().findByActive(active, start, end, obc);
173     }
174 
175     public static com.liferay.portal.model.Region findByActive_First(
176         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.NoSuchRegionException,
178             com.liferay.portal.kernel.exception.SystemException {
179         return getPersistence().findByActive_First(active, obc);
180     }
181 
182     public static com.liferay.portal.model.Region findByActive_Last(
183         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.NoSuchRegionException,
185             com.liferay.portal.kernel.exception.SystemException {
186         return getPersistence().findByActive_Last(active, obc);
187     }
188 
189     public static com.liferay.portal.model.Region[] findByActive_PrevAndNext(
190         long regionId, boolean active,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.NoSuchRegionException,
193             com.liferay.portal.kernel.exception.SystemException {
194         return getPersistence().findByActive_PrevAndNext(regionId, active, obc);
195     }
196 
197     public static java.util.List<com.liferay.portal.model.Region> findByC_A(
198         long countryId, boolean active)
199         throws com.liferay.portal.kernel.exception.SystemException {
200         return getPersistence().findByC_A(countryId, active);
201     }
202 
203     public static java.util.List<com.liferay.portal.model.Region> findByC_A(
204         long countryId, boolean active, int start, int end)
205         throws com.liferay.portal.kernel.exception.SystemException {
206         return getPersistence().findByC_A(countryId, active, start, end);
207     }
208 
209     public static java.util.List<com.liferay.portal.model.Region> findByC_A(
210         long countryId, boolean active, int start, int end,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.kernel.exception.SystemException {
213         return getPersistence().findByC_A(countryId, active, start, end, obc);
214     }
215 
216     public static com.liferay.portal.model.Region findByC_A_First(
217         long countryId, boolean active,
218         com.liferay.portal.kernel.util.OrderByComparator obc)
219         throws com.liferay.portal.NoSuchRegionException,
220             com.liferay.portal.kernel.exception.SystemException {
221         return getPersistence().findByC_A_First(countryId, active, obc);
222     }
223 
224     public static com.liferay.portal.model.Region findByC_A_Last(
225         long countryId, boolean active,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.NoSuchRegionException,
228             com.liferay.portal.kernel.exception.SystemException {
229         return getPersistence().findByC_A_Last(countryId, active, obc);
230     }
231 
232     public static com.liferay.portal.model.Region[] findByC_A_PrevAndNext(
233         long regionId, long countryId, boolean active,
234         com.liferay.portal.kernel.util.OrderByComparator obc)
235         throws com.liferay.portal.NoSuchRegionException,
236             com.liferay.portal.kernel.exception.SystemException {
237         return getPersistence()
238                    .findByC_A_PrevAndNext(regionId, countryId, active, obc);
239     }
240 
241     public static java.util.List<com.liferay.portal.model.Region> findAll()
242         throws com.liferay.portal.kernel.exception.SystemException {
243         return getPersistence().findAll();
244     }
245 
246     public static java.util.List<com.liferay.portal.model.Region> findAll(
247         int start, int end)
248         throws com.liferay.portal.kernel.exception.SystemException {
249         return getPersistence().findAll(start, end);
250     }
251 
252     public static java.util.List<com.liferay.portal.model.Region> findAll(
253         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
254         throws com.liferay.portal.kernel.exception.SystemException {
255         return getPersistence().findAll(start, end, obc);
256     }
257 
258     public static void removeByCountryId(long countryId)
259         throws com.liferay.portal.kernel.exception.SystemException {
260         getPersistence().removeByCountryId(countryId);
261     }
262 
263     public static void removeByActive(boolean active)
264         throws com.liferay.portal.kernel.exception.SystemException {
265         getPersistence().removeByActive(active);
266     }
267 
268     public static void removeByC_A(long countryId, boolean active)
269         throws com.liferay.portal.kernel.exception.SystemException {
270         getPersistence().removeByC_A(countryId, active);
271     }
272 
273     public static void removeAll()
274         throws com.liferay.portal.kernel.exception.SystemException {
275         getPersistence().removeAll();
276     }
277 
278     public static int countByCountryId(long countryId)
279         throws com.liferay.portal.kernel.exception.SystemException {
280         return getPersistence().countByCountryId(countryId);
281     }
282 
283     public static int countByActive(boolean active)
284         throws com.liferay.portal.kernel.exception.SystemException {
285         return getPersistence().countByActive(active);
286     }
287 
288     public static int countByC_A(long countryId, boolean active)
289         throws com.liferay.portal.kernel.exception.SystemException {
290         return getPersistence().countByC_A(countryId, active);
291     }
292 
293     public static int countAll()
294         throws com.liferay.portal.kernel.exception.SystemException {
295         return getPersistence().countAll();
296     }
297 
298     public static RegionPersistence getPersistence() {
299         if (_persistence == null) {
300             _persistence = (RegionPersistence)PortalBeanLocatorUtil.locate(RegionPersistence.class.getName());
301         }
302 
303         return _persistence;
304     }
305 
306     public void setPersistence(RegionPersistence persistence) {
307         _persistence = persistence;
308     }
309 
310     private static RegionPersistence _persistence;
311 }