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