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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.Address;
020    
021    /**
022     * The persistence interface for the address service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see AddressPersistenceImpl
030     * @see AddressUtil
031     * @generated
032     */
033    @ProviderType
034    public interface AddressPersistence extends BasePersistence<Address> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * 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.
039             */
040    
041            /**
042            * Returns all the addresses where uuid = &#63;.
043            *
044            * @param uuid the uuid
045            * @return the matching addresses
046            * @throws SystemException if a system exception occurred
047            */
048            public java.util.List<com.liferay.portal.model.Address> findByUuid(
049                    java.lang.String uuid)
050                    throws com.liferay.portal.kernel.exception.SystemException;
051    
052            /**
053            * Returns a range of all the addresses where uuid = &#63;.
054            *
055            * <p>
056            * 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.
057            * </p>
058            *
059            * @param uuid the uuid
060            * @param start the lower bound of the range of addresses
061            * @param end the upper bound of the range of addresses (not inclusive)
062            * @return the range of matching addresses
063            * @throws SystemException if a system exception occurred
064            */
065            public java.util.List<com.liferay.portal.model.Address> findByUuid(
066                    java.lang.String uuid, int start, int end)
067                    throws com.liferay.portal.kernel.exception.SystemException;
068    
069            /**
070            * Returns an ordered range of all the addresses where uuid = &#63;.
071            *
072            * <p>
073            * 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.
074            * </p>
075            *
076            * @param uuid the uuid
077            * @param start the lower bound of the range of addresses
078            * @param end the upper bound of the range of addresses (not inclusive)
079            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
080            * @return the ordered range of matching addresses
081            * @throws SystemException if a system exception occurred
082            */
083            public java.util.List<com.liferay.portal.model.Address> findByUuid(
084                    java.lang.String uuid, int start, int end,
085                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
086                    throws com.liferay.portal.kernel.exception.SystemException;
087    
088            /**
089            * Returns the first address in the ordered set where uuid = &#63;.
090            *
091            * @param uuid the uuid
092            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
093            * @return the first matching address
094            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
095            * @throws SystemException if a system exception occurred
096            */
097            public com.liferay.portal.model.Address findByUuid_First(
098                    java.lang.String uuid,
099                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
100                    throws com.liferay.portal.NoSuchAddressException,
101                            com.liferay.portal.kernel.exception.SystemException;
102    
103            /**
104            * Returns the first address in the ordered set where uuid = &#63;.
105            *
106            * @param uuid the uuid
107            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
108            * @return the first matching address, or <code>null</code> if a matching address could not be found
109            * @throws SystemException if a system exception occurred
110            */
111            public com.liferay.portal.model.Address fetchByUuid_First(
112                    java.lang.String uuid,
113                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
114                    throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Returns the last address in the ordered set where uuid = &#63;.
118            *
119            * @param uuid the uuid
120            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
121            * @return the last matching address
122            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
123            * @throws SystemException if a system exception occurred
124            */
125            public com.liferay.portal.model.Address findByUuid_Last(
126                    java.lang.String uuid,
127                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
128                    throws com.liferay.portal.NoSuchAddressException,
129                            com.liferay.portal.kernel.exception.SystemException;
130    
131            /**
132            * Returns the last address in the ordered set where uuid = &#63;.
133            *
134            * @param uuid the uuid
135            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
136            * @return the last matching address, or <code>null</code> if a matching address could not be found
137            * @throws SystemException if a system exception occurred
138            */
139            public com.liferay.portal.model.Address fetchByUuid_Last(
140                    java.lang.String uuid,
141                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142                    throws com.liferay.portal.kernel.exception.SystemException;
143    
144            /**
145            * Returns the addresses before and after the current address in the ordered set where uuid = &#63;.
146            *
147            * @param addressId the primary key of the current address
148            * @param uuid the uuid
149            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
150            * @return the previous, current, and next address
151            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            public com.liferay.portal.model.Address[] findByUuid_PrevAndNext(
155                    long addressId, java.lang.String uuid,
156                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157                    throws com.liferay.portal.NoSuchAddressException,
158                            com.liferay.portal.kernel.exception.SystemException;
159    
160            /**
161            * Removes all the addresses where uuid = &#63; from the database.
162            *
163            * @param uuid the uuid
164            * @throws SystemException if a system exception occurred
165            */
166            public void removeByUuid(java.lang.String uuid)
167                    throws com.liferay.portal.kernel.exception.SystemException;
168    
169            /**
170            * Returns the number of addresses where uuid = &#63;.
171            *
172            * @param uuid the uuid
173            * @return the number of matching addresses
174            * @throws SystemException if a system exception occurred
175            */
176            public int countByUuid(java.lang.String uuid)
177                    throws com.liferay.portal.kernel.exception.SystemException;
178    
179            /**
180            * Returns all the addresses where uuid = &#63; and companyId = &#63;.
181            *
182            * @param uuid the uuid
183            * @param companyId the company ID
184            * @return the matching addresses
185            * @throws SystemException if a system exception occurred
186            */
187            public java.util.List<com.liferay.portal.model.Address> findByUuid_C(
188                    java.lang.String uuid, long companyId)
189                    throws com.liferay.portal.kernel.exception.SystemException;
190    
191            /**
192            * Returns a range of all the addresses where uuid = &#63; and companyId = &#63;.
193            *
194            * <p>
195            * 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.
196            * </p>
197            *
198            * @param uuid the uuid
199            * @param companyId the company ID
200            * @param start the lower bound of the range of addresses
201            * @param end the upper bound of the range of addresses (not inclusive)
202            * @return the range of matching addresses
203            * @throws SystemException if a system exception occurred
204            */
205            public java.util.List<com.liferay.portal.model.Address> findByUuid_C(
206                    java.lang.String uuid, long companyId, int start, int end)
207                    throws com.liferay.portal.kernel.exception.SystemException;
208    
209            /**
210            * Returns an ordered range of all the addresses where uuid = &#63; and companyId = &#63;.
211            *
212            * <p>
213            * 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.
214            * </p>
215            *
216            * @param uuid the uuid
217            * @param companyId the company ID
218            * @param start the lower bound of the range of addresses
219            * @param end the upper bound of the range of addresses (not inclusive)
220            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
221            * @return the ordered range of matching addresses
222            * @throws SystemException if a system exception occurred
223            */
224            public java.util.List<com.liferay.portal.model.Address> findByUuid_C(
225                    java.lang.String uuid, long companyId, int start, int end,
226                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227                    throws com.liferay.portal.kernel.exception.SystemException;
228    
229            /**
230            * Returns the first address in the ordered set where uuid = &#63; and companyId = &#63;.
231            *
232            * @param uuid the uuid
233            * @param companyId the company ID
234            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
235            * @return the first matching address
236            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
237            * @throws SystemException if a system exception occurred
238            */
239            public com.liferay.portal.model.Address findByUuid_C_First(
240                    java.lang.String uuid, long companyId,
241                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
242                    throws com.liferay.portal.NoSuchAddressException,
243                            com.liferay.portal.kernel.exception.SystemException;
244    
245            /**
246            * Returns the first address in the ordered set where uuid = &#63; and companyId = &#63;.
247            *
248            * @param uuid the uuid
249            * @param companyId the company ID
250            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
251            * @return the first matching address, or <code>null</code> if a matching address could not be found
252            * @throws SystemException if a system exception occurred
253            */
254            public com.liferay.portal.model.Address fetchByUuid_C_First(
255                    java.lang.String uuid, long companyId,
256                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
257                    throws com.liferay.portal.kernel.exception.SystemException;
258    
259            /**
260            * Returns the last address in the ordered set where uuid = &#63; and companyId = &#63;.
261            *
262            * @param uuid the uuid
263            * @param companyId the company ID
264            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
265            * @return the last matching address
266            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
267            * @throws SystemException if a system exception occurred
268            */
269            public com.liferay.portal.model.Address findByUuid_C_Last(
270                    java.lang.String uuid, long companyId,
271                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272                    throws com.liferay.portal.NoSuchAddressException,
273                            com.liferay.portal.kernel.exception.SystemException;
274    
275            /**
276            * Returns the last address in the ordered set where uuid = &#63; and companyId = &#63;.
277            *
278            * @param uuid the uuid
279            * @param companyId the company ID
280            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
281            * @return the last matching address, or <code>null</code> if a matching address could not be found
282            * @throws SystemException if a system exception occurred
283            */
284            public com.liferay.portal.model.Address fetchByUuid_C_Last(
285                    java.lang.String uuid, long companyId,
286                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
287                    throws com.liferay.portal.kernel.exception.SystemException;
288    
289            /**
290            * Returns the addresses before and after the current address in the ordered set where uuid = &#63; and companyId = &#63;.
291            *
292            * @param addressId the primary key of the current address
293            * @param uuid the uuid
294            * @param companyId the company ID
295            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
296            * @return the previous, current, and next address
297            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
298            * @throws SystemException if a system exception occurred
299            */
300            public com.liferay.portal.model.Address[] findByUuid_C_PrevAndNext(
301                    long addressId, java.lang.String uuid, long companyId,
302                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
303                    throws com.liferay.portal.NoSuchAddressException,
304                            com.liferay.portal.kernel.exception.SystemException;
305    
306            /**
307            * Removes all the addresses where uuid = &#63; and companyId = &#63; from the database.
308            *
309            * @param uuid the uuid
310            * @param companyId the company ID
311            * @throws SystemException if a system exception occurred
312            */
313            public void removeByUuid_C(java.lang.String uuid, long companyId)
314                    throws com.liferay.portal.kernel.exception.SystemException;
315    
316            /**
317            * Returns the number of addresses where uuid = &#63; and companyId = &#63;.
318            *
319            * @param uuid the uuid
320            * @param companyId the company ID
321            * @return the number of matching addresses
322            * @throws SystemException if a system exception occurred
323            */
324            public int countByUuid_C(java.lang.String uuid, long companyId)
325                    throws com.liferay.portal.kernel.exception.SystemException;
326    
327            /**
328            * Returns all the addresses where companyId = &#63;.
329            *
330            * @param companyId the company ID
331            * @return the matching addresses
332            * @throws SystemException if a system exception occurred
333            */
334            public java.util.List<com.liferay.portal.model.Address> findByCompanyId(
335                    long companyId)
336                    throws com.liferay.portal.kernel.exception.SystemException;
337    
338            /**
339            * Returns a range of all the addresses where companyId = &#63;.
340            *
341            * <p>
342            * 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.
343            * </p>
344            *
345            * @param companyId the company ID
346            * @param start the lower bound of the range of addresses
347            * @param end the upper bound of the range of addresses (not inclusive)
348            * @return the range of matching addresses
349            * @throws SystemException if a system exception occurred
350            */
351            public java.util.List<com.liferay.portal.model.Address> findByCompanyId(
352                    long companyId, int start, int end)
353                    throws com.liferay.portal.kernel.exception.SystemException;
354    
355            /**
356            * Returns an ordered range of all the addresses where companyId = &#63;.
357            *
358            * <p>
359            * 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.
360            * </p>
361            *
362            * @param companyId the company ID
363            * @param start the lower bound of the range of addresses
364            * @param end the upper bound of the range of addresses (not inclusive)
365            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
366            * @return the ordered range of matching addresses
367            * @throws SystemException if a system exception occurred
368            */
369            public java.util.List<com.liferay.portal.model.Address> findByCompanyId(
370                    long companyId, int start, int end,
371                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
372                    throws com.liferay.portal.kernel.exception.SystemException;
373    
374            /**
375            * Returns the first address in the ordered set where companyId = &#63;.
376            *
377            * @param companyId the company ID
378            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
379            * @return the first matching address
380            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
381            * @throws SystemException if a system exception occurred
382            */
383            public com.liferay.portal.model.Address findByCompanyId_First(
384                    long companyId,
385                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
386                    throws com.liferay.portal.NoSuchAddressException,
387                            com.liferay.portal.kernel.exception.SystemException;
388    
389            /**
390            * Returns the first address in the ordered set where companyId = &#63;.
391            *
392            * @param companyId the company ID
393            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
394            * @return the first matching address, or <code>null</code> if a matching address could not be found
395            * @throws SystemException if a system exception occurred
396            */
397            public com.liferay.portal.model.Address fetchByCompanyId_First(
398                    long companyId,
399                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
400                    throws com.liferay.portal.kernel.exception.SystemException;
401    
402            /**
403            * Returns the last address in the ordered set where companyId = &#63;.
404            *
405            * @param companyId the company ID
406            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
407            * @return the last matching address
408            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
409            * @throws SystemException if a system exception occurred
410            */
411            public com.liferay.portal.model.Address findByCompanyId_Last(
412                    long companyId,
413                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
414                    throws com.liferay.portal.NoSuchAddressException,
415                            com.liferay.portal.kernel.exception.SystemException;
416    
417            /**
418            * Returns the last address in the ordered set where companyId = &#63;.
419            *
420            * @param companyId the company ID
421            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
422            * @return the last matching address, or <code>null</code> if a matching address could not be found
423            * @throws SystemException if a system exception occurred
424            */
425            public com.liferay.portal.model.Address fetchByCompanyId_Last(
426                    long companyId,
427                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
428                    throws com.liferay.portal.kernel.exception.SystemException;
429    
430            /**
431            * Returns the addresses before and after the current address in the ordered set where companyId = &#63;.
432            *
433            * @param addressId the primary key of the current address
434            * @param companyId the company ID
435            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
436            * @return the previous, current, and next address
437            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
438            * @throws SystemException if a system exception occurred
439            */
440            public com.liferay.portal.model.Address[] findByCompanyId_PrevAndNext(
441                    long addressId, long companyId,
442                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
443                    throws com.liferay.portal.NoSuchAddressException,
444                            com.liferay.portal.kernel.exception.SystemException;
445    
446            /**
447            * Removes all the addresses where companyId = &#63; from the database.
448            *
449            * @param companyId the company ID
450            * @throws SystemException if a system exception occurred
451            */
452            public void removeByCompanyId(long companyId)
453                    throws com.liferay.portal.kernel.exception.SystemException;
454    
455            /**
456            * Returns the number of addresses where companyId = &#63;.
457            *
458            * @param companyId the company ID
459            * @return the number of matching addresses
460            * @throws SystemException if a system exception occurred
461            */
462            public int countByCompanyId(long companyId)
463                    throws com.liferay.portal.kernel.exception.SystemException;
464    
465            /**
466            * Returns all the addresses where userId = &#63;.
467            *
468            * @param userId the user ID
469            * @return the matching addresses
470            * @throws SystemException if a system exception occurred
471            */
472            public java.util.List<com.liferay.portal.model.Address> findByUserId(
473                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
474    
475            /**
476            * Returns a range of all the addresses where userId = &#63;.
477            *
478            * <p>
479            * 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.
480            * </p>
481            *
482            * @param userId the user ID
483            * @param start the lower bound of the range of addresses
484            * @param end the upper bound of the range of addresses (not inclusive)
485            * @return the range of matching addresses
486            * @throws SystemException if a system exception occurred
487            */
488            public java.util.List<com.liferay.portal.model.Address> findByUserId(
489                    long userId, int start, int end)
490                    throws com.liferay.portal.kernel.exception.SystemException;
491    
492            /**
493            * Returns an ordered range of all the addresses where userId = &#63;.
494            *
495            * <p>
496            * 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.
497            * </p>
498            *
499            * @param userId the user ID
500            * @param start the lower bound of the range of addresses
501            * @param end the upper bound of the range of addresses (not inclusive)
502            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
503            * @return the ordered range of matching addresses
504            * @throws SystemException if a system exception occurred
505            */
506            public java.util.List<com.liferay.portal.model.Address> findByUserId(
507                    long userId, int start, int end,
508                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
509                    throws com.liferay.portal.kernel.exception.SystemException;
510    
511            /**
512            * Returns the first address in the ordered set where userId = &#63;.
513            *
514            * @param userId the user ID
515            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
516            * @return the first matching address
517            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
518            * @throws SystemException if a system exception occurred
519            */
520            public com.liferay.portal.model.Address findByUserId_First(long userId,
521                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
522                    throws com.liferay.portal.NoSuchAddressException,
523                            com.liferay.portal.kernel.exception.SystemException;
524    
525            /**
526            * Returns the first address in the ordered set where userId = &#63;.
527            *
528            * @param userId the user ID
529            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
530            * @return the first matching address, or <code>null</code> if a matching address could not be found
531            * @throws SystemException if a system exception occurred
532            */
533            public com.liferay.portal.model.Address fetchByUserId_First(long userId,
534                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
535                    throws com.liferay.portal.kernel.exception.SystemException;
536    
537            /**
538            * Returns the last address in the ordered set where userId = &#63;.
539            *
540            * @param userId the user ID
541            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
542            * @return the last matching address
543            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
544            * @throws SystemException if a system exception occurred
545            */
546            public com.liferay.portal.model.Address findByUserId_Last(long userId,
547                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
548                    throws com.liferay.portal.NoSuchAddressException,
549                            com.liferay.portal.kernel.exception.SystemException;
550    
551            /**
552            * Returns the last address in the ordered set where userId = &#63;.
553            *
554            * @param userId the user ID
555            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
556            * @return the last matching address, or <code>null</code> if a matching address could not be found
557            * @throws SystemException if a system exception occurred
558            */
559            public com.liferay.portal.model.Address fetchByUserId_Last(long userId,
560                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
561                    throws com.liferay.portal.kernel.exception.SystemException;
562    
563            /**
564            * Returns the addresses before and after the current address in the ordered set where userId = &#63;.
565            *
566            * @param addressId the primary key of the current address
567            * @param userId the user ID
568            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
569            * @return the previous, current, and next address
570            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
571            * @throws SystemException if a system exception occurred
572            */
573            public com.liferay.portal.model.Address[] findByUserId_PrevAndNext(
574                    long addressId, long userId,
575                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
576                    throws com.liferay.portal.NoSuchAddressException,
577                            com.liferay.portal.kernel.exception.SystemException;
578    
579            /**
580            * Removes all the addresses where userId = &#63; from the database.
581            *
582            * @param userId the user ID
583            * @throws SystemException if a system exception occurred
584            */
585            public void removeByUserId(long userId)
586                    throws com.liferay.portal.kernel.exception.SystemException;
587    
588            /**
589            * Returns the number of addresses where userId = &#63;.
590            *
591            * @param userId the user ID
592            * @return the number of matching addresses
593            * @throws SystemException if a system exception occurred
594            */
595            public int countByUserId(long userId)
596                    throws com.liferay.portal.kernel.exception.SystemException;
597    
598            /**
599            * Returns all the addresses where companyId = &#63; and classNameId = &#63;.
600            *
601            * @param companyId the company ID
602            * @param classNameId the class name ID
603            * @return the matching addresses
604            * @throws SystemException if a system exception occurred
605            */
606            public java.util.List<com.liferay.portal.model.Address> findByC_C(
607                    long companyId, long classNameId)
608                    throws com.liferay.portal.kernel.exception.SystemException;
609    
610            /**
611            * Returns a range of all the addresses where companyId = &#63; and classNameId = &#63;.
612            *
613            * <p>
614            * 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.
615            * </p>
616            *
617            * @param companyId the company ID
618            * @param classNameId the class name ID
619            * @param start the lower bound of the range of addresses
620            * @param end the upper bound of the range of addresses (not inclusive)
621            * @return the range of matching addresses
622            * @throws SystemException if a system exception occurred
623            */
624            public java.util.List<com.liferay.portal.model.Address> findByC_C(
625                    long companyId, long classNameId, int start, int end)
626                    throws com.liferay.portal.kernel.exception.SystemException;
627    
628            /**
629            * Returns an ordered range of all the addresses where companyId = &#63; and classNameId = &#63;.
630            *
631            * <p>
632            * 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.
633            * </p>
634            *
635            * @param companyId the company ID
636            * @param classNameId the class name ID
637            * @param start the lower bound of the range of addresses
638            * @param end the upper bound of the range of addresses (not inclusive)
639            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
640            * @return the ordered range of matching addresses
641            * @throws SystemException if a system exception occurred
642            */
643            public java.util.List<com.liferay.portal.model.Address> findByC_C(
644                    long companyId, long classNameId, int start, int end,
645                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
646                    throws com.liferay.portal.kernel.exception.SystemException;
647    
648            /**
649            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63;.
650            *
651            * @param companyId the company ID
652            * @param classNameId the class name ID
653            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
654            * @return the first matching address
655            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
656            * @throws SystemException if a system exception occurred
657            */
658            public com.liferay.portal.model.Address findByC_C_First(long companyId,
659                    long classNameId,
660                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
661                    throws com.liferay.portal.NoSuchAddressException,
662                            com.liferay.portal.kernel.exception.SystemException;
663    
664            /**
665            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63;.
666            *
667            * @param companyId the company ID
668            * @param classNameId the class name ID
669            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
670            * @return the first matching address, or <code>null</code> if a matching address could not be found
671            * @throws SystemException if a system exception occurred
672            */
673            public com.liferay.portal.model.Address fetchByC_C_First(long companyId,
674                    long classNameId,
675                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
676                    throws com.liferay.portal.kernel.exception.SystemException;
677    
678            /**
679            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63;.
680            *
681            * @param companyId the company ID
682            * @param classNameId the class name ID
683            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
684            * @return the last matching address
685            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
686            * @throws SystemException if a system exception occurred
687            */
688            public com.liferay.portal.model.Address findByC_C_Last(long companyId,
689                    long classNameId,
690                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
691                    throws com.liferay.portal.NoSuchAddressException,
692                            com.liferay.portal.kernel.exception.SystemException;
693    
694            /**
695            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63;.
696            *
697            * @param companyId the company ID
698            * @param classNameId the class name ID
699            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
700            * @return the last matching address, or <code>null</code> if a matching address could not be found
701            * @throws SystemException if a system exception occurred
702            */
703            public com.liferay.portal.model.Address fetchByC_C_Last(long companyId,
704                    long classNameId,
705                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
706                    throws com.liferay.portal.kernel.exception.SystemException;
707    
708            /**
709            * Returns the addresses before and after the current address in the ordered set where companyId = &#63; and classNameId = &#63;.
710            *
711            * @param addressId the primary key of the current address
712            * @param companyId the company ID
713            * @param classNameId the class name ID
714            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
715            * @return the previous, current, and next address
716            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
717            * @throws SystemException if a system exception occurred
718            */
719            public com.liferay.portal.model.Address[] findByC_C_PrevAndNext(
720                    long addressId, long companyId, long classNameId,
721                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
722                    throws com.liferay.portal.NoSuchAddressException,
723                            com.liferay.portal.kernel.exception.SystemException;
724    
725            /**
726            * Removes all the addresses where companyId = &#63; and classNameId = &#63; from the database.
727            *
728            * @param companyId the company ID
729            * @param classNameId the class name ID
730            * @throws SystemException if a system exception occurred
731            */
732            public void removeByC_C(long companyId, long classNameId)
733                    throws com.liferay.portal.kernel.exception.SystemException;
734    
735            /**
736            * Returns the number of addresses where companyId = &#63; and classNameId = &#63;.
737            *
738            * @param companyId the company ID
739            * @param classNameId the class name ID
740            * @return the number of matching addresses
741            * @throws SystemException if a system exception occurred
742            */
743            public int countByC_C(long companyId, long classNameId)
744                    throws com.liferay.portal.kernel.exception.SystemException;
745    
746            /**
747            * Returns all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
748            *
749            * @param companyId the company ID
750            * @param classNameId the class name ID
751            * @param classPK the class p k
752            * @return the matching addresses
753            * @throws SystemException if a system exception occurred
754            */
755            public java.util.List<com.liferay.portal.model.Address> findByC_C_C(
756                    long companyId, long classNameId, long classPK)
757                    throws com.liferay.portal.kernel.exception.SystemException;
758    
759            /**
760            * Returns a range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
761            *
762            * <p>
763            * 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.
764            * </p>
765            *
766            * @param companyId the company ID
767            * @param classNameId the class name ID
768            * @param classPK the class p k
769            * @param start the lower bound of the range of addresses
770            * @param end the upper bound of the range of addresses (not inclusive)
771            * @return the range of matching addresses
772            * @throws SystemException if a system exception occurred
773            */
774            public java.util.List<com.liferay.portal.model.Address> findByC_C_C(
775                    long companyId, long classNameId, long classPK, int start, int end)
776                    throws com.liferay.portal.kernel.exception.SystemException;
777    
778            /**
779            * Returns an ordered range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
780            *
781            * <p>
782            * 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.
783            * </p>
784            *
785            * @param companyId the company ID
786            * @param classNameId the class name ID
787            * @param classPK the class p k
788            * @param start the lower bound of the range of addresses
789            * @param end the upper bound of the range of addresses (not inclusive)
790            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
791            * @return the ordered range of matching addresses
792            * @throws SystemException if a system exception occurred
793            */
794            public java.util.List<com.liferay.portal.model.Address> findByC_C_C(
795                    long companyId, long classNameId, long classPK, int start, int end,
796                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
797                    throws com.liferay.portal.kernel.exception.SystemException;
798    
799            /**
800            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
801            *
802            * @param companyId the company ID
803            * @param classNameId the class name ID
804            * @param classPK the class p k
805            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
806            * @return the first matching address
807            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
808            * @throws SystemException if a system exception occurred
809            */
810            public com.liferay.portal.model.Address findByC_C_C_First(long companyId,
811                    long classNameId, long classPK,
812                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
813                    throws com.liferay.portal.NoSuchAddressException,
814                            com.liferay.portal.kernel.exception.SystemException;
815    
816            /**
817            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
818            *
819            * @param companyId the company ID
820            * @param classNameId the class name ID
821            * @param classPK the class p k
822            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
823            * @return the first matching address, or <code>null</code> if a matching address could not be found
824            * @throws SystemException if a system exception occurred
825            */
826            public com.liferay.portal.model.Address fetchByC_C_C_First(long companyId,
827                    long classNameId, long classPK,
828                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
829                    throws com.liferay.portal.kernel.exception.SystemException;
830    
831            /**
832            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
833            *
834            * @param companyId the company ID
835            * @param classNameId the class name ID
836            * @param classPK the class p k
837            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
838            * @return the last matching address
839            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
840            * @throws SystemException if a system exception occurred
841            */
842            public com.liferay.portal.model.Address findByC_C_C_Last(long companyId,
843                    long classNameId, long classPK,
844                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
845                    throws com.liferay.portal.NoSuchAddressException,
846                            com.liferay.portal.kernel.exception.SystemException;
847    
848            /**
849            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
850            *
851            * @param companyId the company ID
852            * @param classNameId the class name ID
853            * @param classPK the class p k
854            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
855            * @return the last matching address, or <code>null</code> if a matching address could not be found
856            * @throws SystemException if a system exception occurred
857            */
858            public com.liferay.portal.model.Address fetchByC_C_C_Last(long companyId,
859                    long classNameId, long classPK,
860                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
861                    throws com.liferay.portal.kernel.exception.SystemException;
862    
863            /**
864            * Returns the addresses before and after the current address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
865            *
866            * @param addressId the primary key of the current address
867            * @param companyId the company ID
868            * @param classNameId the class name ID
869            * @param classPK the class p k
870            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
871            * @return the previous, current, and next address
872            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
873            * @throws SystemException if a system exception occurred
874            */
875            public com.liferay.portal.model.Address[] findByC_C_C_PrevAndNext(
876                    long addressId, long companyId, long classNameId, long classPK,
877                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
878                    throws com.liferay.portal.NoSuchAddressException,
879                            com.liferay.portal.kernel.exception.SystemException;
880    
881            /**
882            * Removes all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
883            *
884            * @param companyId the company ID
885            * @param classNameId the class name ID
886            * @param classPK the class p k
887            * @throws SystemException if a system exception occurred
888            */
889            public void removeByC_C_C(long companyId, long classNameId, long classPK)
890                    throws com.liferay.portal.kernel.exception.SystemException;
891    
892            /**
893            * Returns the number of addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
894            *
895            * @param companyId the company ID
896            * @param classNameId the class name ID
897            * @param classPK the class p k
898            * @return the number of matching addresses
899            * @throws SystemException if a system exception occurred
900            */
901            public int countByC_C_C(long companyId, long classNameId, long classPK)
902                    throws com.liferay.portal.kernel.exception.SystemException;
903    
904            /**
905            * Returns all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
906            *
907            * @param companyId the company ID
908            * @param classNameId the class name ID
909            * @param classPK the class p k
910            * @param mailing the mailing
911            * @return the matching addresses
912            * @throws SystemException if a system exception occurred
913            */
914            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
915                    long companyId, long classNameId, long classPK, boolean mailing)
916                    throws com.liferay.portal.kernel.exception.SystemException;
917    
918            /**
919            * Returns a range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
920            *
921            * <p>
922            * 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.
923            * </p>
924            *
925            * @param companyId the company ID
926            * @param classNameId the class name ID
927            * @param classPK the class p k
928            * @param mailing the mailing
929            * @param start the lower bound of the range of addresses
930            * @param end the upper bound of the range of addresses (not inclusive)
931            * @return the range of matching addresses
932            * @throws SystemException if a system exception occurred
933            */
934            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
935                    long companyId, long classNameId, long classPK, boolean mailing,
936                    int start, int end)
937                    throws com.liferay.portal.kernel.exception.SystemException;
938    
939            /**
940            * Returns an ordered range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
941            *
942            * <p>
943            * 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.
944            * </p>
945            *
946            * @param companyId the company ID
947            * @param classNameId the class name ID
948            * @param classPK the class p k
949            * @param mailing the mailing
950            * @param start the lower bound of the range of addresses
951            * @param end the upper bound of the range of addresses (not inclusive)
952            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
953            * @return the ordered range of matching addresses
954            * @throws SystemException if a system exception occurred
955            */
956            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
957                    long companyId, long classNameId, long classPK, boolean mailing,
958                    int start, int end,
959                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
960                    throws com.liferay.portal.kernel.exception.SystemException;
961    
962            /**
963            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
964            *
965            * @param companyId the company ID
966            * @param classNameId the class name ID
967            * @param classPK the class p k
968            * @param mailing the mailing
969            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
970            * @return the first matching address
971            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
972            * @throws SystemException if a system exception occurred
973            */
974            public com.liferay.portal.model.Address findByC_C_C_M_First(
975                    long companyId, long classNameId, long classPK, boolean mailing,
976                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
977                    throws com.liferay.portal.NoSuchAddressException,
978                            com.liferay.portal.kernel.exception.SystemException;
979    
980            /**
981            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
982            *
983            * @param companyId the company ID
984            * @param classNameId the class name ID
985            * @param classPK the class p k
986            * @param mailing the mailing
987            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
988            * @return the first matching address, or <code>null</code> if a matching address could not be found
989            * @throws SystemException if a system exception occurred
990            */
991            public com.liferay.portal.model.Address fetchByC_C_C_M_First(
992                    long companyId, long classNameId, long classPK, boolean mailing,
993                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
994                    throws com.liferay.portal.kernel.exception.SystemException;
995    
996            /**
997            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
998            *
999            * @param companyId the company ID
1000            * @param classNameId the class name ID
1001            * @param classPK the class p k
1002            * @param mailing the mailing
1003            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1004            * @return the last matching address
1005            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
1006            * @throws SystemException if a system exception occurred
1007            */
1008            public com.liferay.portal.model.Address findByC_C_C_M_Last(long companyId,
1009                    long classNameId, long classPK, boolean mailing,
1010                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1011                    throws com.liferay.portal.NoSuchAddressException,
1012                            com.liferay.portal.kernel.exception.SystemException;
1013    
1014            /**
1015            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
1016            *
1017            * @param companyId the company ID
1018            * @param classNameId the class name ID
1019            * @param classPK the class p k
1020            * @param mailing the mailing
1021            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1022            * @return the last matching address, or <code>null</code> if a matching address could not be found
1023            * @throws SystemException if a system exception occurred
1024            */
1025            public com.liferay.portal.model.Address fetchByC_C_C_M_Last(
1026                    long companyId, long classNameId, long classPK, boolean mailing,
1027                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1028                    throws com.liferay.portal.kernel.exception.SystemException;
1029    
1030            /**
1031            * 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;.
1032            *
1033            * @param addressId the primary key of the current address
1034            * @param companyId the company ID
1035            * @param classNameId the class name ID
1036            * @param classPK the class p k
1037            * @param mailing the mailing
1038            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1039            * @return the previous, current, and next address
1040            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
1041            * @throws SystemException if a system exception occurred
1042            */
1043            public com.liferay.portal.model.Address[] findByC_C_C_M_PrevAndNext(
1044                    long addressId, long companyId, long classNameId, long classPK,
1045                    boolean mailing,
1046                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1047                    throws com.liferay.portal.NoSuchAddressException,
1048                            com.liferay.portal.kernel.exception.SystemException;
1049    
1050            /**
1051            * Removes all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63; from the database.
1052            *
1053            * @param companyId the company ID
1054            * @param classNameId the class name ID
1055            * @param classPK the class p k
1056            * @param mailing the mailing
1057            * @throws SystemException if a system exception occurred
1058            */
1059            public void removeByC_C_C_M(long companyId, long classNameId, long classPK,
1060                    boolean mailing)
1061                    throws com.liferay.portal.kernel.exception.SystemException;
1062    
1063            /**
1064            * Returns the number of addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and mailing = &#63;.
1065            *
1066            * @param companyId the company ID
1067            * @param classNameId the class name ID
1068            * @param classPK the class p k
1069            * @param mailing the mailing
1070            * @return the number of matching addresses
1071            * @throws SystemException if a system exception occurred
1072            */
1073            public int countByC_C_C_M(long companyId, long classNameId, long classPK,
1074                    boolean mailing)
1075                    throws com.liferay.portal.kernel.exception.SystemException;
1076    
1077            /**
1078            * Returns all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1079            *
1080            * @param companyId the company ID
1081            * @param classNameId the class name ID
1082            * @param classPK the class p k
1083            * @param primary the primary
1084            * @return the matching addresses
1085            * @throws SystemException if a system exception occurred
1086            */
1087            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
1088                    long companyId, long classNameId, long classPK, boolean primary)
1089                    throws com.liferay.portal.kernel.exception.SystemException;
1090    
1091            /**
1092            * Returns a range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1093            *
1094            * <p>
1095            * 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.
1096            * </p>
1097            *
1098            * @param companyId the company ID
1099            * @param classNameId the class name ID
1100            * @param classPK the class p k
1101            * @param primary the primary
1102            * @param start the lower bound of the range of addresses
1103            * @param end the upper bound of the range of addresses (not inclusive)
1104            * @return the range of matching addresses
1105            * @throws SystemException if a system exception occurred
1106            */
1107            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
1108                    long companyId, long classNameId, long classPK, boolean primary,
1109                    int start, int end)
1110                    throws com.liferay.portal.kernel.exception.SystemException;
1111    
1112            /**
1113            * Returns an ordered range of all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1114            *
1115            * <p>
1116            * 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.
1117            * </p>
1118            *
1119            * @param companyId the company ID
1120            * @param classNameId the class name ID
1121            * @param classPK the class p k
1122            * @param primary the primary
1123            * @param start the lower bound of the range of addresses
1124            * @param end the upper bound of the range of addresses (not inclusive)
1125            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1126            * @return the ordered range of matching addresses
1127            * @throws SystemException if a system exception occurred
1128            */
1129            public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
1130                    long companyId, long classNameId, long classPK, boolean primary,
1131                    int start, int end,
1132                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1133                    throws com.liferay.portal.kernel.exception.SystemException;
1134    
1135            /**
1136            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1137            *
1138            * @param companyId the company ID
1139            * @param classNameId the class name ID
1140            * @param classPK the class p k
1141            * @param primary the primary
1142            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1143            * @return the first matching address
1144            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
1145            * @throws SystemException if a system exception occurred
1146            */
1147            public com.liferay.portal.model.Address findByC_C_C_P_First(
1148                    long companyId, long classNameId, long classPK, boolean primary,
1149                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1150                    throws com.liferay.portal.NoSuchAddressException,
1151                            com.liferay.portal.kernel.exception.SystemException;
1152    
1153            /**
1154            * Returns the first address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1155            *
1156            * @param companyId the company ID
1157            * @param classNameId the class name ID
1158            * @param classPK the class p k
1159            * @param primary the primary
1160            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1161            * @return the first matching address, or <code>null</code> if a matching address could not be found
1162            * @throws SystemException if a system exception occurred
1163            */
1164            public com.liferay.portal.model.Address fetchByC_C_C_P_First(
1165                    long companyId, long classNameId, long classPK, boolean primary,
1166                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1167                    throws com.liferay.portal.kernel.exception.SystemException;
1168    
1169            /**
1170            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1171            *
1172            * @param companyId the company ID
1173            * @param classNameId the class name ID
1174            * @param classPK the class p k
1175            * @param primary the primary
1176            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1177            * @return the last matching address
1178            * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found
1179            * @throws SystemException if a system exception occurred
1180            */
1181            public com.liferay.portal.model.Address findByC_C_C_P_Last(long companyId,
1182                    long classNameId, long classPK, boolean primary,
1183                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1184                    throws com.liferay.portal.NoSuchAddressException,
1185                            com.liferay.portal.kernel.exception.SystemException;
1186    
1187            /**
1188            * Returns the last address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1189            *
1190            * @param companyId the company ID
1191            * @param classNameId the class name ID
1192            * @param classPK the class p k
1193            * @param primary the primary
1194            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1195            * @return the last matching address, or <code>null</code> if a matching address could not be found
1196            * @throws SystemException if a system exception occurred
1197            */
1198            public com.liferay.portal.model.Address fetchByC_C_C_P_Last(
1199                    long companyId, long classNameId, long classPK, boolean primary,
1200                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1201                    throws com.liferay.portal.kernel.exception.SystemException;
1202    
1203            /**
1204            * 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;.
1205            *
1206            * @param addressId the primary key of the current address
1207            * @param companyId the company ID
1208            * @param classNameId the class name ID
1209            * @param classPK the class p k
1210            * @param primary the primary
1211            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1212            * @return the previous, current, and next address
1213            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
1214            * @throws SystemException if a system exception occurred
1215            */
1216            public com.liferay.portal.model.Address[] findByC_C_C_P_PrevAndNext(
1217                    long addressId, long companyId, long classNameId, long classPK,
1218                    boolean primary,
1219                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1220                    throws com.liferay.portal.NoSuchAddressException,
1221                            com.liferay.portal.kernel.exception.SystemException;
1222    
1223            /**
1224            * Removes all the addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63; from the database.
1225            *
1226            * @param companyId the company ID
1227            * @param classNameId the class name ID
1228            * @param classPK the class p k
1229            * @param primary the primary
1230            * @throws SystemException if a system exception occurred
1231            */
1232            public void removeByC_C_C_P(long companyId, long classNameId, long classPK,
1233                    boolean primary)
1234                    throws com.liferay.portal.kernel.exception.SystemException;
1235    
1236            /**
1237            * Returns the number of addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1238            *
1239            * @param companyId the company ID
1240            * @param classNameId the class name ID
1241            * @param classPK the class p k
1242            * @param primary the primary
1243            * @return the number of matching addresses
1244            * @throws SystemException if a system exception occurred
1245            */
1246            public int countByC_C_C_P(long companyId, long classNameId, long classPK,
1247                    boolean primary)
1248                    throws com.liferay.portal.kernel.exception.SystemException;
1249    
1250            /**
1251            * Caches the address in the entity cache if it is enabled.
1252            *
1253            * @param address the address
1254            */
1255            public void cacheResult(com.liferay.portal.model.Address address);
1256    
1257            /**
1258            * Caches the addresses in the entity cache if it is enabled.
1259            *
1260            * @param addresses the addresses
1261            */
1262            public void cacheResult(
1263                    java.util.List<com.liferay.portal.model.Address> addresses);
1264    
1265            /**
1266            * Creates a new address with the primary key. Does not add the address to the database.
1267            *
1268            * @param addressId the primary key for the new address
1269            * @return the new address
1270            */
1271            public com.liferay.portal.model.Address create(long addressId);
1272    
1273            /**
1274            * Removes the address with the primary key from the database. Also notifies the appropriate model listeners.
1275            *
1276            * @param addressId the primary key of the address
1277            * @return the address that was removed
1278            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
1279            * @throws SystemException if a system exception occurred
1280            */
1281            public com.liferay.portal.model.Address remove(long addressId)
1282                    throws com.liferay.portal.NoSuchAddressException,
1283                            com.liferay.portal.kernel.exception.SystemException;
1284    
1285            public com.liferay.portal.model.Address updateImpl(
1286                    com.liferay.portal.model.Address address)
1287                    throws com.liferay.portal.kernel.exception.SystemException;
1288    
1289            /**
1290            * Returns the address with the primary key or throws a {@link com.liferay.portal.NoSuchAddressException} if it could not be found.
1291            *
1292            * @param addressId the primary key of the address
1293            * @return the address
1294            * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found
1295            * @throws SystemException if a system exception occurred
1296            */
1297            public com.liferay.portal.model.Address findByPrimaryKey(long addressId)
1298                    throws com.liferay.portal.NoSuchAddressException,
1299                            com.liferay.portal.kernel.exception.SystemException;
1300    
1301            /**
1302            * Returns the address with the primary key or returns <code>null</code> if it could not be found.
1303            *
1304            * @param addressId the primary key of the address
1305            * @return the address, or <code>null</code> if a address with the primary key could not be found
1306            * @throws SystemException if a system exception occurred
1307            */
1308            public com.liferay.portal.model.Address fetchByPrimaryKey(long addressId)
1309                    throws com.liferay.portal.kernel.exception.SystemException;
1310    
1311            /**
1312            * Returns all the addresses.
1313            *
1314            * @return the addresses
1315            * @throws SystemException if a system exception occurred
1316            */
1317            public java.util.List<com.liferay.portal.model.Address> findAll()
1318                    throws com.liferay.portal.kernel.exception.SystemException;
1319    
1320            /**
1321            * Returns a range of all the addresses.
1322            *
1323            * <p>
1324            * 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.
1325            * </p>
1326            *
1327            * @param start the lower bound of the range of addresses
1328            * @param end the upper bound of the range of addresses (not inclusive)
1329            * @return the range of addresses
1330            * @throws SystemException if a system exception occurred
1331            */
1332            public java.util.List<com.liferay.portal.model.Address> findAll(int start,
1333                    int end) throws com.liferay.portal.kernel.exception.SystemException;
1334    
1335            /**
1336            * Returns an ordered range of all the addresses.
1337            *
1338            * <p>
1339            * 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.
1340            * </p>
1341            *
1342            * @param start the lower bound of the range of addresses
1343            * @param end the upper bound of the range of addresses (not inclusive)
1344            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1345            * @return the ordered range of addresses
1346            * @throws SystemException if a system exception occurred
1347            */
1348            public java.util.List<com.liferay.portal.model.Address> findAll(int start,
1349                    int end,
1350                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1351                    throws com.liferay.portal.kernel.exception.SystemException;
1352    
1353            /**
1354            * Removes all the addresses from the database.
1355            *
1356            * @throws SystemException if a system exception occurred
1357            */
1358            public void removeAll()
1359                    throws com.liferay.portal.kernel.exception.SystemException;
1360    
1361            /**
1362            * Returns the number of addresses.
1363            *
1364            * @return the number of addresses
1365            * @throws SystemException if a system exception occurred
1366            */
1367            public int countAll()
1368                    throws com.liferay.portal.kernel.exception.SystemException;
1369    }