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="CountryUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class CountryUtil {
030: public static com.liferay.portal.model.Country create(long countryId) {
031: return getPersistence().create(countryId);
032: }
033:
034: public static com.liferay.portal.model.Country remove(long countryId)
035: throws com.liferay.portal.SystemException,
036: com.liferay.portal.NoSuchCountryException {
037: return getPersistence().remove(countryId);
038: }
039:
040: public static com.liferay.portal.model.Country remove(
041: com.liferay.portal.model.Country country)
042: throws com.liferay.portal.SystemException {
043: return getPersistence().remove(country);
044: }
045:
046: public static com.liferay.portal.model.Country update(
047: com.liferay.portal.model.Country country)
048: throws com.liferay.portal.SystemException {
049: return getPersistence().update(country);
050: }
051:
052: public static com.liferay.portal.model.Country update(
053: com.liferay.portal.model.Country country, boolean merge)
054: throws com.liferay.portal.SystemException {
055: return getPersistence().update(country, merge);
056: }
057:
058: public static com.liferay.portal.model.Country updateImpl(
059: com.liferay.portal.model.Country country, boolean merge)
060: throws com.liferay.portal.SystemException {
061: return getPersistence().updateImpl(country, merge);
062: }
063:
064: public static com.liferay.portal.model.Country findByPrimaryKey(
065: long countryId) throws com.liferay.portal.SystemException,
066: com.liferay.portal.NoSuchCountryException {
067: return getPersistence().findByPrimaryKey(countryId);
068: }
069:
070: public static com.liferay.portal.model.Country fetchByPrimaryKey(
071: long countryId) throws com.liferay.portal.SystemException {
072: return getPersistence().fetchByPrimaryKey(countryId);
073: }
074:
075: public static java.util.List findByActive(boolean active)
076: throws com.liferay.portal.SystemException {
077: return getPersistence().findByActive(active);
078: }
079:
080: public static java.util.List findByActive(boolean active,
081: int begin, int end)
082: throws com.liferay.portal.SystemException {
083: return getPersistence().findByActive(active, begin, end);
084: }
085:
086: public static java.util.List findByActive(boolean active,
087: int begin, int end,
088: com.liferay.portal.kernel.util.OrderByComparator obc)
089: throws com.liferay.portal.SystemException {
090: return getPersistence().findByActive(active, begin, end, obc);
091: }
092:
093: public static com.liferay.portal.model.Country findByActive_First(
094: boolean active,
095: com.liferay.portal.kernel.util.OrderByComparator obc)
096: throws com.liferay.portal.SystemException,
097: com.liferay.portal.NoSuchCountryException {
098: return getPersistence().findByActive_First(active, obc);
099: }
100:
101: public static com.liferay.portal.model.Country findByActive_Last(
102: boolean active,
103: com.liferay.portal.kernel.util.OrderByComparator obc)
104: throws com.liferay.portal.SystemException,
105: com.liferay.portal.NoSuchCountryException {
106: return getPersistence().findByActive_Last(active, obc);
107: }
108:
109: public static com.liferay.portal.model.Country[] findByActive_PrevAndNext(
110: long countryId, boolean active,
111: com.liferay.portal.kernel.util.OrderByComparator obc)
112: throws com.liferay.portal.SystemException,
113: com.liferay.portal.NoSuchCountryException {
114: return getPersistence().findByActive_PrevAndNext(countryId,
115: active, obc);
116: }
117:
118: public static java.util.List findWithDynamicQuery(
119: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
120: throws com.liferay.portal.SystemException {
121: return getPersistence().findWithDynamicQuery(queryInitializer);
122: }
123:
124: public static java.util.List findWithDynamicQuery(
125: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
126: int begin, int end)
127: throws com.liferay.portal.SystemException {
128: return getPersistence().findWithDynamicQuery(queryInitializer,
129: begin, end);
130: }
131:
132: public static java.util.List findAll()
133: throws com.liferay.portal.SystemException {
134: return getPersistence().findAll();
135: }
136:
137: public static java.util.List findAll(int begin, int end)
138: throws com.liferay.portal.SystemException {
139: return getPersistence().findAll(begin, end);
140: }
141:
142: public static java.util.List findAll(int begin, int end,
143: com.liferay.portal.kernel.util.OrderByComparator obc)
144: throws com.liferay.portal.SystemException {
145: return getPersistence().findAll(begin, end, obc);
146: }
147:
148: public static void removeByActive(boolean active)
149: throws com.liferay.portal.SystemException {
150: getPersistence().removeByActive(active);
151: }
152:
153: public static void removeAll()
154: throws com.liferay.portal.SystemException {
155: getPersistence().removeAll();
156: }
157:
158: public static int countByActive(boolean active)
159: throws com.liferay.portal.SystemException {
160: return getPersistence().countByActive(active);
161: }
162:
163: public static int countAll()
164: throws com.liferay.portal.SystemException {
165: return getPersistence().countAll();
166: }
167:
168: public static CountryPersistence getPersistence() {
169: return _getUtil()._persistence;
170: }
171:
172: public void setPersistence(CountryPersistence persistence) {
173: _persistence = persistence;
174: }
175:
176: private static CountryUtil _getUtil() {
177: if (_util == null) {
178: _util = (CountryUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
179: .locate(_UTIL);
180: }
181:
182: return _util;
183: }
184:
185: private static final String _UTIL = CountryUtil.class.getName();
186: private static CountryUtil _util;
187: private CountryPersistence _persistence;
188: }
|