001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.model.Address;
018    
019    /**
020     * The persistence interface for the address service.
021     *
022     * <p>
023     * Caching information and settings can be found in <code>portal.properties</code>
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see AddressPersistenceImpl
028     * @see AddressUtil
029     * @generated
030     */
031    public interface AddressPersistence extends BasePersistence<Address> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * Never modify or reference this interface directly. Always use {@link AddressUtil} to access the address persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
036             */
037    
038            /**
039            * Returns all the addresses where companyId = &#63;.
040            *
041            * @param companyId the company ID
042            * @return the matching addresses
043            * @throws SystemException if a system exception occurred
044            */
045            public java.util.List<com.liferay.portal.model.Address> findByCompanyId(
046                    long companyId)
047                    throws com.liferay.portal.kernel.exception.SystemException;
048    
049            /**
050            * Returns a range of all the addresses where companyId = &#63;.
051            *
052            * <p>
053            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
054            * </p>
055            *
056            * @param companyId the company ID
057            * @param start the lower bound of the range of addresses
058            * @param end the upper bound of the range of addresses (not inclusive)
059            * @return the range of matching addresses
060            * @throws SystemException if a system exception occurred
061            */
062            public java.util.List<com.liferay.portal.model.Address> findByCompanyId(
063                    long companyId, int start, int end)
064                    throws com.liferay.portal.kernel.exception.SystemException;
065    
066            /**
067            * Returns an ordered range of all the addresses where companyId = &#63;.
068            *
069            * <p>
070            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
071            * </p>
072            *
073            * @param companyId the company ID
074            * @param start the lower bound of the range of addresses
075            * @param end the upper bound of the range of addresses (not inclusive)
076            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
077            * @return the ordered range of matching addresses
078            * @throws SystemException if a system exception occurred
079            */
080            public java.util.List<com.liferay.portal.model.Address> findByCompanyId(
081                    long companyId, int start, int end,
082                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
083                    throws com.liferay.portal.kernel.exception.SystemException;
084    
085            /**
086            * Returns the first address in the ordered set where companyId = &#63;.
087            *
088            * @param companyId the company ID
089            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
090            * @return the first matching address
091            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
092            * @throws SystemException if a system exception occurred
093            */
094            public com.liferay.portal.model.Address findByCompanyId_First(
095                    long companyId,
096                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
097                    throws com.liferay.portal.NoSuchAddressException,
098                            com.liferay.portal.kernel.exception.SystemException;
099    
100            /**
101            * Returns the first address in the ordered set where companyId = &#63;.
102            *
103            * @param companyId the company ID
104            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
105            * @return the first matching address, or <code>null</code> if a matching address could not be found
106            * @throws SystemException if a system exception occurred
107            */
108            public com.liferay.portal.model.Address fetchByCompanyId_First(
109                    long companyId,
110                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
111                    throws com.liferay.portal.kernel.exception.SystemException;
112    
113            /**
114            * Returns the last address in the ordered set where companyId = &#63;.
115            *
116            * @param companyId the company ID
117            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
118            * @return the last matching address
119            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
120            * @throws SystemException if a system exception occurred
121            */
122            public com.liferay.portal.model.Address findByCompanyId_Last(
123                    long companyId,
124                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
125                    throws com.liferay.portal.NoSuchAddressException,
126                            com.liferay.portal.kernel.exception.SystemException;
127    
128            /**
129            * Returns the last address in the ordered set where companyId = &#63;.
130            *
131            * @param companyId the company ID
132            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
133            * @return the last matching address, or <code>null</code> if a matching address could not be found
134            * @throws SystemException if a system exception occurred
135            */
136            public com.liferay.portal.model.Address fetchByCompanyId_Last(
137                    long companyId,
138                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139                    throws com.liferay.portal.kernel.exception.SystemException;
140    
141            /**
142            * Returns the addresses before and after the current address in the ordered set where companyId = &#63;.
143            *
144            * @param addressId the primary key of the current address
145            * @param companyId the company ID
146            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
147            * @return the previous, current, and next address
148            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
149            * @throws SystemException if a system exception occurred
150            */
151            public com.liferay.portal.model.Address[] findByCompanyId_PrevAndNext(
152                    long addressId, long companyId,
153                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
154                    throws com.liferay.portal.NoSuchAddressException,
155                            com.liferay.portal.kernel.exception.SystemException;
156    
157            /**
158            * Removes all the addresses where companyId = &#63; from the database.
159            *
160            * @param companyId the company ID
161            * @throws SystemException if a system exception occurred
162            */
163            public void removeByCompanyId(long companyId)
164                    throws com.liferay.portal.kernel.exception.SystemException;
165    
166            /**
167            * Returns the number of addresses where companyId = &#63;.
168            *
169            * @param companyId the company ID
170            * @return the number of matching addresses
171            * @throws SystemException if a system exception occurred
172            */
173            public int countByCompanyId(long companyId)
174                    throws com.liferay.portal.kernel.exception.SystemException;
175    
176            /**
177            * Returns all the addresses where userId = &#63;.
178            *
179            * @param userId the user ID
180            * @return the matching addresses
181            * @throws SystemException if a system exception occurred
182            */
183            public java.util.List<com.liferay.portal.model.Address> findByUserId(
184                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
185    
186            /**
187            * Returns a range of all the addresses where userId = &#63;.
188            *
189            * <p>
190            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
191            * </p>
192            *
193            * @param userId the user ID
194            * @param start the lower bound of the range of addresses
195            * @param end the upper bound of the range of addresses (not inclusive)
196            * @return the range of matching addresses
197            * @throws SystemException if a system exception occurred
198            */
199            public java.util.List<com.liferay.portal.model.Address> findByUserId(
200                    long userId, int start, int end)
201                    throws com.liferay.portal.kernel.exception.SystemException;
202    
203            /**
204            * Returns an ordered range of all the addresses where userId = &#63;.
205            *
206            * <p>
207            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
208            * </p>
209            *
210            * @param userId the user ID
211            * @param start the lower bound of the range of addresses
212            * @param end the upper bound of the range of addresses (not inclusive)
213            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
214            * @return the ordered range of matching addresses
215            * @throws SystemException if a system exception occurred
216            */
217            public java.util.List<com.liferay.portal.model.Address> findByUserId(
218                    long userId, int start, int end,
219                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
220                    throws com.liferay.portal.kernel.exception.SystemException;
221    
222            /**
223            * Returns the first address in the ordered set where userId = &#63;.
224            *
225            * @param userId the user ID
226            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
227            * @return the first matching address
228            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
229            * @throws SystemException if a system exception occurred
230            */
231            public com.liferay.portal.model.Address findByUserId_First(long userId,
232                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
233                    throws com.liferay.portal.NoSuchAddressException,
234                            com.liferay.portal.kernel.exception.SystemException;
235    
236            /**
237            * Returns the first address in the ordered set where userId = &#63;.
238            *
239            * @param userId the user ID
240            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
241            * @return the first matching address, or <code>null</code> if a matching address could not be found
242            * @throws SystemException if a system exception occurred
243            */
244            public com.liferay.portal.model.Address fetchByUserId_First(long userId,
245                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
246                    throws com.liferay.portal.kernel.exception.SystemException;
247    
248            /**
249            * Returns the last address in the ordered set where userId = &#63;.
250            *
251            * @param userId the user ID
252            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
253            * @return the last matching address
254            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
255            * @throws SystemException if a system exception occurred
256            */
257            public com.liferay.portal.model.Address findByUserId_Last(long userId,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.NoSuchAddressException,
260                            com.liferay.portal.kernel.exception.SystemException;
261    
262            /**
263            * Returns the last address in the ordered set where userId = &#63;.
264            *
265            * @param userId the user ID
266            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
267            * @return the last matching address, or <code>null</code> if a matching address could not be found
268            * @throws SystemException if a system exception occurred
269            */
270            public com.liferay.portal.model.Address fetchByUserId_Last(long userId,
271                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272                    throws com.liferay.portal.kernel.exception.SystemException;
273    
274            /**
275            * Returns the addresses before and after the current address in the ordered set where userId = &#63;.
276            *
277            * @param addressId the primary key of the current address
278            * @param userId the user ID
279            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
280            * @return the previous, current, and next address
281            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
282            * @throws SystemException if a system exception occurred
283            */
284            public com.liferay.portal.model.Address[] findByUserId_PrevAndNext(
285                    long addressId, long userId,
286                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
287                    throws com.liferay.portal.NoSuchAddressException,
288                            com.liferay.portal.kernel.exception.SystemException;
289    
290            /**
291            * Removes all the addresses where userId = &#63; from the database.
292            *
293            * @param userId the user ID
294            * @throws SystemException if a system exception occurred
295            */
296            public void removeByUserId(long userId)
297                    throws com.liferay.portal.kernel.exception.SystemException;
298    
299            /**
300            * Returns the number of addresses where userId = &#63;.
301            *
302            * @param userId the user ID
303            * @return the number of matching addresses
304            * @throws SystemException if a system exception occurred
305            */
306            public int countByUserId(long userId)
307                    throws com.liferay.portal.kernel.exception.SystemException;
308    
309            /**
310            * Returns all the addresses where companyId = &#63; and classNameId = &#63;.
311            *
312            * @param companyId the company ID
313            * @param classNameId the class name ID
314            * @return the matching addresses
315            * @throws SystemException if a system exception occurred
316            */
317            public java.util.List<com.liferay.portal.model.Address> findByC_C(
318                    long companyId, long classNameId)
319                    throws com.liferay.portal.kernel.exception.SystemException;
320    
321            /**
322            * Returns a range of all the addresses where companyId = &#63; and classNameId = &#63;.
323            *
324            * <p>
325            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
326            * </p>
327            *
328            * @param companyId the company ID
329            * @param classNameId the class name ID
330            * @param start the lower bound of the range of addresses
331            * @param end the upper bound of the range of addresses (not inclusive)
332            * @return the range of matching addresses
333            * @throws SystemException if a system exception occurred
334            */
335            public java.util.List<com.liferay.portal.model.Address> findByC_C(
336                    long companyId, long classNameId, int start, int end)
337                    throws com.liferay.portal.kernel.exception.SystemException;
338    
339            /**
340            * Returns an ordered range of all the addresses where companyId = &#63; and classNameId = &#63;.
341            *
342            * <p>
343            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
344            * </p>
345            *
346            * @param companyId the company ID
347            * @param classNameId the class name ID
348            * @param start the lower bound of the range of addresses
349            * @param end the upper bound of the range of addresses (not inclusive)
350            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
351            * @return the ordered range of matching addresses
352            * @throws SystemException if a system exception occurred
353            */
354            public java.util.List<com.liferay.portal.model.Address> findByC_C(
355                    long companyId, long classNameId, int start, int end,
356                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
357                    throws com.liferay.portal.kernel.exception.SystemException;
358    
359            /**
360            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63;.
361            *
362            * @param companyId the company ID
363            * @param classNameId the class name ID
364            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
365            * @return the first matching address
366            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
367            * @throws SystemException if a system exception occurred
368            */
369            public com.liferay.portal.model.Address findByC_C_First(long companyId,
370                    long classNameId,
371                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
372                    throws com.liferay.portal.NoSuchAddressException,
373                            com.liferay.portal.kernel.exception.SystemException;
374    
375            /**
376            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63;.
377            *
378            * @param companyId the company ID
379            * @param classNameId the class name ID
380            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
381            * @return the first matching address, or <code>null</code> if a matching address could not be found
382            * @throws SystemException if a system exception occurred
383            */
384            public com.liferay.portal.model.Address fetchByC_C_First(long companyId,
385                    long classNameId,
386                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
387                    throws com.liferay.portal.kernel.exception.SystemException;
388    
389            /**
390            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63;.
391            *
392            * @param companyId the company ID
393            * @param classNameId the class name ID
394            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
395            * @return the last matching address
396            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
397            * @throws SystemException if a system exception occurred
398            */
399            public com.liferay.portal.model.Address findByC_C_Last(long companyId,
400                    long classNameId,
401                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
402                    throws com.liferay.portal.NoSuchAddressException,
403                            com.liferay.portal.kernel.exception.SystemException;
404    
405            /**
406            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63;.
407            *
408            * @param companyId the company ID
409            * @param classNameId the class name ID
410            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
411            * @return the last matching address, or <code>null</code> if a matching address could not be found
412            * @throws SystemException if a system exception occurred
413            */
414            public com.liferay.portal.model.Address fetchByC_C_Last(long companyId,
415                    long classNameId,
416                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
417                    throws com.liferay.portal.kernel.exception.SystemException;
418    
419            /**
420            * Returns the addresses before and after the current address in the ordered set where companyId = &#63; and classNameId = &#63;.
421            *
422            * @param addressId the primary key of the current address
423            * @param companyId the company ID
424            * @param classNameId the class name ID
425            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
426            * @return the previous, current, and next address
427            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
428            * @throws SystemException if a system exception occurred
429            */
430            public com.liferay.portal.model.Address[] findByC_C_PrevAndNext(
431                    long addressId, long companyId, long classNameId,
432                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
433                    throws com.liferay.portal.NoSuchAddressException,
434                            com.liferay.portal.kernel.exception.SystemException;
435    
436            /**
437            * Removes all the addresses where companyId = &#63; and classNameId = &#63; from the database.
438            *
439            * @param companyId the company ID
440            * @param classNameId the class name ID
441            * @throws SystemException if a system exception occurred
442            */
443            public void removeByC_C(long companyId, long classNameId)
444                    throws com.liferay.portal.kernel.exception.SystemException;
445    
446            /**
447            * Returns the number of addresses where companyId = &#63; and classNameId = &#63;.
448            *
449            * @param companyId the company ID
450            * @param classNameId the class name ID
451            * @return the number of matching addresses
452            * @throws SystemException if a system exception occurred
453            */
454            public int countByC_C(long companyId, long classNameId)
455                    throws com.liferay.portal.kernel.exception.SystemException;
456    
457            /**
458            * Returns all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
459            *
460            * @param companyId the company ID
461            * @param classNameId the class name ID
462            * @param classPK the class p k
463            * @return the matching addresses
464            * @throws SystemException if a system exception occurred
465            */
466            public java.util.List<com.liferay.portal.model.Address> findByC_C_C(
467                    long companyId, long classNameId, long classPK)
468                    throws com.liferay.portal.kernel.exception.SystemException;
469    
470            /**
471            * Returns a range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
472            *
473            * <p>
474            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
475            * </p>
476            *
477            * @param companyId the company ID
478            * @param classNameId the class name ID
479            * @param classPK the class p k
480            * @param start the lower bound of the range of addresses
481            * @param end the upper bound of the range of addresses (not inclusive)
482            * @return the range of matching addresses
483            * @throws SystemException if a system exception occurred
484            */
485            public java.util.List<com.liferay.portal.model.Address> findByC_C_C(
486                    long companyId, long classNameId, long classPK, int start, int end)
487                    throws com.liferay.portal.kernel.exception.SystemException;
488    
489            /**
490            * Returns an ordered range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
491            *
492            * <p>
493            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
494            * </p>
495            *
496            * @param companyId the company ID
497            * @param classNameId the class name ID
498            * @param classPK the class p k
499            * @param start the lower bound of the range of addresses
500            * @param end the upper bound of the range of addresses (not inclusive)
501            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
502            * @return the ordered range of matching addresses
503            * @throws SystemException if a system exception occurred
504            */
505            public java.util.List<com.liferay.portal.model.Address> findByC_C_C(
506                    long companyId, long classNameId, long classPK, int start, int end,
507                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
508                    throws com.liferay.portal.kernel.exception.SystemException;
509    
510            /**
511            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
512            *
513            * @param companyId the company ID
514            * @param classNameId the class name ID
515            * @param classPK the class p k
516            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
517            * @return the first matching address
518            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
519            * @throws SystemException if a system exception occurred
520            */
521            public com.liferay.portal.model.Address findByC_C_C_First(long companyId,
522                    long classNameId, long classPK,
523                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
524                    throws com.liferay.portal.NoSuchAddressException,
525                            com.liferay.portal.kernel.exception.SystemException;
526    
527            /**
528            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
529            *
530            * @param companyId the company ID
531            * @param classNameId the class name ID
532            * @param classPK the class p k
533            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
534            * @return the first matching address, or <code>null</code> if a matching address could not be found
535            * @throws SystemException if a system exception occurred
536            */
537            public com.liferay.portal.model.Address fetchByC_C_C_First(long companyId,
538                    long classNameId, long classPK,
539                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
540                    throws com.liferay.portal.kernel.exception.SystemException;
541    
542            /**
543            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
544            *
545            * @param companyId the company ID
546            * @param classNameId the class name ID
547            * @param classPK the class p k
548            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
549            * @return the last matching address
550            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
551            * @throws SystemException if a system exception occurred
552            */
553            public com.liferay.portal.model.Address findByC_C_C_Last(long companyId,
554                    long classNameId, long classPK,
555                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
556                    throws com.liferay.portal.NoSuchAddressException,
557                            com.liferay.portal.kernel.exception.SystemException;
558    
559            /**
560            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
561            *
562            * @param companyId the company ID
563            * @param classNameId the class name ID
564            * @param classPK the class p k
565            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
566            * @return the last matching address, or <code>null</code> if a matching address could not be found
567            * @throws SystemException if a system exception occurred
568            */
569            public com.liferay.portal.model.Address fetchByC_C_C_Last(long companyId,
570                    long classNameId, long classPK,
571                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
572                    throws com.liferay.portal.kernel.exception.SystemException;
573    
574            /**
575            * Returns the addresses before and after the current address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
576            *
577            * @param addressId the primary key of the current address
578            * @param companyId the company ID
579            * @param classNameId the class name ID
580            * @param classPK the class p k
581            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
582            * @return the previous, current, and next address
583            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
584            * @throws SystemException if a system exception occurred
585            */
586            public com.liferay.portal.model.Address[] findByC_C_C_PrevAndNext(
587                    long addressId, long companyId, long classNameId, long classPK,
588                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
589                    throws com.liferay.portal.NoSuchAddressException,
590                            com.liferay.portal.kernel.exception.SystemException;
591    
592            /**
593            * Removes all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
594            *
595            * @param companyId the company ID
596            * @param classNameId the class name ID
597            * @param classPK the class p k
598            * @throws SystemException if a system exception occurred
599            */
600            public void removeByC_C_C(long companyId, long classNameId, long classPK)
601                    throws com.liferay.portal.kernel.exception.SystemException;
602    
603            /**
604            * Returns the number of addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
605            *
606            * @param companyId the company ID
607            * @param classNameId the class name ID
608            * @param classPK the class p k
609            * @return the number of matching addresses
610            * @throws SystemException if a system exception occurred
611            */
612            public int countByC_C_C(long companyId, long classNameId, long classPK)
613                    throws com.liferay.portal.kernel.exception.SystemException;
614    
615            /**
616            * Returns all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
617            *
618            * @param companyId the company ID
619            * @param classNameId the class name ID
620            * @param classPK the class p k
621            * @param mailing the mailing
622            * @return the matching addresses
623            * @throws SystemException if a system exception occurred
624            */
625            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
626                    long companyId, long classNameId, long classPK, boolean mailing)
627                    throws com.liferay.portal.kernel.exception.SystemException;
628    
629            /**
630            * Returns a range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
631            *
632            * <p>
633            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
634            * </p>
635            *
636            * @param companyId the company ID
637            * @param classNameId the class name ID
638            * @param classPK the class p k
639            * @param mailing the mailing
640            * @param start the lower bound of the range of addresses
641            * @param end the upper bound of the range of addresses (not inclusive)
642            * @return the range of matching addresses
643            * @throws SystemException if a system exception occurred
644            */
645            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
646                    long companyId, long classNameId, long classPK, boolean mailing,
647                    int start, int end)
648                    throws com.liferay.portal.kernel.exception.SystemException;
649    
650            /**
651            * Returns an ordered range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
652            *
653            * <p>
654            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
655            * </p>
656            *
657            * @param companyId the company ID
658            * @param classNameId the class name ID
659            * @param classPK the class p k
660            * @param mailing the mailing
661            * @param start the lower bound of the range of addresses
662            * @param end the upper bound of the range of addresses (not inclusive)
663            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
664            * @return the ordered range of matching addresses
665            * @throws SystemException if a system exception occurred
666            */
667            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
668                    long companyId, long classNameId, long classPK, boolean mailing,
669                    int start, int end,
670                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
671                    throws com.liferay.portal.kernel.exception.SystemException;
672    
673            /**
674            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
675            *
676            * @param companyId the company ID
677            * @param classNameId the class name ID
678            * @param classPK the class p k
679            * @param mailing the mailing
680            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
681            * @return the first matching address
682            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
683            * @throws SystemException if a system exception occurred
684            */
685            public com.liferay.portal.model.Address findByC_C_C_M_First(
686                    long companyId, long classNameId, long classPK, boolean mailing,
687                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
688                    throws com.liferay.portal.NoSuchAddressException,
689                            com.liferay.portal.kernel.exception.SystemException;
690    
691            /**
692            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
693            *
694            * @param companyId the company ID
695            * @param classNameId the class name ID
696            * @param classPK the class p k
697            * @param mailing the mailing
698            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
699            * @return the first matching address, or <code>null</code> if a matching address could not be found
700            * @throws SystemException if a system exception occurred
701            */
702            public com.liferay.portal.model.Address fetchByC_C_C_M_First(
703                    long companyId, long classNameId, long classPK, boolean mailing,
704                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
705                    throws com.liferay.portal.kernel.exception.SystemException;
706    
707            /**
708            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
709            *
710            * @param companyId the company ID
711            * @param classNameId the class name ID
712            * @param classPK the class p k
713            * @param mailing the mailing
714            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
715            * @return the last matching address
716            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
717            * @throws SystemException if a system exception occurred
718            */
719            public com.liferay.portal.model.Address findByC_C_C_M_Last(long companyId,
720                    long classNameId, long classPK, boolean mailing,
721                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
722                    throws com.liferay.portal.NoSuchAddressException,
723                            com.liferay.portal.kernel.exception.SystemException;
724    
725            /**
726            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
727            *
728            * @param companyId the company ID
729            * @param classNameId the class name ID
730            * @param classPK the class p k
731            * @param mailing the mailing
732            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
733            * @return the last matching address, or <code>null</code> if a matching address could not be found
734            * @throws SystemException if a system exception occurred
735            */
736            public com.liferay.portal.model.Address fetchByC_C_C_M_Last(
737                    long companyId, long classNameId, long classPK, boolean mailing,
738                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
739                    throws com.liferay.portal.kernel.exception.SystemException;
740    
741            /**
742            * Returns the addresses before and after the current address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
743            *
744            * @param addressId the primary key of the current address
745            * @param companyId the company ID
746            * @param classNameId the class name ID
747            * @param classPK the class p k
748            * @param mailing the mailing
749            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
750            * @return the previous, current, and next address
751            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
752            * @throws SystemException if a system exception occurred
753            */
754            public com.liferay.portal.model.Address[] findByC_C_C_M_PrevAndNext(
755                    long addressId, long companyId, long classNameId, long classPK,
756                    boolean mailing,
757                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
758                    throws com.liferay.portal.NoSuchAddressException,
759                            com.liferay.portal.kernel.exception.SystemException;
760    
761            /**
762            * Removes all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63; from the database.
763            *
764            * @param companyId the company ID
765            * @param classNameId the class name ID
766            * @param classPK the class p k
767            * @param mailing the mailing
768            * @throws SystemException if a system exception occurred
769            */
770            public void removeByC_C_C_M(long companyId, long classNameId, long classPK,
771                    boolean mailing)
772                    throws com.liferay.portal.kernel.exception.SystemException;
773    
774            /**
775            * Returns the number of addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
776            *
777            * @param companyId the company ID
778            * @param classNameId the class name ID
779            * @param classPK the class p k
780            * @param mailing the mailing
781            * @return the number of matching addresses
782            * @throws SystemException if a system exception occurred
783            */
784            public int countByC_C_C_M(long companyId, long classNameId, long classPK,
785                    boolean mailing)
786                    throws com.liferay.portal.kernel.exception.SystemException;
787    
788            /**
789            * Returns all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
790            *
791            * @param companyId the company ID
792            * @param classNameId the class name ID
793            * @param classPK the class p k
794            * @param primary the primary
795            * @return the matching addresses
796            * @throws SystemException if a system exception occurred
797            */
798            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
799                    long companyId, long classNameId, long classPK, boolean primary)
800                    throws com.liferay.portal.kernel.exception.SystemException;
801    
802            /**
803            * Returns a range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
804            *
805            * <p>
806            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
807            * </p>
808            *
809            * @param companyId the company ID
810            * @param classNameId the class name ID
811            * @param classPK the class p k
812            * @param primary the primary
813            * @param start the lower bound of the range of addresses
814            * @param end the upper bound of the range of addresses (not inclusive)
815            * @return the range of matching addresses
816            * @throws SystemException if a system exception occurred
817            */
818            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
819                    long companyId, long classNameId, long classPK, boolean primary,
820                    int start, int end)
821                    throws com.liferay.portal.kernel.exception.SystemException;
822    
823            /**
824            * Returns an ordered range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
825            *
826            * <p>
827            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
828            * </p>
829            *
830            * @param companyId the company ID
831            * @param classNameId the class name ID
832            * @param classPK the class p k
833            * @param primary the primary
834            * @param start the lower bound of the range of addresses
835            * @param end the upper bound of the range of addresses (not inclusive)
836            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
837            * @return the ordered range of matching addresses
838            * @throws SystemException if a system exception occurred
839            */
840            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
841                    long companyId, long classNameId, long classPK, boolean primary,
842                    int start, int end,
843                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
844                    throws com.liferay.portal.kernel.exception.SystemException;
845    
846            /**
847            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
848            *
849            * @param companyId the company ID
850            * @param classNameId the class name ID
851            * @param classPK the class p k
852            * @param primary the primary
853            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
854            * @return the first matching address
855            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
856            * @throws SystemException if a system exception occurred
857            */
858            public com.liferay.portal.model.Address findByC_C_C_P_First(
859                    long companyId, long classNameId, long classPK, boolean primary,
860                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
861                    throws com.liferay.portal.NoSuchAddressException,
862                            com.liferay.portal.kernel.exception.SystemException;
863    
864            /**
865            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
866            *
867            * @param companyId the company ID
868            * @param classNameId the class name ID
869            * @param classPK the class p k
870            * @param primary the primary
871            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
872            * @return the first matching address, or <code>null</code> if a matching address could not be found
873            * @throws SystemException if a system exception occurred
874            */
875            public com.liferay.portal.model.Address fetchByC_C_C_P_First(
876                    long companyId, long classNameId, long classPK, boolean primary,
877                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
878                    throws com.liferay.portal.kernel.exception.SystemException;
879    
880            /**
881            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
882            *
883            * @param companyId the company ID
884            * @param classNameId the class name ID
885            * @param classPK the class p k
886            * @param primary the primary
887            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
888            * @return the last matching address
889            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
890            * @throws SystemException if a system exception occurred
891            */
892            public com.liferay.portal.model.Address findByC_C_C_P_Last(long companyId,
893                    long classNameId, long classPK, boolean primary,
894                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
895                    throws com.liferay.portal.NoSuchAddressException,
896                            com.liferay.portal.kernel.exception.SystemException;
897    
898            /**
899            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
900            *
901            * @param companyId the company ID
902            * @param classNameId the class name ID
903            * @param classPK the class p k
904            * @param primary the primary
905            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
906            * @return the last matching address, or <code>null</code> if a matching address could not be found
907            * @throws SystemException if a system exception occurred
908            */
909            public com.liferay.portal.model.Address fetchByC_C_C_P_Last(
910                    long companyId, long classNameId, long classPK, boolean primary,
911                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
912                    throws com.liferay.portal.kernel.exception.SystemException;
913    
914            /**
915            * Returns the addresses before and after the current address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
916            *
917            * @param addressId the primary key of the current address
918            * @param companyId the company ID
919            * @param classNameId the class name ID
920            * @param classPK the class p k
921            * @param primary the primary
922            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
923            * @return the previous, current, and next address
924            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
925            * @throws SystemException if a system exception occurred
926            */
927            public com.liferay.portal.model.Address[] findByC_C_C_P_PrevAndNext(
928                    long addressId, long companyId, long classNameId, long classPK,
929                    boolean primary,
930                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
931                    throws com.liferay.portal.NoSuchAddressException,
932                            com.liferay.portal.kernel.exception.SystemException;
933    
934            /**
935            * Removes all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63; from the database.
936            *
937            * @param companyId the company ID
938            * @param classNameId the class name ID
939            * @param classPK the class p k
940            * @param primary the primary
941            * @throws SystemException if a system exception occurred
942            */
943            public void removeByC_C_C_P(long companyId, long classNameId, long classPK,
944                    boolean primary)
945                    throws com.liferay.portal.kernel.exception.SystemException;
946    
947            /**
948            * Returns the number of addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
949            *
950            * @param companyId the company ID
951            * @param classNameId the class name ID
952            * @param classPK the class p k
953            * @param primary the primary
954            * @return the number of matching addresses
955            * @throws SystemException if a system exception occurred
956            */
957            public int countByC_C_C_P(long companyId, long classNameId, long classPK,
958                    boolean primary)
959                    throws com.liferay.portal.kernel.exception.SystemException;
960    
961            /**
962            * Caches the address in the entity cache if it is enabled.
963            *
964            * @param address the address
965            */
966            public void cacheResult(com.liferay.portal.model.Address address);
967    
968            /**
969            * Caches the addresses in the entity cache if it is enabled.
970            *
971            * @param addresses the addresses
972            */
973            public void cacheResult(
974                    java.util.List<com.liferay.portal.model.Address> addresses);
975    
976            /**
977            * Creates a new address with the primary key. Does not add the address to the database.
978            *
979            * @param addressId the primary key for the new address
980            * @return the new address
981            */
982            public com.liferay.portal.model.Address create(long addressId);
983    
984            /**
985            * Removes the address with the primary key from the database. Also notifies the appropriate model listeners.
986            *
987            * @param addressId the primary key of the address
988            * @return the address that was removed
989            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
990            * @throws SystemException if a system exception occurred
991            */
992            public com.liferay.portal.model.Address remove(long addressId)
993                    throws com.liferay.portal.NoSuchAddressException,
994                            com.liferay.portal.kernel.exception.SystemException;
995    
996            public com.liferay.portal.model.Address updateImpl(
997                    com.liferay.portal.model.Address address)
998                    throws com.liferay.portal.kernel.exception.SystemException;
999    
1000            /**
1001            * Returns the address with the primary key or throws a {@link com.liferay.portal.NoSuchAddressException} if it could not be found.
1002            *
1003            * @param addressId the primary key of the address
1004            * @return the address
1005            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
1006            * @throws SystemException if a system exception occurred
1007            */
1008            public com.liferay.portal.model.Address findByPrimaryKey(long addressId)
1009                    throws com.liferay.portal.NoSuchAddressException,
1010                            com.liferay.portal.kernel.exception.SystemException;
1011    
1012            /**
1013            * Returns the address with the primary key or returns <code>null</code> if it could not be found.
1014            *
1015            * @param addressId the primary key of the address
1016            * @return the address, or <code>null</code> if a address with the primary key could not be found
1017            * @throws SystemException if a system exception occurred
1018            */
1019            public com.liferay.portal.model.Address fetchByPrimaryKey(long addressId)
1020                    throws com.liferay.portal.kernel.exception.SystemException;
1021    
1022            /**
1023            * Returns all the addresses.
1024            *
1025            * @return the addresses
1026            * @throws SystemException if a system exception occurred
1027            */
1028            public java.util.List<com.liferay.portal.model.Address> findAll()
1029                    throws com.liferay.portal.kernel.exception.SystemException;
1030    
1031            /**
1032            * Returns a range of all the addresses.
1033            *
1034            * <p>
1035            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1036            * </p>
1037            *
1038            * @param start the lower bound of the range of addresses
1039            * @param end the upper bound of the range of addresses (not inclusive)
1040            * @return the range of addresses
1041            * @throws SystemException if a system exception occurred
1042            */
1043            public java.util.List<com.liferay.portal.model.Address> findAll(int start,
1044                    int end) throws com.liferay.portal.kernel.exception.SystemException;
1045    
1046            /**
1047            * Returns an ordered range of all the addresses.
1048            *
1049            * <p>
1050            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.AddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1051            * </p>
1052            *
1053            * @param start the lower bound of the range of addresses
1054            * @param end the upper bound of the range of addresses (not inclusive)
1055            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1056            * @return the ordered range of addresses
1057            * @throws SystemException if a system exception occurred
1058            */
1059            public java.util.List<com.liferay.portal.model.Address> findAll(int start,
1060                    int end,
1061                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1062                    throws com.liferay.portal.kernel.exception.SystemException;
1063    
1064            /**
1065            * Removes all the addresses from the database.
1066            *
1067            * @throws SystemException if a system exception occurred
1068            */
1069            public void removeAll()
1070                    throws com.liferay.portal.kernel.exception.SystemException;
1071    
1072            /**
1073            * Returns the number of addresses.
1074            *
1075            * @return the number of addresses
1076            * @throws SystemException if a system exception occurred
1077            */
1078            public int countAll()
1079                    throws com.liferay.portal.kernel.exception.SystemException;
1080    }