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  
26  /**
27   * <a href="AddressPersistence.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       AddressPersistenceImpl
36   * @see       AddressUtil
37   * @generated
38   */
39  public interface AddressPersistence extends BasePersistence {
40      public void cacheResult(com.liferay.portal.model.Address address);
41  
42      public void cacheResult(
43          java.util.List<com.liferay.portal.model.Address> addresses);
44  
45      public void clearCache();
46  
47      public com.liferay.portal.model.Address create(long addressId);
48  
49      public com.liferay.portal.model.Address remove(long addressId)
50          throws com.liferay.portal.NoSuchAddressException,
51              com.liferay.portal.SystemException;
52  
53      public com.liferay.portal.model.Address remove(
54          com.liferay.portal.model.Address address)
55          throws com.liferay.portal.SystemException;
56  
57      /**
58       * @deprecated Use {@link #update(Address, boolean merge)}.
59       */
60      public com.liferay.portal.model.Address update(
61          com.liferay.portal.model.Address address)
62          throws com.liferay.portal.SystemException;
63  
64      /**
65       * Add, update, or merge, the entity. This method also calls the model
66       * listeners to trigger the proper events associated with adding, deleting,
67       * or updating an entity.
68       *
69       * @param  address the entity to add, update, or merge
70       * @param  merge boolean value for whether to merge the entity. The default
71       *         value is false. Setting merge to true is more expensive and
72       *         should only be true when address is transient. See
73       *         LEP-5473 for a detailed discussion of this method.
74       * @return the entity that was added, updated, or merged
75       */
76      public com.liferay.portal.model.Address update(
77          com.liferay.portal.model.Address address, boolean merge)
78          throws com.liferay.portal.SystemException;
79  
80      public com.liferay.portal.model.Address updateImpl(
81          com.liferay.portal.model.Address address, boolean merge)
82          throws com.liferay.portal.SystemException;
83  
84      public com.liferay.portal.model.Address findByPrimaryKey(long addressId)
85          throws com.liferay.portal.NoSuchAddressException,
86              com.liferay.portal.SystemException;
87  
88      public com.liferay.portal.model.Address fetchByPrimaryKey(long addressId)
89          throws com.liferay.portal.SystemException;
90  
91      public java.util.List<com.liferay.portal.model.Address> findByCompanyId(
92          long companyId) throws com.liferay.portal.SystemException;
93  
94      public java.util.List<com.liferay.portal.model.Address> findByCompanyId(
95          long companyId, int start, int end)
96          throws com.liferay.portal.SystemException;
97  
98      public java.util.List<com.liferay.portal.model.Address> findByCompanyId(
99          long companyId, int start, int end,
100         com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException;
102 
103     public com.liferay.portal.model.Address findByCompanyId_First(
104         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.NoSuchAddressException,
106             com.liferay.portal.SystemException;
107 
108     public com.liferay.portal.model.Address findByCompanyId_Last(
109         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.NoSuchAddressException,
111             com.liferay.portal.SystemException;
112 
113     public com.liferay.portal.model.Address[] findByCompanyId_PrevAndNext(
114         long addressId, long companyId,
115         com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.NoSuchAddressException,
117             com.liferay.portal.SystemException;
118 
119     public java.util.List<com.liferay.portal.model.Address> findByUserId(
120         long userId) throws com.liferay.portal.SystemException;
121 
122     public java.util.List<com.liferay.portal.model.Address> findByUserId(
123         long userId, int start, int end)
124         throws com.liferay.portal.SystemException;
125 
126     public java.util.List<com.liferay.portal.model.Address> findByUserId(
127         long userId, int start, int end,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException;
130 
131     public com.liferay.portal.model.Address findByUserId_First(long userId,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.NoSuchAddressException,
134             com.liferay.portal.SystemException;
135 
136     public com.liferay.portal.model.Address findByUserId_Last(long userId,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.NoSuchAddressException,
139             com.liferay.portal.SystemException;
140 
141     public com.liferay.portal.model.Address[] findByUserId_PrevAndNext(
142         long addressId, long userId,
143         com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.NoSuchAddressException,
145             com.liferay.portal.SystemException;
146 
147     public java.util.List<com.liferay.portal.model.Address> findByC_C(
148         long companyId, long classNameId)
149         throws com.liferay.portal.SystemException;
150 
151     public java.util.List<com.liferay.portal.model.Address> findByC_C(
152         long companyId, long classNameId, int start, int end)
153         throws com.liferay.portal.SystemException;
154 
155     public java.util.List<com.liferay.portal.model.Address> findByC_C(
156         long companyId, long classNameId, int start, int end,
157         com.liferay.portal.kernel.util.OrderByComparator obc)
158         throws com.liferay.portal.SystemException;
159 
160     public com.liferay.portal.model.Address findByC_C_First(long companyId,
161         long classNameId, com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.NoSuchAddressException,
163             com.liferay.portal.SystemException;
164 
165     public com.liferay.portal.model.Address findByC_C_Last(long companyId,
166         long classNameId, com.liferay.portal.kernel.util.OrderByComparator obc)
167         throws com.liferay.portal.NoSuchAddressException,
168             com.liferay.portal.SystemException;
169 
170     public com.liferay.portal.model.Address[] findByC_C_PrevAndNext(
171         long addressId, long companyId, long classNameId,
172         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.NoSuchAddressException,
174             com.liferay.portal.SystemException;
175 
176     public java.util.List<com.liferay.portal.model.Address> findByC_C_C(
177         long companyId, long classNameId, long classPK)
178         throws com.liferay.portal.SystemException;
179 
180     public java.util.List<com.liferay.portal.model.Address> findByC_C_C(
181         long companyId, long classNameId, long classPK, int start, int end)
182         throws com.liferay.portal.SystemException;
183 
184     public java.util.List<com.liferay.portal.model.Address> findByC_C_C(
185         long companyId, long classNameId, long classPK, int start, int end,
186         com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.SystemException;
188 
189     public com.liferay.portal.model.Address findByC_C_C_First(long companyId,
190         long classNameId, long classPK,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.NoSuchAddressException,
193             com.liferay.portal.SystemException;
194 
195     public com.liferay.portal.model.Address findByC_C_C_Last(long companyId,
196         long classNameId, long classPK,
197         com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.NoSuchAddressException,
199             com.liferay.portal.SystemException;
200 
201     public com.liferay.portal.model.Address[] findByC_C_C_PrevAndNext(
202         long addressId, long companyId, long classNameId, long classPK,
203         com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.NoSuchAddressException,
205             com.liferay.portal.SystemException;
206 
207     public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
208         long companyId, long classNameId, long classPK, boolean mailing)
209         throws com.liferay.portal.SystemException;
210 
211     public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
212         long companyId, long classNameId, long classPK, boolean mailing,
213         int start, int end) throws com.liferay.portal.SystemException;
214 
215     public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
216         long companyId, long classNameId, long classPK, boolean mailing,
217         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
218         throws com.liferay.portal.SystemException;
219 
220     public com.liferay.portal.model.Address findByC_C_C_M_First(
221         long companyId, long classNameId, long classPK, boolean mailing,
222         com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.NoSuchAddressException,
224             com.liferay.portal.SystemException;
225 
226     public com.liferay.portal.model.Address findByC_C_C_M_Last(long companyId,
227         long classNameId, long classPK, boolean mailing,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.NoSuchAddressException,
230             com.liferay.portal.SystemException;
231 
232     public com.liferay.portal.model.Address[] findByC_C_C_M_PrevAndNext(
233         long addressId, long companyId, long classNameId, long classPK,
234         boolean mailing, com.liferay.portal.kernel.util.OrderByComparator obc)
235         throws com.liferay.portal.NoSuchAddressException,
236             com.liferay.portal.SystemException;
237 
238     public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
239         long companyId, long classNameId, long classPK, boolean primary)
240         throws com.liferay.portal.SystemException;
241 
242     public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
243         long companyId, long classNameId, long classPK, boolean primary,
244         int start, int end) throws com.liferay.portal.SystemException;
245 
246     public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
247         long companyId, long classNameId, long classPK, boolean primary,
248         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
249         throws com.liferay.portal.SystemException;
250 
251     public com.liferay.portal.model.Address findByC_C_C_P_First(
252         long companyId, long classNameId, long classPK, boolean primary,
253         com.liferay.portal.kernel.util.OrderByComparator obc)
254         throws com.liferay.portal.NoSuchAddressException,
255             com.liferay.portal.SystemException;
256 
257     public com.liferay.portal.model.Address findByC_C_C_P_Last(long companyId,
258         long classNameId, long classPK, boolean primary,
259         com.liferay.portal.kernel.util.OrderByComparator obc)
260         throws com.liferay.portal.NoSuchAddressException,
261             com.liferay.portal.SystemException;
262 
263     public com.liferay.portal.model.Address[] findByC_C_C_P_PrevAndNext(
264         long addressId, long companyId, long classNameId, long classPK,
265         boolean primary, com.liferay.portal.kernel.util.OrderByComparator obc)
266         throws com.liferay.portal.NoSuchAddressException,
267             com.liferay.portal.SystemException;
268 
269     public java.util.List<Object> findWithDynamicQuery(
270         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
271         throws com.liferay.portal.SystemException;
272 
273     public java.util.List<Object> findWithDynamicQuery(
274         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
275         int end) throws com.liferay.portal.SystemException;
276 
277     public java.util.List<com.liferay.portal.model.Address> findAll()
278         throws com.liferay.portal.SystemException;
279 
280     public java.util.List<com.liferay.portal.model.Address> findAll(int start,
281         int end) throws com.liferay.portal.SystemException;
282 
283     public java.util.List<com.liferay.portal.model.Address> findAll(int start,
284         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
285         throws com.liferay.portal.SystemException;
286 
287     public void removeByCompanyId(long companyId)
288         throws com.liferay.portal.SystemException;
289 
290     public void removeByUserId(long userId)
291         throws com.liferay.portal.SystemException;
292 
293     public void removeByC_C(long companyId, long classNameId)
294         throws com.liferay.portal.SystemException;
295 
296     public void removeByC_C_C(long companyId, long classNameId, long classPK)
297         throws com.liferay.portal.SystemException;
298 
299     public void removeByC_C_C_M(long companyId, long classNameId, long classPK,
300         boolean mailing) throws com.liferay.portal.SystemException;
301 
302     public void removeByC_C_C_P(long companyId, long classNameId, long classPK,
303         boolean primary) throws com.liferay.portal.SystemException;
304 
305     public void removeAll() throws com.liferay.portal.SystemException;
306 
307     public int countByCompanyId(long companyId)
308         throws com.liferay.portal.SystemException;
309 
310     public int countByUserId(long userId)
311         throws com.liferay.portal.SystemException;
312 
313     public int countByC_C(long companyId, long classNameId)
314         throws com.liferay.portal.SystemException;
315 
316     public int countByC_C_C(long companyId, long classNameId, long classPK)
317         throws com.liferay.portal.SystemException;
318 
319     public int countByC_C_C_M(long companyId, long classNameId, long classPK,
320         boolean mailing) throws com.liferay.portal.SystemException;
321 
322     public int countByC_C_C_P(long companyId, long classNameId, long classPK,
323         boolean primary) throws com.liferay.portal.SystemException;
324 
325     public int countAll() throws com.liferay.portal.SystemException;
326 }