001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service.persistence;
022:
023: /**
024: * <a href="RegionUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class RegionUtil {
030: public static com.liferay.portal.model.Region create(long regionId) {
031: return getPersistence().create(regionId);
032: }
033:
034: public static com.liferay.portal.model.Region remove(long regionId)
035: throws com.liferay.portal.SystemException,
036: com.liferay.portal.NoSuchRegionException {
037: return getPersistence().remove(regionId);
038: }
039:
040: public static com.liferay.portal.model.Region remove(
041: com.liferay.portal.model.Region region)
042: throws com.liferay.portal.SystemException {
043: return getPersistence().remove(region);
044: }
045:
046: public static com.liferay.portal.model.Region update(
047: com.liferay.portal.model.Region region)
048: throws com.liferay.portal.SystemException {
049: return getPersistence().update(region);
050: }
051:
052: public static com.liferay.portal.model.Region update(
053: com.liferay.portal.model.Region region, boolean merge)
054: throws com.liferay.portal.SystemException {
055: return getPersistence().update(region, merge);
056: }
057:
058: public static com.liferay.portal.model.Region updateImpl(
059: com.liferay.portal.model.Region region, boolean merge)
060: throws com.liferay.portal.SystemException {
061: return getPersistence().updateImpl(region, merge);
062: }
063:
064: public static com.liferay.portal.model.Region findByPrimaryKey(
065: long regionId) throws com.liferay.portal.SystemException,
066: com.liferay.portal.NoSuchRegionException {
067: return getPersistence().findByPrimaryKey(regionId);
068: }
069:
070: public static com.liferay.portal.model.Region fetchByPrimaryKey(
071: long regionId) throws com.liferay.portal.SystemException {
072: return getPersistence().fetchByPrimaryKey(regionId);
073: }
074:
075: public static java.util.List findByCountryId(long countryId)
076: throws com.liferay.portal.SystemException {
077: return getPersistence().findByCountryId(countryId);
078: }
079:
080: public static java.util.List findByCountryId(long countryId,
081: int begin, int end)
082: throws com.liferay.portal.SystemException {
083: return getPersistence().findByCountryId(countryId, begin, end);
084: }
085:
086: public static java.util.List findByCountryId(long countryId,
087: int begin, int end,
088: com.liferay.portal.kernel.util.OrderByComparator obc)
089: throws com.liferay.portal.SystemException {
090: return getPersistence().findByCountryId(countryId, begin, end,
091: obc);
092: }
093:
094: public static com.liferay.portal.model.Region findByCountryId_First(
095: long countryId,
096: com.liferay.portal.kernel.util.OrderByComparator obc)
097: throws com.liferay.portal.SystemException,
098: com.liferay.portal.NoSuchRegionException {
099: return getPersistence().findByCountryId_First(countryId, obc);
100: }
101:
102: public static com.liferay.portal.model.Region findByCountryId_Last(
103: long countryId,
104: com.liferay.portal.kernel.util.OrderByComparator obc)
105: throws com.liferay.portal.SystemException,
106: com.liferay.portal.NoSuchRegionException {
107: return getPersistence().findByCountryId_Last(countryId, obc);
108: }
109:
110: public static com.liferay.portal.model.Region[] findByCountryId_PrevAndNext(
111: long regionId, long countryId,
112: com.liferay.portal.kernel.util.OrderByComparator obc)
113: throws com.liferay.portal.SystemException,
114: com.liferay.portal.NoSuchRegionException {
115: return getPersistence().findByCountryId_PrevAndNext(regionId,
116: countryId, obc);
117: }
118:
119: public static java.util.List findByActive(boolean active)
120: throws com.liferay.portal.SystemException {
121: return getPersistence().findByActive(active);
122: }
123:
124: public static java.util.List findByActive(boolean active,
125: int begin, int end)
126: throws com.liferay.portal.SystemException {
127: return getPersistence().findByActive(active, begin, end);
128: }
129:
130: public static java.util.List findByActive(boolean active,
131: int begin, int end,
132: com.liferay.portal.kernel.util.OrderByComparator obc)
133: throws com.liferay.portal.SystemException {
134: return getPersistence().findByActive(active, begin, end, obc);
135: }
136:
137: public static com.liferay.portal.model.Region findByActive_First(
138: boolean active,
139: com.liferay.portal.kernel.util.OrderByComparator obc)
140: throws com.liferay.portal.SystemException,
141: com.liferay.portal.NoSuchRegionException {
142: return getPersistence().findByActive_First(active, obc);
143: }
144:
145: public static com.liferay.portal.model.Region findByActive_Last(
146: boolean active,
147: com.liferay.portal.kernel.util.OrderByComparator obc)
148: throws com.liferay.portal.SystemException,
149: com.liferay.portal.NoSuchRegionException {
150: return getPersistence().findByActive_Last(active, obc);
151: }
152:
153: public static com.liferay.portal.model.Region[] findByActive_PrevAndNext(
154: long regionId, boolean active,
155: com.liferay.portal.kernel.util.OrderByComparator obc)
156: throws com.liferay.portal.SystemException,
157: com.liferay.portal.NoSuchRegionException {
158: return getPersistence().findByActive_PrevAndNext(regionId,
159: active, obc);
160: }
161:
162: public static java.util.List findByC_A(long countryId,
163: boolean active) throws com.liferay.portal.SystemException {
164: return getPersistence().findByC_A(countryId, active);
165: }
166:
167: public static java.util.List findByC_A(long countryId,
168: boolean active, int begin, int end)
169: throws com.liferay.portal.SystemException {
170: return getPersistence()
171: .findByC_A(countryId, active, begin, end);
172: }
173:
174: public static java.util.List findByC_A(long countryId,
175: boolean active, int begin, int end,
176: com.liferay.portal.kernel.util.OrderByComparator obc)
177: throws com.liferay.portal.SystemException {
178: return getPersistence().findByC_A(countryId, active, begin,
179: end, obc);
180: }
181:
182: public static com.liferay.portal.model.Region findByC_A_First(
183: long countryId, boolean active,
184: com.liferay.portal.kernel.util.OrderByComparator obc)
185: throws com.liferay.portal.SystemException,
186: com.liferay.portal.NoSuchRegionException {
187: return getPersistence().findByC_A_First(countryId, active, obc);
188: }
189:
190: public static com.liferay.portal.model.Region findByC_A_Last(
191: long countryId, boolean active,
192: com.liferay.portal.kernel.util.OrderByComparator obc)
193: throws com.liferay.portal.SystemException,
194: com.liferay.portal.NoSuchRegionException {
195: return getPersistence().findByC_A_Last(countryId, active, obc);
196: }
197:
198: public static com.liferay.portal.model.Region[] findByC_A_PrevAndNext(
199: long regionId, long countryId, boolean active,
200: com.liferay.portal.kernel.util.OrderByComparator obc)
201: throws com.liferay.portal.SystemException,
202: com.liferay.portal.NoSuchRegionException {
203: return getPersistence().findByC_A_PrevAndNext(regionId,
204: countryId, active, obc);
205: }
206:
207: public static java.util.List findWithDynamicQuery(
208: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
209: throws com.liferay.portal.SystemException {
210: return getPersistence().findWithDynamicQuery(queryInitializer);
211: }
212:
213: public static java.util.List findWithDynamicQuery(
214: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
215: int begin, int end)
216: throws com.liferay.portal.SystemException {
217: return getPersistence().findWithDynamicQuery(queryInitializer,
218: begin, end);
219: }
220:
221: public static java.util.List findAll()
222: throws com.liferay.portal.SystemException {
223: return getPersistence().findAll();
224: }
225:
226: public static java.util.List findAll(int begin, int end)
227: throws com.liferay.portal.SystemException {
228: return getPersistence().findAll(begin, end);
229: }
230:
231: public static java.util.List findAll(int begin, int end,
232: com.liferay.portal.kernel.util.OrderByComparator obc)
233: throws com.liferay.portal.SystemException {
234: return getPersistence().findAll(begin, end, obc);
235: }
236:
237: public static void removeByCountryId(long countryId)
238: throws com.liferay.portal.SystemException {
239: getPersistence().removeByCountryId(countryId);
240: }
241:
242: public static void removeByActive(boolean active)
243: throws com.liferay.portal.SystemException {
244: getPersistence().removeByActive(active);
245: }
246:
247: public static void removeByC_A(long countryId, boolean active)
248: throws com.liferay.portal.SystemException {
249: getPersistence().removeByC_A(countryId, active);
250: }
251:
252: public static void removeAll()
253: throws com.liferay.portal.SystemException {
254: getPersistence().removeAll();
255: }
256:
257: public static int countByCountryId(long countryId)
258: throws com.liferay.portal.SystemException {
259: return getPersistence().countByCountryId(countryId);
260: }
261:
262: public static int countByActive(boolean active)
263: throws com.liferay.portal.SystemException {
264: return getPersistence().countByActive(active);
265: }
266:
267: public static int countByC_A(long countryId, boolean active)
268: throws com.liferay.portal.SystemException {
269: return getPersistence().countByC_A(countryId, active);
270: }
271:
272: public static int countAll()
273: throws com.liferay.portal.SystemException {
274: return getPersistence().countAll();
275: }
276:
277: public static RegionPersistence getPersistence() {
278: return _getUtil()._persistence;
279: }
280:
281: public void setPersistence(RegionPersistence persistence) {
282: _persistence = persistence;
283: }
284:
285: private static RegionUtil _getUtil() {
286: if (_util == null) {
287: _util = (RegionUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
288: .locate(_UTIL);
289: }
290:
291: return _util;
292: }
293:
294: private static final String _UTIL = RegionUtil.class.getName();
295: private static RegionUtil _util;
296: private RegionPersistence _persistence;
297: }
|