1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  import com.liferay.portal.model.Region;
29  
30  import java.util.List;
31  
32  /**
33   * <a href="RegionUtil.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be
37   * overwritten the next time is generated.
38   * </p>
39   *
40   * @author    Brian Wing Shun Chan
41   * @see       RegionPersistence
42   * @see       RegionPersistenceImpl
43   * @generated
44   */
45  public class RegionUtil {
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
48       */
49      public static void clearCache() {
50          getPersistence().clearCache();
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
65          int start, int end) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
71       */
72      public static Region remove(Region region) throws SystemException {
73          return getPersistence().remove(region);
74      }
75  
76      /**
77       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
78       */
79      public static Region update(Region region, boolean merge)
80          throws SystemException {
81          return getPersistence().update(region, merge);
82      }
83  
84      public static void cacheResult(com.liferay.portal.model.Region region) {
85          getPersistence().cacheResult(region);
86      }
87  
88      public static void cacheResult(
89          java.util.List<com.liferay.portal.model.Region> regions) {
90          getPersistence().cacheResult(regions);
91      }
92  
93      public static com.liferay.portal.model.Region create(long regionId) {
94          return getPersistence().create(regionId);
95      }
96  
97      public static com.liferay.portal.model.Region remove(long regionId)
98          throws com.liferay.portal.NoSuchRegionException,
99              com.liferay.portal.SystemException {
100         return getPersistence().remove(regionId);
101     }
102 
103     /**
104      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
105      */
106     public static com.liferay.portal.model.Region update(
107         com.liferay.portal.model.Region region)
108         throws com.liferay.portal.SystemException {
109         return getPersistence().update(region);
110     }
111 
112     public static com.liferay.portal.model.Region updateImpl(
113         com.liferay.portal.model.Region region, boolean merge)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().updateImpl(region, merge);
116     }
117 
118     public static com.liferay.portal.model.Region findByPrimaryKey(
119         long regionId)
120         throws com.liferay.portal.NoSuchRegionException,
121             com.liferay.portal.SystemException {
122         return getPersistence().findByPrimaryKey(regionId);
123     }
124 
125     public static com.liferay.portal.model.Region fetchByPrimaryKey(
126         long regionId) throws com.liferay.portal.SystemException {
127         return getPersistence().fetchByPrimaryKey(regionId);
128     }
129 
130     public static java.util.List<com.liferay.portal.model.Region> findByCountryId(
131         long countryId) throws com.liferay.portal.SystemException {
132         return getPersistence().findByCountryId(countryId);
133     }
134 
135     public static java.util.List<com.liferay.portal.model.Region> findByCountryId(
136         long countryId, int start, int end)
137         throws com.liferay.portal.SystemException {
138         return getPersistence().findByCountryId(countryId, start, end);
139     }
140 
141     public static java.util.List<com.liferay.portal.model.Region> findByCountryId(
142         long countryId, int start, int end,
143         com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByCountryId(countryId, start, end, obc);
146     }
147 
148     public static com.liferay.portal.model.Region findByCountryId_First(
149         long countryId, com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.NoSuchRegionException,
151             com.liferay.portal.SystemException {
152         return getPersistence().findByCountryId_First(countryId, obc);
153     }
154 
155     public static com.liferay.portal.model.Region findByCountryId_Last(
156         long countryId, com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.NoSuchRegionException,
158             com.liferay.portal.SystemException {
159         return getPersistence().findByCountryId_Last(countryId, obc);
160     }
161 
162     public static com.liferay.portal.model.Region[] findByCountryId_PrevAndNext(
163         long regionId, long countryId,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.NoSuchRegionException,
166             com.liferay.portal.SystemException {
167         return getPersistence()
168                    .findByCountryId_PrevAndNext(regionId, countryId, obc);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.Region> findByActive(
172         boolean active) throws com.liferay.portal.SystemException {
173         return getPersistence().findByActive(active);
174     }
175 
176     public static java.util.List<com.liferay.portal.model.Region> findByActive(
177         boolean active, int start, int end)
178         throws com.liferay.portal.SystemException {
179         return getPersistence().findByActive(active, start, end);
180     }
181 
182     public static java.util.List<com.liferay.portal.model.Region> findByActive(
183         boolean active, int start, int end,
184         com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException {
186         return getPersistence().findByActive(active, start, end, obc);
187     }
188 
189     public static com.liferay.portal.model.Region findByActive_First(
190         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.NoSuchRegionException,
192             com.liferay.portal.SystemException {
193         return getPersistence().findByActive_First(active, obc);
194     }
195 
196     public static com.liferay.portal.model.Region findByActive_Last(
197         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.NoSuchRegionException,
199             com.liferay.portal.SystemException {
200         return getPersistence().findByActive_Last(active, obc);
201     }
202 
203     public static com.liferay.portal.model.Region[] findByActive_PrevAndNext(
204         long regionId, boolean active,
205         com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.NoSuchRegionException,
207             com.liferay.portal.SystemException {
208         return getPersistence().findByActive_PrevAndNext(regionId, active, obc);
209     }
210 
211     public static java.util.List<com.liferay.portal.model.Region> findByC_A(
212         long countryId, boolean active)
213         throws com.liferay.portal.SystemException {
214         return getPersistence().findByC_A(countryId, active);
215     }
216 
217     public static java.util.List<com.liferay.portal.model.Region> findByC_A(
218         long countryId, boolean active, int start, int end)
219         throws com.liferay.portal.SystemException {
220         return getPersistence().findByC_A(countryId, active, start, end);
221     }
222 
223     public static java.util.List<com.liferay.portal.model.Region> findByC_A(
224         long countryId, boolean active, int start, int end,
225         com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().findByC_A(countryId, active, start, end, obc);
228     }
229 
230     public static com.liferay.portal.model.Region findByC_A_First(
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_First(countryId, active, obc);
236     }
237 
238     public static com.liferay.portal.model.Region findByC_A_Last(
239         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().findByC_A_Last(countryId, active, obc);
244     }
245 
246     public static com.liferay.portal.model.Region[] findByC_A_PrevAndNext(
247         long regionId, long countryId, boolean active,
248         com.liferay.portal.kernel.util.OrderByComparator obc)
249         throws com.liferay.portal.NoSuchRegionException,
250             com.liferay.portal.SystemException {
251         return getPersistence()
252                    .findByC_A_PrevAndNext(regionId, countryId, active, obc);
253     }
254 
255     public static java.util.List<com.liferay.portal.model.Region> findAll()
256         throws com.liferay.portal.SystemException {
257         return getPersistence().findAll();
258     }
259 
260     public static java.util.List<com.liferay.portal.model.Region> findAll(
261         int start, int end) throws com.liferay.portal.SystemException {
262         return getPersistence().findAll(start, end);
263     }
264 
265     public static java.util.List<com.liferay.portal.model.Region> findAll(
266         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
267         throws com.liferay.portal.SystemException {
268         return getPersistence().findAll(start, end, obc);
269     }
270 
271     public static void removeByCountryId(long countryId)
272         throws com.liferay.portal.SystemException {
273         getPersistence().removeByCountryId(countryId);
274     }
275 
276     public static void removeByActive(boolean active)
277         throws com.liferay.portal.SystemException {
278         getPersistence().removeByActive(active);
279     }
280 
281     public static void removeByC_A(long countryId, boolean active)
282         throws com.liferay.portal.SystemException {
283         getPersistence().removeByC_A(countryId, active);
284     }
285 
286     public static void removeAll() throws com.liferay.portal.SystemException {
287         getPersistence().removeAll();
288     }
289 
290     public static int countByCountryId(long countryId)
291         throws com.liferay.portal.SystemException {
292         return getPersistence().countByCountryId(countryId);
293     }
294 
295     public static int countByActive(boolean active)
296         throws com.liferay.portal.SystemException {
297         return getPersistence().countByActive(active);
298     }
299 
300     public static int countByC_A(long countryId, boolean active)
301         throws com.liferay.portal.SystemException {
302         return getPersistence().countByC_A(countryId, active);
303     }
304 
305     public static int countAll() throws com.liferay.portal.SystemException {
306         return getPersistence().countAll();
307     }
308 
309     public static RegionPersistence getPersistence() {
310         if (_persistence == null) {
311             _persistence = (RegionPersistence)PortalBeanLocatorUtil.locate(RegionPersistence.class.getName());
312         }
313 
314         return _persistence;
315     }
316 
317     public void setPersistence(RegionPersistence persistence) {
318         _persistence = persistence;
319     }
320 
321     private static RegionPersistence _persistence;
322 }