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