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