1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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  /**
26   * <a href="AddressPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface AddressPersistence {
32      public com.liferay.portal.model.Address create(long addressId);
33  
34      public com.liferay.portal.model.Address remove(long addressId)
35          throws com.liferay.portal.SystemException, 
36              com.liferay.portal.NoSuchAddressException;
37  
38      public com.liferay.portal.model.Address remove(
39          com.liferay.portal.model.Address address)
40          throws com.liferay.portal.SystemException;
41  
42      public com.liferay.portal.model.Address update(
43          com.liferay.portal.model.Address address)
44          throws com.liferay.portal.SystemException;
45  
46      public com.liferay.portal.model.Address update(
47          com.liferay.portal.model.Address address, boolean merge)
48          throws com.liferay.portal.SystemException;
49  
50      public com.liferay.portal.model.Address updateImpl(
51          com.liferay.portal.model.Address address, boolean merge)
52          throws com.liferay.portal.SystemException;
53  
54      public com.liferay.portal.model.Address findByPrimaryKey(long addressId)
55          throws com.liferay.portal.SystemException, 
56              com.liferay.portal.NoSuchAddressException;
57  
58      public com.liferay.portal.model.Address fetchByPrimaryKey(long addressId)
59          throws com.liferay.portal.SystemException;
60  
61      public java.util.List findByCompanyId(long companyId)
62          throws com.liferay.portal.SystemException;
63  
64      public java.util.List findByCompanyId(long companyId, int begin, int end)
65          throws com.liferay.portal.SystemException;
66  
67      public java.util.List findByCompanyId(long companyId, int begin, int end,
68          com.liferay.portal.kernel.util.OrderByComparator obc)
69          throws com.liferay.portal.SystemException;
70  
71      public com.liferay.portal.model.Address findByCompanyId_First(
72          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
73          throws com.liferay.portal.SystemException, 
74              com.liferay.portal.NoSuchAddressException;
75  
76      public com.liferay.portal.model.Address findByCompanyId_Last(
77          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
78          throws com.liferay.portal.SystemException, 
79              com.liferay.portal.NoSuchAddressException;
80  
81      public com.liferay.portal.model.Address[] findByCompanyId_PrevAndNext(
82          long addressId, long companyId,
83          com.liferay.portal.kernel.util.OrderByComparator obc)
84          throws com.liferay.portal.SystemException, 
85              com.liferay.portal.NoSuchAddressException;
86  
87      public java.util.List findByUserId(long userId)
88          throws com.liferay.portal.SystemException;
89  
90      public java.util.List findByUserId(long userId, int begin, int end)
91          throws com.liferay.portal.SystemException;
92  
93      public java.util.List findByUserId(long userId, int begin, int end,
94          com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException;
96  
97      public com.liferay.portal.model.Address findByUserId_First(long userId,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException, 
100             com.liferay.portal.NoSuchAddressException;
101 
102     public com.liferay.portal.model.Address findByUserId_Last(long userId,
103         com.liferay.portal.kernel.util.OrderByComparator obc)
104         throws com.liferay.portal.SystemException, 
105             com.liferay.portal.NoSuchAddressException;
106 
107     public com.liferay.portal.model.Address[] findByUserId_PrevAndNext(
108         long addressId, long userId,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException, 
111             com.liferay.portal.NoSuchAddressException;
112 
113     public java.util.List findByC_C(long companyId, long classNameId)
114         throws com.liferay.portal.SystemException;
115 
116     public java.util.List findByC_C(long companyId, long classNameId,
117         int begin, int end) throws com.liferay.portal.SystemException;
118 
119     public java.util.List findByC_C(long companyId, long classNameId,
120         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException;
122 
123     public com.liferay.portal.model.Address findByC_C_First(long companyId,
124         long classNameId, com.liferay.portal.kernel.util.OrderByComparator obc)
125         throws com.liferay.portal.SystemException, 
126             com.liferay.portal.NoSuchAddressException;
127 
128     public com.liferay.portal.model.Address findByC_C_Last(long companyId,
129         long classNameId, com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException, 
131             com.liferay.portal.NoSuchAddressException;
132 
133     public com.liferay.portal.model.Address[] findByC_C_PrevAndNext(
134         long addressId, long companyId, long classNameId,
135         com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.SystemException, 
137             com.liferay.portal.NoSuchAddressException;
138 
139     public java.util.List findByC_C_C(long companyId, long classNameId,
140         long classPK) throws com.liferay.portal.SystemException;
141 
142     public java.util.List findByC_C_C(long companyId, long classNameId,
143         long classPK, int begin, int end)
144         throws com.liferay.portal.SystemException;
145 
146     public java.util.List findByC_C_C(long companyId, long classNameId,
147         long classPK, int begin, int end,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException;
150 
151     public com.liferay.portal.model.Address findByC_C_C_First(long companyId,
152         long classNameId, long classPK,
153         com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.SystemException, 
155             com.liferay.portal.NoSuchAddressException;
156 
157     public com.liferay.portal.model.Address findByC_C_C_Last(long companyId,
158         long classNameId, long classPK,
159         com.liferay.portal.kernel.util.OrderByComparator obc)
160         throws com.liferay.portal.SystemException, 
161             com.liferay.portal.NoSuchAddressException;
162 
163     public com.liferay.portal.model.Address[] findByC_C_C_PrevAndNext(
164         long addressId, long companyId, long classNameId, long classPK,
165         com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException, 
167             com.liferay.portal.NoSuchAddressException;
168 
169     public java.util.List findByC_C_C_M(long companyId, long classNameId,
170         long classPK, boolean mailing)
171         throws com.liferay.portal.SystemException;
172 
173     public java.util.List findByC_C_C_M(long companyId, long classNameId,
174         long classPK, boolean mailing, int begin, int end)
175         throws com.liferay.portal.SystemException;
176 
177     public java.util.List findByC_C_C_M(long companyId, long classNameId,
178         long classPK, boolean mailing, int begin, int end,
179         com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.SystemException;
181 
182     public com.liferay.portal.model.Address findByC_C_C_M_First(
183         long companyId, long classNameId, long classPK, boolean mailing,
184         com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException, 
186             com.liferay.portal.NoSuchAddressException;
187 
188     public com.liferay.portal.model.Address findByC_C_C_M_Last(long companyId,
189         long classNameId, long classPK, boolean mailing,
190         com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException, 
192             com.liferay.portal.NoSuchAddressException;
193 
194     public com.liferay.portal.model.Address[] findByC_C_C_M_PrevAndNext(
195         long addressId, long companyId, long classNameId, long classPK,
196         boolean mailing, com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException, 
198             com.liferay.portal.NoSuchAddressException;
199 
200     public java.util.List findByC_C_C_P(long companyId, long classNameId,
201         long classPK, boolean primary)
202         throws com.liferay.portal.SystemException;
203 
204     public java.util.List findByC_C_C_P(long companyId, long classNameId,
205         long classPK, boolean primary, int begin, int end)
206         throws com.liferay.portal.SystemException;
207 
208     public java.util.List findByC_C_C_P(long companyId, long classNameId,
209         long classPK, boolean primary, int begin, int end,
210         com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.SystemException;
212 
213     public com.liferay.portal.model.Address findByC_C_C_P_First(
214         long companyId, long classNameId, long classPK, boolean primary,
215         com.liferay.portal.kernel.util.OrderByComparator obc)
216         throws com.liferay.portal.SystemException, 
217             com.liferay.portal.NoSuchAddressException;
218 
219     public com.liferay.portal.model.Address findByC_C_C_P_Last(long companyId,
220         long classNameId, long classPK, boolean primary,
221         com.liferay.portal.kernel.util.OrderByComparator obc)
222         throws com.liferay.portal.SystemException, 
223             com.liferay.portal.NoSuchAddressException;
224 
225     public com.liferay.portal.model.Address[] findByC_C_C_P_PrevAndNext(
226         long addressId, long companyId, long classNameId, long classPK,
227         boolean primary, com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException, 
229             com.liferay.portal.NoSuchAddressException;
230 
231     public java.util.List findWithDynamicQuery(
232         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
233         throws com.liferay.portal.SystemException;
234 
235     public java.util.List findWithDynamicQuery(
236         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
237         int begin, int end) throws com.liferay.portal.SystemException;
238 
239     public java.util.List findAll() throws com.liferay.portal.SystemException;
240 
241     public java.util.List findAll(int begin, int end)
242         throws com.liferay.portal.SystemException;
243 
244     public java.util.List findAll(int begin, int end,
245         com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException;
247 
248     public void removeByCompanyId(long companyId)
249         throws com.liferay.portal.SystemException;
250 
251     public void removeByUserId(long userId)
252         throws com.liferay.portal.SystemException;
253 
254     public void removeByC_C(long companyId, long classNameId)
255         throws com.liferay.portal.SystemException;
256 
257     public void removeByC_C_C(long companyId, long classNameId, long classPK)
258         throws com.liferay.portal.SystemException;
259 
260     public void removeByC_C_C_M(long companyId, long classNameId, long classPK,
261         boolean mailing) throws com.liferay.portal.SystemException;
262 
263     public void removeByC_C_C_P(long companyId, long classNameId, long classPK,
264         boolean primary) throws com.liferay.portal.SystemException;
265 
266     public void removeAll() throws com.liferay.portal.SystemException;
267 
268     public int countByCompanyId(long companyId)
269         throws com.liferay.portal.SystemException;
270 
271     public int countByUserId(long userId)
272         throws com.liferay.portal.SystemException;
273 
274     public int countByC_C(long companyId, long classNameId)
275         throws com.liferay.portal.SystemException;
276 
277     public int countByC_C_C(long companyId, long classNameId, long classPK)
278         throws com.liferay.portal.SystemException;
279 
280     public int countByC_C_C_M(long companyId, long classNameId, long classPK,
281         boolean mailing) throws com.liferay.portal.SystemException;
282 
283     public int countByC_C_C_P(long companyId, long classNameId, long classPK,
284         boolean primary) throws com.liferay.portal.SystemException;
285 
286     public int countAll() throws com.liferay.portal.SystemException;
287 }