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