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 the first email address in the ordered set where uuid = &#63;.
158            *
159            * @param uuid the uuid
160            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
161            * @return the first matching email address
162            * @throws NoSuchEmailAddressException if a matching email address could not be found
163            */
164            public static EmailAddress findByUuid_First(java.lang.String uuid,
165                    OrderByComparator<EmailAddress> orderByComparator)
166                    throws com.liferay.portal.NoSuchEmailAddressException {
167                    return getPersistence().findByUuid_First(uuid, orderByComparator);
168            }
169    
170            /**
171            * Returns the first email address in the ordered set where uuid = &#63;.
172            *
173            * @param uuid the uuid
174            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
175            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
176            */
177            public static EmailAddress fetchByUuid_First(java.lang.String uuid,
178                    OrderByComparator<EmailAddress> orderByComparator) {
179                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
180            }
181    
182            /**
183            * Returns the last email address in the ordered set where uuid = &#63;.
184            *
185            * @param uuid the uuid
186            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
187            * @return the last matching email address
188            * @throws NoSuchEmailAddressException if a matching email address could not be found
189            */
190            public static EmailAddress findByUuid_Last(java.lang.String uuid,
191                    OrderByComparator<EmailAddress> orderByComparator)
192                    throws com.liferay.portal.NoSuchEmailAddressException {
193                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
194            }
195    
196            /**
197            * Returns the last email address in the ordered set where uuid = &#63;.
198            *
199            * @param uuid the uuid
200            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
201            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
202            */
203            public static EmailAddress fetchByUuid_Last(java.lang.String uuid,
204                    OrderByComparator<EmailAddress> orderByComparator) {
205                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
206            }
207    
208            /**
209            * Returns the email addresses before and after the current email address in the ordered set where uuid = &#63;.
210            *
211            * @param emailAddressId the primary key of the current email address
212            * @param uuid the uuid
213            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
214            * @return the previous, current, and next email address
215            * @throws NoSuchEmailAddressException if a email address with the primary key could not be found
216            */
217            public static EmailAddress[] findByUuid_PrevAndNext(long emailAddressId,
218                    java.lang.String uuid, OrderByComparator<EmailAddress> orderByComparator)
219                    throws com.liferay.portal.NoSuchEmailAddressException {
220                    return getPersistence()
221                                       .findByUuid_PrevAndNext(emailAddressId, uuid,
222                            orderByComparator);
223            }
224    
225            /**
226            * Removes all the email addresses where uuid = &#63; from the database.
227            *
228            * @param uuid the uuid
229            */
230            public static void removeByUuid(java.lang.String uuid) {
231                    getPersistence().removeByUuid(uuid);
232            }
233    
234            /**
235            * Returns the number of email addresses where uuid = &#63;.
236            *
237            * @param uuid the uuid
238            * @return the number of matching email addresses
239            */
240            public static int countByUuid(java.lang.String uuid) {
241                    return getPersistence().countByUuid(uuid);
242            }
243    
244            /**
245            * Returns all the email addresses where uuid = &#63; and companyId = &#63;.
246            *
247            * @param uuid the uuid
248            * @param companyId the company ID
249            * @return the matching email addresses
250            */
251            public static List<EmailAddress> findByUuid_C(java.lang.String uuid,
252                    long companyId) {
253                    return getPersistence().findByUuid_C(uuid, companyId);
254            }
255    
256            /**
257            * Returns a range of all the email addresses where uuid = &#63; and companyId = &#63;.
258            *
259            * <p>
260            * 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.
261            * </p>
262            *
263            * @param uuid the uuid
264            * @param companyId the company ID
265            * @param start the lower bound of the range of email addresses
266            * @param end the upper bound of the range of email addresses (not inclusive)
267            * @return the range of matching email addresses
268            */
269            public static List<EmailAddress> findByUuid_C(java.lang.String uuid,
270                    long companyId, int start, int end) {
271                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
272            }
273    
274            /**
275            * Returns an ordered range of all the email addresses where uuid = &#63; and companyId = &#63;.
276            *
277            * <p>
278            * 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.
279            * </p>
280            *
281            * @param uuid the uuid
282            * @param companyId the company ID
283            * @param start the lower bound of the range of email addresses
284            * @param end the upper bound of the range of email addresses (not inclusive)
285            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
286            * @return the ordered range of matching email addresses
287            */
288            public static List<EmailAddress> findByUuid_C(java.lang.String uuid,
289                    long companyId, int start, int end,
290                    OrderByComparator<EmailAddress> orderByComparator) {
291                    return getPersistence()
292                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
293            }
294    
295            /**
296            * Returns the first email address in the ordered set where uuid = &#63; and companyId = &#63;.
297            *
298            * @param uuid the uuid
299            * @param companyId the company ID
300            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
301            * @return the first matching email address
302            * @throws NoSuchEmailAddressException if a matching email address could not be found
303            */
304            public static EmailAddress findByUuid_C_First(java.lang.String uuid,
305                    long companyId, OrderByComparator<EmailAddress> orderByComparator)
306                    throws com.liferay.portal.NoSuchEmailAddressException {
307                    return getPersistence()
308                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
309            }
310    
311            /**
312            * Returns the first email address in the ordered set where uuid = &#63; and companyId = &#63;.
313            *
314            * @param uuid the uuid
315            * @param companyId the company ID
316            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
317            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
318            */
319            public static EmailAddress fetchByUuid_C_First(java.lang.String uuid,
320                    long companyId, OrderByComparator<EmailAddress> orderByComparator) {
321                    return getPersistence()
322                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
323            }
324    
325            /**
326            * Returns the last email address in the ordered set where uuid = &#63; and companyId = &#63;.
327            *
328            * @param uuid the uuid
329            * @param companyId the company ID
330            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
331            * @return the last matching email address
332            * @throws NoSuchEmailAddressException if a matching email address could not be found
333            */
334            public static EmailAddress findByUuid_C_Last(java.lang.String uuid,
335                    long companyId, OrderByComparator<EmailAddress> orderByComparator)
336                    throws com.liferay.portal.NoSuchEmailAddressException {
337                    return getPersistence()
338                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
339            }
340    
341            /**
342            * Returns the last 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 last matching email address, or <code>null</code> if a matching email address could not be found
348            */
349            public static EmailAddress fetchByUuid_C_Last(java.lang.String uuid,
350                    long companyId, OrderByComparator<EmailAddress> orderByComparator) {
351                    return getPersistence()
352                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
353            }
354    
355            /**
356            * Returns the email addresses before and after the current email address in the ordered set where uuid = &#63; and companyId = &#63;.
357            *
358            * @param emailAddressId the primary key of the current email address
359            * @param uuid the uuid
360            * @param companyId the company ID
361            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
362            * @return the previous, current, and next email address
363            * @throws NoSuchEmailAddressException if a email address with the primary key could not be found
364            */
365            public static EmailAddress[] findByUuid_C_PrevAndNext(long emailAddressId,
366                    java.lang.String uuid, long companyId,
367                    OrderByComparator<EmailAddress> orderByComparator)
368                    throws com.liferay.portal.NoSuchEmailAddressException {
369                    return getPersistence()
370                                       .findByUuid_C_PrevAndNext(emailAddressId, uuid, companyId,
371                            orderByComparator);
372            }
373    
374            /**
375            * Removes all the email addresses where uuid = &#63; and companyId = &#63; from the database.
376            *
377            * @param uuid the uuid
378            * @param companyId the company ID
379            */
380            public static void removeByUuid_C(java.lang.String uuid, long companyId) {
381                    getPersistence().removeByUuid_C(uuid, companyId);
382            }
383    
384            /**
385            * Returns the number of email addresses where uuid = &#63; and companyId = &#63;.
386            *
387            * @param uuid the uuid
388            * @param companyId the company ID
389            * @return the number of matching email addresses
390            */
391            public static int countByUuid_C(java.lang.String uuid, long companyId) {
392                    return getPersistence().countByUuid_C(uuid, companyId);
393            }
394    
395            /**
396            * Returns all the email addresses where companyId = &#63;.
397            *
398            * @param companyId the company ID
399            * @return the matching email addresses
400            */
401            public static List<EmailAddress> findByCompanyId(long companyId) {
402                    return getPersistence().findByCompanyId(companyId);
403            }
404    
405            /**
406            * Returns a range of all the email addresses where companyId = &#63;.
407            *
408            * <p>
409            * 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.
410            * </p>
411            *
412            * @param companyId the company ID
413            * @param start the lower bound of the range of email addresses
414            * @param end the upper bound of the range of email addresses (not inclusive)
415            * @return the range of matching email addresses
416            */
417            public static List<EmailAddress> findByCompanyId(long companyId, int start,
418                    int end) {
419                    return getPersistence().findByCompanyId(companyId, start, end);
420            }
421    
422            /**
423            * Returns an ordered range of all the email addresses where companyId = &#63;.
424            *
425            * <p>
426            * 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.
427            * </p>
428            *
429            * @param companyId the company ID
430            * @param start the lower bound of the range of email addresses
431            * @param end the upper bound of the range of email addresses (not inclusive)
432            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
433            * @return the ordered range of matching email addresses
434            */
435            public static List<EmailAddress> findByCompanyId(long companyId, int start,
436                    int end, OrderByComparator<EmailAddress> orderByComparator) {
437                    return getPersistence()
438                                       .findByCompanyId(companyId, start, end, orderByComparator);
439            }
440    
441            /**
442            * Returns the first email address in the ordered set where companyId = &#63;.
443            *
444            * @param companyId the company ID
445            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
446            * @return the first matching email address
447            * @throws NoSuchEmailAddressException if a matching email address could not be found
448            */
449            public static EmailAddress findByCompanyId_First(long companyId,
450                    OrderByComparator<EmailAddress> orderByComparator)
451                    throws com.liferay.portal.NoSuchEmailAddressException {
452                    return getPersistence()
453                                       .findByCompanyId_First(companyId, orderByComparator);
454            }
455    
456            /**
457            * Returns the first email address in the ordered set where companyId = &#63;.
458            *
459            * @param companyId the company ID
460            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
461            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
462            */
463            public static EmailAddress fetchByCompanyId_First(long companyId,
464                    OrderByComparator<EmailAddress> orderByComparator) {
465                    return getPersistence()
466                                       .fetchByCompanyId_First(companyId, orderByComparator);
467            }
468    
469            /**
470            * Returns the last email address in the ordered set where companyId = &#63;.
471            *
472            * @param companyId the company ID
473            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
474            * @return the last matching email address
475            * @throws NoSuchEmailAddressException if a matching email address could not be found
476            */
477            public static EmailAddress findByCompanyId_Last(long companyId,
478                    OrderByComparator<EmailAddress> orderByComparator)
479                    throws com.liferay.portal.NoSuchEmailAddressException {
480                    return getPersistence()
481                                       .findByCompanyId_Last(companyId, orderByComparator);
482            }
483    
484            /**
485            * Returns the last email address in the ordered set where companyId = &#63;.
486            *
487            * @param companyId the company ID
488            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
489            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
490            */
491            public static EmailAddress fetchByCompanyId_Last(long companyId,
492                    OrderByComparator<EmailAddress> orderByComparator) {
493                    return getPersistence()
494                                       .fetchByCompanyId_Last(companyId, orderByComparator);
495            }
496    
497            /**
498            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63;.
499            *
500            * @param emailAddressId the primary key of the current email address
501            * @param companyId the company ID
502            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
503            * @return the previous, current, and next email address
504            * @throws NoSuchEmailAddressException if a email address with the primary key could not be found
505            */
506            public static EmailAddress[] findByCompanyId_PrevAndNext(
507                    long emailAddressId, long companyId,
508                    OrderByComparator<EmailAddress> orderByComparator)
509                    throws com.liferay.portal.NoSuchEmailAddressException {
510                    return getPersistence()
511                                       .findByCompanyId_PrevAndNext(emailAddressId, companyId,
512                            orderByComparator);
513            }
514    
515            /**
516            * Removes all the email addresses where companyId = &#63; from the database.
517            *
518            * @param companyId the company ID
519            */
520            public static void removeByCompanyId(long companyId) {
521                    getPersistence().removeByCompanyId(companyId);
522            }
523    
524            /**
525            * Returns the number of email addresses where companyId = &#63;.
526            *
527            * @param companyId the company ID
528            * @return the number of matching email addresses
529            */
530            public static int countByCompanyId(long companyId) {
531                    return getPersistence().countByCompanyId(companyId);
532            }
533    
534            /**
535            * Returns all the email addresses where userId = &#63;.
536            *
537            * @param userId the user ID
538            * @return the matching email addresses
539            */
540            public static List<EmailAddress> findByUserId(long userId) {
541                    return getPersistence().findByUserId(userId);
542            }
543    
544            /**
545            * Returns a range of all the email addresses where userId = &#63;.
546            *
547            * <p>
548            * 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.
549            * </p>
550            *
551            * @param userId the user ID
552            * @param start the lower bound of the range of email addresses
553            * @param end the upper bound of the range of email addresses (not inclusive)
554            * @return the range of matching email addresses
555            */
556            public static List<EmailAddress> findByUserId(long userId, int start,
557                    int end) {
558                    return getPersistence().findByUserId(userId, start, end);
559            }
560    
561            /**
562            * Returns an ordered range of all the email addresses where userId = &#63;.
563            *
564            * <p>
565            * 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.
566            * </p>
567            *
568            * @param userId the user ID
569            * @param start the lower bound of the range of email addresses
570            * @param end the upper bound of the range of email addresses (not inclusive)
571            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
572            * @return the ordered range of matching email addresses
573            */
574            public static List<EmailAddress> findByUserId(long userId, int start,
575                    int end, OrderByComparator<EmailAddress> orderByComparator) {
576                    return getPersistence()
577                                       .findByUserId(userId, start, end, orderByComparator);
578            }
579    
580            /**
581            * Returns the first email address in the ordered set where userId = &#63;.
582            *
583            * @param userId the user ID
584            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
585            * @return the first matching email address
586            * @throws NoSuchEmailAddressException if a matching email address could not be found
587            */
588            public static EmailAddress findByUserId_First(long userId,
589                    OrderByComparator<EmailAddress> orderByComparator)
590                    throws com.liferay.portal.NoSuchEmailAddressException {
591                    return getPersistence().findByUserId_First(userId, orderByComparator);
592            }
593    
594            /**
595            * Returns the first email address in the ordered set where userId = &#63;.
596            *
597            * @param userId the user ID
598            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
599            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
600            */
601            public static EmailAddress fetchByUserId_First(long userId,
602                    OrderByComparator<EmailAddress> orderByComparator) {
603                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
604            }
605    
606            /**
607            * Returns the last email address in the ordered set where userId = &#63;.
608            *
609            * @param userId the user ID
610            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
611            * @return the last matching email address
612            * @throws NoSuchEmailAddressException if a matching email address could not be found
613            */
614            public static EmailAddress findByUserId_Last(long userId,
615                    OrderByComparator<EmailAddress> orderByComparator)
616                    throws com.liferay.portal.NoSuchEmailAddressException {
617                    return getPersistence().findByUserId_Last(userId, orderByComparator);
618            }
619    
620            /**
621            * Returns the last email address in the ordered set where userId = &#63;.
622            *
623            * @param userId the user ID
624            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
625            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
626            */
627            public static EmailAddress fetchByUserId_Last(long userId,
628                    OrderByComparator<EmailAddress> orderByComparator) {
629                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
630            }
631    
632            /**
633            * Returns the email addresses before and after the current email address in the ordered set where userId = &#63;.
634            *
635            * @param emailAddressId the primary key of the current email address
636            * @param userId the user ID
637            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
638            * @return the previous, current, and next email address
639            * @throws NoSuchEmailAddressException if a email address with the primary key could not be found
640            */
641            public static EmailAddress[] findByUserId_PrevAndNext(long emailAddressId,
642                    long userId, OrderByComparator<EmailAddress> orderByComparator)
643                    throws com.liferay.portal.NoSuchEmailAddressException {
644                    return getPersistence()
645                                       .findByUserId_PrevAndNext(emailAddressId, userId,
646                            orderByComparator);
647            }
648    
649            /**
650            * Removes all the email addresses where userId = &#63; from the database.
651            *
652            * @param userId the user ID
653            */
654            public static void removeByUserId(long userId) {
655                    getPersistence().removeByUserId(userId);
656            }
657    
658            /**
659            * Returns the number of email addresses where userId = &#63;.
660            *
661            * @param userId the user ID
662            * @return the number of matching email addresses
663            */
664            public static int countByUserId(long userId) {
665                    return getPersistence().countByUserId(userId);
666            }
667    
668            /**
669            * Returns all the email addresses where companyId = &#63; and classNameId = &#63;.
670            *
671            * @param companyId the company ID
672            * @param classNameId the class name ID
673            * @return the matching email addresses
674            */
675            public static List<EmailAddress> findByC_C(long companyId, long classNameId) {
676                    return getPersistence().findByC_C(companyId, classNameId);
677            }
678    
679            /**
680            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63;.
681            *
682            * <p>
683            * 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.
684            * </p>
685            *
686            * @param companyId the company ID
687            * @param classNameId the class name ID
688            * @param start the lower bound of the range of email addresses
689            * @param end the upper bound of the range of email addresses (not inclusive)
690            * @return the range of matching email addresses
691            */
692            public static List<EmailAddress> findByC_C(long companyId,
693                    long classNameId, int start, int end) {
694                    return getPersistence().findByC_C(companyId, classNameId, start, end);
695            }
696    
697            /**
698            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63;.
699            *
700            * <p>
701            * 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.
702            * </p>
703            *
704            * @param companyId the company ID
705            * @param classNameId the class name ID
706            * @param start the lower bound of the range of email addresses
707            * @param end the upper bound of the range of email addresses (not inclusive)
708            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
709            * @return the ordered range of matching email addresses
710            */
711            public static List<EmailAddress> findByC_C(long companyId,
712                    long classNameId, int start, int end,
713                    OrderByComparator<EmailAddress> orderByComparator) {
714                    return getPersistence()
715                                       .findByC_C(companyId, classNameId, start, end,
716                            orderByComparator);
717            }
718    
719            /**
720            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63;.
721            *
722            * @param companyId the company ID
723            * @param classNameId the class name ID
724            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
725            * @return the first matching email address
726            * @throws NoSuchEmailAddressException if a matching email address could not be found
727            */
728            public static EmailAddress findByC_C_First(long companyId,
729                    long classNameId, OrderByComparator<EmailAddress> orderByComparator)
730                    throws com.liferay.portal.NoSuchEmailAddressException {
731                    return getPersistence()
732                                       .findByC_C_First(companyId, classNameId, orderByComparator);
733            }
734    
735            /**
736            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63;.
737            *
738            * @param companyId the company ID
739            * @param classNameId the class name ID
740            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
741            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
742            */
743            public static EmailAddress fetchByC_C_First(long companyId,
744                    long classNameId, OrderByComparator<EmailAddress> orderByComparator) {
745                    return getPersistence()
746                                       .fetchByC_C_First(companyId, classNameId, orderByComparator);
747            }
748    
749            /**
750            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63;.
751            *
752            * @param companyId the company ID
753            * @param classNameId the class name ID
754            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
755            * @return the last matching email address
756            * @throws NoSuchEmailAddressException if a matching email address could not be found
757            */
758            public static EmailAddress findByC_C_Last(long companyId, long classNameId,
759                    OrderByComparator<EmailAddress> orderByComparator)
760                    throws com.liferay.portal.NoSuchEmailAddressException {
761                    return getPersistence()
762                                       .findByC_C_Last(companyId, classNameId, orderByComparator);
763            }
764    
765            /**
766            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63;.
767            *
768            * @param companyId the company ID
769            * @param classNameId the class name ID
770            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
771            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
772            */
773            public static EmailAddress fetchByC_C_Last(long companyId,
774                    long classNameId, OrderByComparator<EmailAddress> orderByComparator) {
775                    return getPersistence()
776                                       .fetchByC_C_Last(companyId, classNameId, orderByComparator);
777            }
778    
779            /**
780            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63; and classNameId = &#63;.
781            *
782            * @param emailAddressId the primary key of the current email address
783            * @param companyId the company ID
784            * @param classNameId the class name ID
785            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
786            * @return the previous, current, and next email address
787            * @throws NoSuchEmailAddressException if a email address with the primary key could not be found
788            */
789            public static EmailAddress[] findByC_C_PrevAndNext(long emailAddressId,
790                    long companyId, long classNameId,
791                    OrderByComparator<EmailAddress> orderByComparator)
792                    throws com.liferay.portal.NoSuchEmailAddressException {
793                    return getPersistence()
794                                       .findByC_C_PrevAndNext(emailAddressId, companyId,
795                            classNameId, orderByComparator);
796            }
797    
798            /**
799            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; from the database.
800            *
801            * @param companyId the company ID
802            * @param classNameId the class name ID
803            */
804            public static void removeByC_C(long companyId, long classNameId) {
805                    getPersistence().removeByC_C(companyId, classNameId);
806            }
807    
808            /**
809            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63;.
810            *
811            * @param companyId the company ID
812            * @param classNameId the class name ID
813            * @return the number of matching email addresses
814            */
815            public static int countByC_C(long companyId, long classNameId) {
816                    return getPersistence().countByC_C(companyId, classNameId);
817            }
818    
819            /**
820            * Returns all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
821            *
822            * @param companyId the company ID
823            * @param classNameId the class name ID
824            * @param classPK the class p k
825            * @return the matching email addresses
826            */
827            public static List<EmailAddress> findByC_C_C(long companyId,
828                    long classNameId, long classPK) {
829                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
830            }
831    
832            /**
833            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
834            *
835            * <p>
836            * 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.
837            * </p>
838            *
839            * @param companyId the company ID
840            * @param classNameId the class name ID
841            * @param classPK the class p k
842            * @param start the lower bound of the range of email addresses
843            * @param end the upper bound of the range of email addresses (not inclusive)
844            * @return the range of matching email addresses
845            */
846            public static List<EmailAddress> findByC_C_C(long companyId,
847                    long classNameId, long classPK, int start, int end) {
848                    return getPersistence()
849                                       .findByC_C_C(companyId, classNameId, classPK, start, end);
850            }
851    
852            /**
853            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
854            *
855            * <p>
856            * 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.
857            * </p>
858            *
859            * @param companyId the company ID
860            * @param classNameId the class name ID
861            * @param classPK the class p k
862            * @param start the lower bound of the range of email addresses
863            * @param end the upper bound of the range of email addresses (not inclusive)
864            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
865            * @return the ordered range of matching email addresses
866            */
867            public static List<EmailAddress> findByC_C_C(long companyId,
868                    long classNameId, long classPK, int start, int end,
869                    OrderByComparator<EmailAddress> orderByComparator) {
870                    return getPersistence()
871                                       .findByC_C_C(companyId, classNameId, classPK, start, end,
872                            orderByComparator);
873            }
874    
875            /**
876            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
877            *
878            * @param companyId the company ID
879            * @param classNameId the class name ID
880            * @param classPK the class p k
881            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
882            * @return the first matching email address
883            * @throws NoSuchEmailAddressException if a matching email address could not be found
884            */
885            public static EmailAddress findByC_C_C_First(long companyId,
886                    long classNameId, long classPK,
887                    OrderByComparator<EmailAddress> orderByComparator)
888                    throws com.liferay.portal.NoSuchEmailAddressException {
889                    return getPersistence()
890                                       .findByC_C_C_First(companyId, classNameId, classPK,
891                            orderByComparator);
892            }
893    
894            /**
895            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
896            *
897            * @param companyId the company ID
898            * @param classNameId the class name ID
899            * @param classPK the class p k
900            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
901            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
902            */
903            public static EmailAddress fetchByC_C_C_First(long companyId,
904                    long classNameId, long classPK,
905                    OrderByComparator<EmailAddress> orderByComparator) {
906                    return getPersistence()
907                                       .fetchByC_C_C_First(companyId, classNameId, classPK,
908                            orderByComparator);
909            }
910    
911            /**
912            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
913            *
914            * @param companyId the company ID
915            * @param classNameId the class name ID
916            * @param classPK the class p k
917            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
918            * @return the last matching email address
919            * @throws NoSuchEmailAddressException if a matching email address could not be found
920            */
921            public static EmailAddress findByC_C_C_Last(long companyId,
922                    long classNameId, long classPK,
923                    OrderByComparator<EmailAddress> orderByComparator)
924                    throws com.liferay.portal.NoSuchEmailAddressException {
925                    return getPersistence()
926                                       .findByC_C_C_Last(companyId, classNameId, classPK,
927                            orderByComparator);
928            }
929    
930            /**
931            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
932            *
933            * @param companyId the company ID
934            * @param classNameId the class name ID
935            * @param classPK the class p k
936            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
937            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
938            */
939            public static EmailAddress fetchByC_C_C_Last(long companyId,
940                    long classNameId, long classPK,
941                    OrderByComparator<EmailAddress> orderByComparator) {
942                    return getPersistence()
943                                       .fetchByC_C_C_Last(companyId, classNameId, classPK,
944                            orderByComparator);
945            }
946    
947            /**
948            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
949            *
950            * @param emailAddressId the primary key of the current email address
951            * @param companyId the company ID
952            * @param classNameId the class name ID
953            * @param classPK the class p k
954            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
955            * @return the previous, current, and next email address
956            * @throws NoSuchEmailAddressException if a email address with the primary key could not be found
957            */
958            public static EmailAddress[] findByC_C_C_PrevAndNext(long emailAddressId,
959                    long companyId, long classNameId, long classPK,
960                    OrderByComparator<EmailAddress> orderByComparator)
961                    throws com.liferay.portal.NoSuchEmailAddressException {
962                    return getPersistence()
963                                       .findByC_C_C_PrevAndNext(emailAddressId, companyId,
964                            classNameId, classPK, orderByComparator);
965            }
966    
967            /**
968            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
969            *
970            * @param companyId the company ID
971            * @param classNameId the class name ID
972            * @param classPK the class p k
973            */
974            public static void removeByC_C_C(long companyId, long classNameId,
975                    long classPK) {
976                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
977            }
978    
979            /**
980            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
981            *
982            * @param companyId the company ID
983            * @param classNameId the class name ID
984            * @param classPK the class p k
985            * @return the number of matching email addresses
986            */
987            public static int countByC_C_C(long companyId, long classNameId,
988                    long classPK) {
989                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
990            }
991    
992            /**
993            * Returns all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
994            *
995            * @param companyId the company ID
996            * @param classNameId the class name ID
997            * @param classPK the class p k
998            * @param primary the primary
999            * @return the matching email addresses
1000            */
1001            public static List<EmailAddress> findByC_C_C_P(long companyId,
1002                    long classNameId, long classPK, boolean primary) {
1003                    return getPersistence()
1004                                       .findByC_C_C_P(companyId, classNameId, classPK, primary);
1005            }
1006    
1007            /**
1008            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1009            *
1010            * <p>
1011            * 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.
1012            * </p>
1013            *
1014            * @param companyId the company ID
1015            * @param classNameId the class name ID
1016            * @param classPK the class p k
1017            * @param primary the primary
1018            * @param start the lower bound of the range of email addresses
1019            * @param end the upper bound of the range of email addresses (not inclusive)
1020            * @return the range of matching email addresses
1021            */
1022            public static List<EmailAddress> findByC_C_C_P(long companyId,
1023                    long classNameId, long classPK, boolean primary, int start, int end) {
1024                    return getPersistence()
1025                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
1026                            start, end);
1027            }
1028    
1029            /**
1030            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1031            *
1032            * <p>
1033            * 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.
1034            * </p>
1035            *
1036            * @param companyId the company ID
1037            * @param classNameId the class name ID
1038            * @param classPK the class p k
1039            * @param primary the primary
1040            * @param start the lower bound of the range of email addresses
1041            * @param end the upper bound of the range of email addresses (not inclusive)
1042            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1043            * @return the ordered range of matching email addresses
1044            */
1045            public static List<EmailAddress> findByC_C_C_P(long companyId,
1046                    long classNameId, long classPK, boolean primary, int start, int end,
1047                    OrderByComparator<EmailAddress> orderByComparator) {
1048                    return getPersistence()
1049                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
1050                            start, end, orderByComparator);
1051            }
1052    
1053            /**
1054            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1055            *
1056            * @param companyId the company ID
1057            * @param classNameId the class name ID
1058            * @param classPK the class p k
1059            * @param primary the primary
1060            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1061            * @return the first matching email address
1062            * @throws NoSuchEmailAddressException if a matching email address could not be found
1063            */
1064            public static EmailAddress findByC_C_C_P_First(long companyId,
1065                    long classNameId, long classPK, boolean primary,
1066                    OrderByComparator<EmailAddress> orderByComparator)
1067                    throws com.liferay.portal.NoSuchEmailAddressException {
1068                    return getPersistence()
1069                                       .findByC_C_C_P_First(companyId, classNameId, classPK,
1070                            primary, orderByComparator);
1071            }
1072    
1073            /**
1074            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1075            *
1076            * @param companyId the company ID
1077            * @param classNameId the class name ID
1078            * @param classPK the class p k
1079            * @param primary the primary
1080            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1081            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
1082            */
1083            public static EmailAddress fetchByC_C_C_P_First(long companyId,
1084                    long classNameId, long classPK, boolean primary,
1085                    OrderByComparator<EmailAddress> orderByComparator) {
1086                    return getPersistence()
1087                                       .fetchByC_C_C_P_First(companyId, classNameId, classPK,
1088                            primary, orderByComparator);
1089            }
1090    
1091            /**
1092            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1093            *
1094            * @param companyId the company ID
1095            * @param classNameId the class name ID
1096            * @param classPK the class p k
1097            * @param primary the primary
1098            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1099            * @return the last matching email address
1100            * @throws NoSuchEmailAddressException if a matching email address could not be found
1101            */
1102            public static EmailAddress findByC_C_C_P_Last(long companyId,
1103                    long classNameId, long classPK, boolean primary,
1104                    OrderByComparator<EmailAddress> orderByComparator)
1105                    throws com.liferay.portal.NoSuchEmailAddressException {
1106                    return getPersistence()
1107                                       .findByC_C_C_P_Last(companyId, classNameId, classPK,
1108                            primary, orderByComparator);
1109            }
1110    
1111            /**
1112            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1113            *
1114            * @param companyId the company ID
1115            * @param classNameId the class name ID
1116            * @param classPK the class p k
1117            * @param primary the primary
1118            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1119            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
1120            */
1121            public static EmailAddress fetchByC_C_C_P_Last(long companyId,
1122                    long classNameId, long classPK, boolean primary,
1123                    OrderByComparator<EmailAddress> orderByComparator) {
1124                    return getPersistence()
1125                                       .fetchByC_C_C_P_Last(companyId, classNameId, classPK,
1126                            primary, orderByComparator);
1127            }
1128    
1129            /**
1130            * 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;.
1131            *
1132            * @param emailAddressId the primary key of the current email address
1133            * @param companyId the company ID
1134            * @param classNameId the class name ID
1135            * @param classPK the class p k
1136            * @param primary the primary
1137            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1138            * @return the previous, current, and next email address
1139            * @throws NoSuchEmailAddressException if a email address with the primary key could not be found
1140            */
1141            public static EmailAddress[] findByC_C_C_P_PrevAndNext(
1142                    long emailAddressId, long companyId, long classNameId, long classPK,
1143                    boolean primary, OrderByComparator<EmailAddress> orderByComparator)
1144                    throws com.liferay.portal.NoSuchEmailAddressException {
1145                    return getPersistence()
1146                                       .findByC_C_C_P_PrevAndNext(emailAddressId, companyId,
1147                            classNameId, classPK, primary, orderByComparator);
1148            }
1149    
1150            /**
1151            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63; from the database.
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            */
1158            public static void removeByC_C_C_P(long companyId, long classNameId,
1159                    long classPK, boolean primary) {
1160                    getPersistence()
1161                            .removeByC_C_C_P(companyId, classNameId, classPK, primary);
1162            }
1163    
1164            /**
1165            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1166            *
1167            * @param companyId the company ID
1168            * @param classNameId the class name ID
1169            * @param classPK the class p k
1170            * @param primary the primary
1171            * @return the number of matching email addresses
1172            */
1173            public static int countByC_C_C_P(long companyId, long classNameId,
1174                    long classPK, boolean primary) {
1175                    return getPersistence()
1176                                       .countByC_C_C_P(companyId, classNameId, classPK, primary);
1177            }
1178    
1179            /**
1180            * Caches the email address in the entity cache if it is enabled.
1181            *
1182            * @param emailAddress the email address
1183            */
1184            public static void cacheResult(EmailAddress emailAddress) {
1185                    getPersistence().cacheResult(emailAddress);
1186            }
1187    
1188            /**
1189            * Caches the email addresses in the entity cache if it is enabled.
1190            *
1191            * @param emailAddresses the email addresses
1192            */
1193            public static void cacheResult(List<EmailAddress> emailAddresses) {
1194                    getPersistence().cacheResult(emailAddresses);
1195            }
1196    
1197            /**
1198            * Creates a new email address with the primary key. Does not add the email address to the database.
1199            *
1200            * @param emailAddressId the primary key for the new email address
1201            * @return the new email address
1202            */
1203            public static EmailAddress create(long emailAddressId) {
1204                    return getPersistence().create(emailAddressId);
1205            }
1206    
1207            /**
1208            * Removes the email address with the primary key from the database. Also notifies the appropriate model listeners.
1209            *
1210            * @param emailAddressId the primary key of the email address
1211            * @return the email address that was removed
1212            * @throws NoSuchEmailAddressException if a email address with the primary key could not be found
1213            */
1214            public static EmailAddress remove(long emailAddressId)
1215                    throws com.liferay.portal.NoSuchEmailAddressException {
1216                    return getPersistence().remove(emailAddressId);
1217            }
1218    
1219            public static EmailAddress updateImpl(EmailAddress emailAddress) {
1220                    return getPersistence().updateImpl(emailAddress);
1221            }
1222    
1223            /**
1224            * Returns the email address with the primary key or throws a {@link NoSuchEmailAddressException} if it could not be found.
1225            *
1226            * @param emailAddressId the primary key of the email address
1227            * @return the email address
1228            * @throws NoSuchEmailAddressException if a email address with the primary key could not be found
1229            */
1230            public static EmailAddress findByPrimaryKey(long emailAddressId)
1231                    throws com.liferay.portal.NoSuchEmailAddressException {
1232                    return getPersistence().findByPrimaryKey(emailAddressId);
1233            }
1234    
1235            /**
1236            * Returns the email address with the primary key or returns <code>null</code> if it could not be found.
1237            *
1238            * @param emailAddressId the primary key of the email address
1239            * @return the email address, or <code>null</code> if a email address with the primary key could not be found
1240            */
1241            public static EmailAddress fetchByPrimaryKey(long emailAddressId) {
1242                    return getPersistence().fetchByPrimaryKey(emailAddressId);
1243            }
1244    
1245            public static java.util.Map<java.io.Serializable, EmailAddress> fetchByPrimaryKeys(
1246                    java.util.Set<java.io.Serializable> primaryKeys) {
1247                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
1248            }
1249    
1250            /**
1251            * Returns all the email addresses.
1252            *
1253            * @return the email addresses
1254            */
1255            public static List<EmailAddress> findAll() {
1256                    return getPersistence().findAll();
1257            }
1258    
1259            /**
1260            * Returns a range of all the email addresses.
1261            *
1262            * <p>
1263            * 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.
1264            * </p>
1265            *
1266            * @param start the lower bound of the range of email addresses
1267            * @param end the upper bound of the range of email addresses (not inclusive)
1268            * @return the range of email addresses
1269            */
1270            public static List<EmailAddress> findAll(int start, int end) {
1271                    return getPersistence().findAll(start, end);
1272            }
1273    
1274            /**
1275            * Returns an ordered range of all the email addresses.
1276            *
1277            * <p>
1278            * 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.
1279            * </p>
1280            *
1281            * @param start the lower bound of the range of email addresses
1282            * @param end the upper bound of the range of email addresses (not inclusive)
1283            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1284            * @return the ordered range of email addresses
1285            */
1286            public static List<EmailAddress> findAll(int start, int end,
1287                    OrderByComparator<EmailAddress> orderByComparator) {
1288                    return getPersistence().findAll(start, end, orderByComparator);
1289            }
1290    
1291            /**
1292            * Removes all the email addresses from the database.
1293            */
1294            public static void removeAll() {
1295                    getPersistence().removeAll();
1296            }
1297    
1298            /**
1299            * Returns the number of email addresses.
1300            *
1301            * @return the number of email addresses
1302            */
1303            public static int countAll() {
1304                    return getPersistence().countAll();
1305            }
1306    
1307            public static EmailAddressPersistence getPersistence() {
1308                    if (_persistence == null) {
1309                            _persistence = (EmailAddressPersistence)PortalBeanLocatorUtil.locate(EmailAddressPersistence.class.getName());
1310    
1311                            ReferenceRegistry.registerReference(EmailAddressUtil.class,
1312                                    "_persistence");
1313                    }
1314    
1315                    return _persistence;
1316            }
1317    
1318            /**
1319             * @deprecated As of 6.2.0
1320             */
1321            @Deprecated
1322            public void setPersistence(EmailAddressPersistence persistence) {
1323            }
1324    
1325            private static EmailAddressPersistence _persistence;
1326    }