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