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