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