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