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