001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.EmailAddress;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * 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.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see EmailAddressPersistence
036     * @see EmailAddressPersistenceImpl
037     * @generated
038     */
039    public class EmailAddressUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(EmailAddress emailAddress) {
057                    getPersistence().clearCache(emailAddress);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<EmailAddress> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<EmailAddress> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<EmailAddress> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
098             */
099            public static EmailAddress update(EmailAddress emailAddress)
100                    throws SystemException {
101                    return getPersistence().update(emailAddress);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static EmailAddress update(EmailAddress emailAddress,
108                    ServiceContext serviceContext) throws SystemException {
109                    return getPersistence().update(emailAddress, serviceContext);
110            }
111    
112            /**
113            * Returns all the email addresses where companyId = &#63;.
114            *
115            * @param companyId the company ID
116            * @return the matching email addresses
117            * @throws SystemException if a system exception occurred
118            */
119            public static java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
120                    long companyId)
121                    throws com.liferay.portal.kernel.exception.SystemException {
122                    return getPersistence().findByCompanyId(companyId);
123            }
124    
125            /**
126            * Returns a range of all the email addresses where companyId = &#63;.
127            *
128            * <p>
129            * 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.
130            * </p>
131            *
132            * @param companyId the company ID
133            * @param start the lower bound of the range of email addresses
134            * @param end the upper bound of the range of email addresses (not inclusive)
135            * @return the range of matching email addresses
136            * @throws SystemException if a system exception occurred
137            */
138            public static java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
139                    long companyId, int start, int end)
140                    throws com.liferay.portal.kernel.exception.SystemException {
141                    return getPersistence().findByCompanyId(companyId, start, end);
142            }
143    
144            /**
145            * Returns an ordered range of all the email addresses where companyId = &#63;.
146            *
147            * <p>
148            * 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.
149            * </p>
150            *
151            * @param companyId the company ID
152            * @param start the lower bound of the range of email addresses
153            * @param end the upper bound of the range of email addresses (not inclusive)
154            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
155            * @return the ordered range of matching email addresses
156            * @throws SystemException if a system exception occurred
157            */
158            public static java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
159                    long companyId, int start, int end,
160                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence()
163                                       .findByCompanyId(companyId, start, end, orderByComparator);
164            }
165    
166            /**
167            * Returns the first email address in the ordered set where companyId = &#63;.
168            *
169            * @param companyId the company ID
170            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
171            * @return the first matching email address
172            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portal.model.EmailAddress findByCompanyId_First(
176                    long companyId,
177                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178                    throws com.liferay.portal.NoSuchEmailAddressException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getPersistence()
181                                       .findByCompanyId_First(companyId, orderByComparator);
182            }
183    
184            /**
185            * Returns the first email address in the ordered set where companyId = &#63;.
186            *
187            * @param companyId the company ID
188            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
189            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
190            * @throws SystemException if a system exception occurred
191            */
192            public static com.liferay.portal.model.EmailAddress fetchByCompanyId_First(
193                    long companyId,
194                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195                    throws com.liferay.portal.kernel.exception.SystemException {
196                    return getPersistence()
197                                       .fetchByCompanyId_First(companyId, orderByComparator);
198            }
199    
200            /**
201            * Returns the last email address in the ordered set where companyId = &#63;.
202            *
203            * @param companyId the company ID
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 findByCompanyId_Last(
210                    long companyId,
211                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212                    throws com.liferay.portal.NoSuchEmailAddressException,
213                            com.liferay.portal.kernel.exception.SystemException {
214                    return getPersistence()
215                                       .findByCompanyId_Last(companyId, orderByComparator);
216            }
217    
218            /**
219            * Returns the last email address in the ordered set where companyId = &#63;.
220            *
221            * @param companyId the company ID
222            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
223            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
224            * @throws SystemException if a system exception occurred
225            */
226            public static com.liferay.portal.model.EmailAddress fetchByCompanyId_Last(
227                    long companyId,
228                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
229                    throws com.liferay.portal.kernel.exception.SystemException {
230                    return getPersistence()
231                                       .fetchByCompanyId_Last(companyId, orderByComparator);
232            }
233    
234            /**
235            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63;.
236            *
237            * @param emailAddressId the primary key of the current email address
238            * @param companyId the company ID
239            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
240            * @return the previous, current, and next email address
241            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
242            * @throws SystemException if a system exception occurred
243            */
244            public static com.liferay.portal.model.EmailAddress[] findByCompanyId_PrevAndNext(
245                    long emailAddressId, long companyId,
246                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
247                    throws com.liferay.portal.NoSuchEmailAddressException,
248                            com.liferay.portal.kernel.exception.SystemException {
249                    return getPersistence()
250                                       .findByCompanyId_PrevAndNext(emailAddressId, companyId,
251                            orderByComparator);
252            }
253    
254            /**
255            * Removes all the email addresses where companyId = &#63; from the database.
256            *
257            * @param companyId the company ID
258            * @throws SystemException if a system exception occurred
259            */
260            public static void removeByCompanyId(long companyId)
261                    throws com.liferay.portal.kernel.exception.SystemException {
262                    getPersistence().removeByCompanyId(companyId);
263            }
264    
265            /**
266            * Returns the number of email addresses where companyId = &#63;.
267            *
268            * @param companyId the company ID
269            * @return the number of matching email addresses
270            * @throws SystemException if a system exception occurred
271            */
272            public static int countByCompanyId(long companyId)
273                    throws com.liferay.portal.kernel.exception.SystemException {
274                    return getPersistence().countByCompanyId(companyId);
275            }
276    
277            /**
278            * Returns all the email addresses where userId = &#63;.
279            *
280            * @param userId the user ID
281            * @return the matching email addresses
282            * @throws SystemException if a system exception occurred
283            */
284            public static java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
285                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
286                    return getPersistence().findByUserId(userId);
287            }
288    
289            /**
290            * Returns a range of all the email addresses where userId = &#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 userId the user ID
297            * @param start the lower bound of the range of email addresses
298            * @param end the upper bound of the range of email addresses (not inclusive)
299            * @return the range of matching email addresses
300            * @throws SystemException if a system exception occurred
301            */
302            public static java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
303                    long userId, int start, int end)
304                    throws com.liferay.portal.kernel.exception.SystemException {
305                    return getPersistence().findByUserId(userId, start, end);
306            }
307    
308            /**
309            * Returns an ordered range of all the email addresses where userId = &#63;.
310            *
311            * <p>
312            * 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.
313            * </p>
314            *
315            * @param userId the user ID
316            * @param start the lower bound of the range of email addresses
317            * @param end the upper bound of the range of email addresses (not inclusive)
318            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
319            * @return the ordered range of matching email addresses
320            * @throws SystemException if a system exception occurred
321            */
322            public static java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
323                    long userId, int start, int end,
324                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
325                    throws com.liferay.portal.kernel.exception.SystemException {
326                    return getPersistence()
327                                       .findByUserId(userId, start, end, orderByComparator);
328            }
329    
330            /**
331            * Returns the first email address in the ordered set where userId = &#63;.
332            *
333            * @param userId the user ID
334            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
335            * @return the first matching email address
336            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
337            * @throws SystemException if a system exception occurred
338            */
339            public static com.liferay.portal.model.EmailAddress findByUserId_First(
340                    long userId,
341                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
342                    throws com.liferay.portal.NoSuchEmailAddressException,
343                            com.liferay.portal.kernel.exception.SystemException {
344                    return getPersistence().findByUserId_First(userId, orderByComparator);
345            }
346    
347            /**
348            * Returns the first email address in the ordered set where userId = &#63;.
349            *
350            * @param userId the user ID
351            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
352            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
353            * @throws SystemException if a system exception occurred
354            */
355            public static com.liferay.portal.model.EmailAddress fetchByUserId_First(
356                    long userId,
357                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
358                    throws com.liferay.portal.kernel.exception.SystemException {
359                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
360            }
361    
362            /**
363            * Returns the last email address in the ordered set where userId = &#63;.
364            *
365            * @param userId the user ID
366            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
367            * @return the last matching email address
368            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
369            * @throws SystemException if a system exception occurred
370            */
371            public static com.liferay.portal.model.EmailAddress findByUserId_Last(
372                    long userId,
373                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
374                    throws com.liferay.portal.NoSuchEmailAddressException,
375                            com.liferay.portal.kernel.exception.SystemException {
376                    return getPersistence().findByUserId_Last(userId, orderByComparator);
377            }
378    
379            /**
380            * Returns the last email address in the ordered set where userId = &#63;.
381            *
382            * @param userId the user ID
383            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
384            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
385            * @throws SystemException if a system exception occurred
386            */
387            public static com.liferay.portal.model.EmailAddress fetchByUserId_Last(
388                    long userId,
389                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
390                    throws com.liferay.portal.kernel.exception.SystemException {
391                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
392            }
393    
394            /**
395            * Returns the email addresses before and after the current email address in the ordered set where userId = &#63;.
396            *
397            * @param emailAddressId the primary key of the current email address
398            * @param userId the user ID
399            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
400            * @return the previous, current, and next email address
401            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
402            * @throws SystemException if a system exception occurred
403            */
404            public static com.liferay.portal.model.EmailAddress[] findByUserId_PrevAndNext(
405                    long emailAddressId, long userId,
406                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
407                    throws com.liferay.portal.NoSuchEmailAddressException,
408                            com.liferay.portal.kernel.exception.SystemException {
409                    return getPersistence()
410                                       .findByUserId_PrevAndNext(emailAddressId, userId,
411                            orderByComparator);
412            }
413    
414            /**
415            * Removes all the email addresses where userId = &#63; from the database.
416            *
417            * @param userId the user ID
418            * @throws SystemException if a system exception occurred
419            */
420            public static void removeByUserId(long userId)
421                    throws com.liferay.portal.kernel.exception.SystemException {
422                    getPersistence().removeByUserId(userId);
423            }
424    
425            /**
426            * Returns the number of email addresses where userId = &#63;.
427            *
428            * @param userId the user ID
429            * @return the number of matching email addresses
430            * @throws SystemException if a system exception occurred
431            */
432            public static int countByUserId(long userId)
433                    throws com.liferay.portal.kernel.exception.SystemException {
434                    return getPersistence().countByUserId(userId);
435            }
436    
437            /**
438            * Returns all the email addresses where companyId = &#63; and classNameId = &#63;.
439            *
440            * @param companyId the company ID
441            * @param classNameId the class name ID
442            * @return the matching email addresses
443            * @throws SystemException if a system exception occurred
444            */
445            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
446                    long companyId, long classNameId)
447                    throws com.liferay.portal.kernel.exception.SystemException {
448                    return getPersistence().findByC_C(companyId, classNameId);
449            }
450    
451            /**
452            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63;.
453            *
454            * <p>
455            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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.
456            * </p>
457            *
458            * @param companyId the company ID
459            * @param classNameId the class name ID
460            * @param start the lower bound of the range of email addresses
461            * @param end the upper bound of the range of email addresses (not inclusive)
462            * @return the range of matching email addresses
463            * @throws SystemException if a system exception occurred
464            */
465            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
466                    long companyId, long classNameId, int start, int end)
467                    throws com.liferay.portal.kernel.exception.SystemException {
468                    return getPersistence().findByC_C(companyId, classNameId, start, end);
469            }
470    
471            /**
472            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63;.
473            *
474            * <p>
475            * 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.
476            * </p>
477            *
478            * @param companyId the company ID
479            * @param classNameId the class name ID
480            * @param start the lower bound of the range of email addresses
481            * @param end the upper bound of the range of email addresses (not inclusive)
482            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
483            * @return the ordered range of matching email addresses
484            * @throws SystemException if a system exception occurred
485            */
486            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
487                    long companyId, long classNameId, int start, int end,
488                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
489                    throws com.liferay.portal.kernel.exception.SystemException {
490                    return getPersistence()
491                                       .findByC_C(companyId, classNameId, start, end,
492                            orderByComparator);
493            }
494    
495            /**
496            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63;.
497            *
498            * @param companyId the company ID
499            * @param classNameId the class name ID
500            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
501            * @return the first matching email address
502            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
503            * @throws SystemException if a system exception occurred
504            */
505            public static com.liferay.portal.model.EmailAddress findByC_C_First(
506                    long companyId, long classNameId,
507                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
508                    throws com.liferay.portal.NoSuchEmailAddressException,
509                            com.liferay.portal.kernel.exception.SystemException {
510                    return getPersistence()
511                                       .findByC_C_First(companyId, classNameId, orderByComparator);
512            }
513    
514            /**
515            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63;.
516            *
517            * @param companyId the company ID
518            * @param classNameId the class name ID
519            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
520            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
521            * @throws SystemException if a system exception occurred
522            */
523            public static com.liferay.portal.model.EmailAddress fetchByC_C_First(
524                    long companyId, long classNameId,
525                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
526                    throws com.liferay.portal.kernel.exception.SystemException {
527                    return getPersistence()
528                                       .fetchByC_C_First(companyId, classNameId, orderByComparator);
529            }
530    
531            /**
532            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63;.
533            *
534            * @param companyId the company ID
535            * @param classNameId the class name ID
536            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
537            * @return the last matching email address
538            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
539            * @throws SystemException if a system exception occurred
540            */
541            public static com.liferay.portal.model.EmailAddress findByC_C_Last(
542                    long companyId, long classNameId,
543                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
544                    throws com.liferay.portal.NoSuchEmailAddressException,
545                            com.liferay.portal.kernel.exception.SystemException {
546                    return getPersistence()
547                                       .findByC_C_Last(companyId, classNameId, orderByComparator);
548            }
549    
550            /**
551            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63;.
552            *
553            * @param companyId the company ID
554            * @param classNameId the class name ID
555            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
556            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
557            * @throws SystemException if a system exception occurred
558            */
559            public static com.liferay.portal.model.EmailAddress fetchByC_C_Last(
560                    long companyId, long classNameId,
561                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
562                    throws com.liferay.portal.kernel.exception.SystemException {
563                    return getPersistence()
564                                       .fetchByC_C_Last(companyId, classNameId, orderByComparator);
565            }
566    
567            /**
568            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63; and classNameId = &#63;.
569            *
570            * @param emailAddressId the primary key of the current email address
571            * @param companyId the company ID
572            * @param classNameId the class name ID
573            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
574            * @return the previous, current, and next email address
575            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
576            * @throws SystemException if a system exception occurred
577            */
578            public static com.liferay.portal.model.EmailAddress[] findByC_C_PrevAndNext(
579                    long emailAddressId, long companyId, long classNameId,
580                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
581                    throws com.liferay.portal.NoSuchEmailAddressException,
582                            com.liferay.portal.kernel.exception.SystemException {
583                    return getPersistence()
584                                       .findByC_C_PrevAndNext(emailAddressId, companyId,
585                            classNameId, orderByComparator);
586            }
587    
588            /**
589            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; from the database.
590            *
591            * @param companyId the company ID
592            * @param classNameId the class name ID
593            * @throws SystemException if a system exception occurred
594            */
595            public static void removeByC_C(long companyId, long classNameId)
596                    throws com.liferay.portal.kernel.exception.SystemException {
597                    getPersistence().removeByC_C(companyId, classNameId);
598            }
599    
600            /**
601            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63;.
602            *
603            * @param companyId the company ID
604            * @param classNameId the class name ID
605            * @return the number of matching email addresses
606            * @throws SystemException if a system exception occurred
607            */
608            public static int countByC_C(long companyId, long classNameId)
609                    throws com.liferay.portal.kernel.exception.SystemException {
610                    return getPersistence().countByC_C(companyId, classNameId);
611            }
612    
613            /**
614            * Returns all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
615            *
616            * @param companyId the company ID
617            * @param classNameId the class name ID
618            * @param classPK the class p k
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> findByC_C_C(
623                    long companyId, long classNameId, long classPK)
624                    throws com.liferay.portal.kernel.exception.SystemException {
625                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
626            }
627    
628            /**
629            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
630            *
631            * <p>
632            * 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.
633            * </p>
634            *
635            * @param companyId the company ID
636            * @param classNameId the class name ID
637            * @param classPK the class p k
638            * @param start the lower bound of the range of email addresses
639            * @param end the upper bound of the range of email addresses (not inclusive)
640            * @return the range of matching email addresses
641            * @throws SystemException if a system exception occurred
642            */
643            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
644                    long companyId, long classNameId, long classPK, int start, int end)
645                    throws com.liferay.portal.kernel.exception.SystemException {
646                    return getPersistence()
647                                       .findByC_C_C(companyId, classNameId, classPK, start, end);
648            }
649    
650            /**
651            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
652            *
653            * <p>
654            * 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.
655            * </p>
656            *
657            * @param companyId the company ID
658            * @param classNameId the class name ID
659            * @param classPK the class p k
660            * @param start the lower bound of the range of email addresses
661            * @param end the upper bound of the range of email addresses (not inclusive)
662            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
663            * @return the ordered range of matching email addresses
664            * @throws SystemException if a system exception occurred
665            */
666            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
667                    long companyId, long classNameId, long classPK, int start, int end,
668                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
669                    throws com.liferay.portal.kernel.exception.SystemException {
670                    return getPersistence()
671                                       .findByC_C_C(companyId, classNameId, classPK, start, end,
672                            orderByComparator);
673            }
674    
675            /**
676            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
677            *
678            * @param companyId the company ID
679            * @param classNameId the class name ID
680            * @param classPK the class p k
681            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
682            * @return the first matching email address
683            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
684            * @throws SystemException if a system exception occurred
685            */
686            public static com.liferay.portal.model.EmailAddress findByC_C_C_First(
687                    long companyId, long classNameId, long classPK,
688                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
689                    throws com.liferay.portal.NoSuchEmailAddressException,
690                            com.liferay.portal.kernel.exception.SystemException {
691                    return getPersistence()
692                                       .findByC_C_C_First(companyId, classNameId, classPK,
693                            orderByComparator);
694            }
695    
696            /**
697            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
698            *
699            * @param companyId the company ID
700            * @param classNameId the class name ID
701            * @param classPK the class p k
702            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
703            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
704            * @throws SystemException if a system exception occurred
705            */
706            public static com.liferay.portal.model.EmailAddress fetchByC_C_C_First(
707                    long companyId, long classNameId, long classPK,
708                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
709                    throws com.liferay.portal.kernel.exception.SystemException {
710                    return getPersistence()
711                                       .fetchByC_C_C_First(companyId, classNameId, classPK,
712                            orderByComparator);
713            }
714    
715            /**
716            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
717            *
718            * @param companyId the company ID
719            * @param classNameId the class name ID
720            * @param classPK the class p k
721            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
722            * @return the last matching email address
723            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
724            * @throws SystemException if a system exception occurred
725            */
726            public static com.liferay.portal.model.EmailAddress findByC_C_C_Last(
727                    long companyId, long classNameId, long classPK,
728                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
729                    throws com.liferay.portal.NoSuchEmailAddressException,
730                            com.liferay.portal.kernel.exception.SystemException {
731                    return getPersistence()
732                                       .findByC_C_C_Last(companyId, classNameId, classPK,
733                            orderByComparator);
734            }
735    
736            /**
737            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
738            *
739            * @param companyId the company ID
740            * @param classNameId the class name ID
741            * @param classPK the class p k
742            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
743            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
744            * @throws SystemException if a system exception occurred
745            */
746            public static com.liferay.portal.model.EmailAddress fetchByC_C_C_Last(
747                    long companyId, long classNameId, long classPK,
748                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
749                    throws com.liferay.portal.kernel.exception.SystemException {
750                    return getPersistence()
751                                       .fetchByC_C_C_Last(companyId, classNameId, classPK,
752                            orderByComparator);
753            }
754    
755            /**
756            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
757            *
758            * @param emailAddressId the primary key of the current email address
759            * @param companyId the company ID
760            * @param classNameId the class name ID
761            * @param classPK the class p k
762            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
763            * @return the previous, current, and next email address
764            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
765            * @throws SystemException if a system exception occurred
766            */
767            public static com.liferay.portal.model.EmailAddress[] findByC_C_C_PrevAndNext(
768                    long emailAddressId, long companyId, long classNameId, long classPK,
769                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
770                    throws com.liferay.portal.NoSuchEmailAddressException,
771                            com.liferay.portal.kernel.exception.SystemException {
772                    return getPersistence()
773                                       .findByC_C_C_PrevAndNext(emailAddressId, companyId,
774                            classNameId, classPK, orderByComparator);
775            }
776    
777            /**
778            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
779            *
780            * @param companyId the company ID
781            * @param classNameId the class name ID
782            * @param classPK the class p k
783            * @throws SystemException if a system exception occurred
784            */
785            public static void removeByC_C_C(long companyId, long classNameId,
786                    long classPK)
787                    throws com.liferay.portal.kernel.exception.SystemException {
788                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
789            }
790    
791            /**
792            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
793            *
794            * @param companyId the company ID
795            * @param classNameId the class name ID
796            * @param classPK the class p k
797            * @return the number of matching email addresses
798            * @throws SystemException if a system exception occurred
799            */
800            public static int countByC_C_C(long companyId, long classNameId,
801                    long classPK)
802                    throws com.liferay.portal.kernel.exception.SystemException {
803                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
804            }
805    
806            /**
807            * Returns all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
808            *
809            * @param companyId the company ID
810            * @param classNameId the class name ID
811            * @param classPK the class p k
812            * @param primary the primary
813            * @return the matching email addresses
814            * @throws SystemException if a system exception occurred
815            */
816            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
817                    long companyId, long classNameId, long classPK, boolean primary)
818                    throws com.liferay.portal.kernel.exception.SystemException {
819                    return getPersistence()
820                                       .findByC_C_C_P(companyId, classNameId, classPK, primary);
821            }
822    
823            /**
824            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
825            *
826            * <p>
827            * 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.
828            * </p>
829            *
830            * @param companyId the company ID
831            * @param classNameId the class name ID
832            * @param classPK the class p k
833            * @param primary the primary
834            * @param start the lower bound of the range of email addresses
835            * @param end the upper bound of the range of email addresses (not inclusive)
836            * @return the range of matching email addresses
837            * @throws SystemException if a system exception occurred
838            */
839            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
840                    long companyId, long classNameId, long classPK, boolean primary,
841                    int start, int end)
842                    throws com.liferay.portal.kernel.exception.SystemException {
843                    return getPersistence()
844                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
845                            start, end);
846            }
847    
848            /**
849            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
850            *
851            * <p>
852            * 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.
853            * </p>
854            *
855            * @param companyId the company ID
856            * @param classNameId the class name ID
857            * @param classPK the class p k
858            * @param primary the primary
859            * @param start the lower bound of the range of email addresses
860            * @param end the upper bound of the range of email addresses (not inclusive)
861            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
862            * @return the ordered range of matching email addresses
863            * @throws SystemException if a system exception occurred
864            */
865            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
866                    long companyId, long classNameId, long classPK, boolean primary,
867                    int start, int end,
868                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
869                    throws com.liferay.portal.kernel.exception.SystemException {
870                    return getPersistence()
871                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
872                            start, end, orderByComparator);
873            }
874    
875            /**
876            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
877            *
878            * @param companyId the company ID
879            * @param classNameId the class name ID
880            * @param classPK the class p k
881            * @param primary the primary
882            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
883            * @return the first matching email address
884            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
885            * @throws SystemException if a system exception occurred
886            */
887            public static com.liferay.portal.model.EmailAddress findByC_C_C_P_First(
888                    long companyId, long classNameId, long classPK, boolean primary,
889                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
890                    throws com.liferay.portal.NoSuchEmailAddressException,
891                            com.liferay.portal.kernel.exception.SystemException {
892                    return getPersistence()
893                                       .findByC_C_C_P_First(companyId, classNameId, classPK,
894                            primary, orderByComparator);
895            }
896    
897            /**
898            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
899            *
900            * @param companyId the company ID
901            * @param classNameId the class name ID
902            * @param classPK the class p k
903            * @param primary the primary
904            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
905            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
906            * @throws SystemException if a system exception occurred
907            */
908            public static com.liferay.portal.model.EmailAddress fetchByC_C_C_P_First(
909                    long companyId, long classNameId, long classPK, boolean primary,
910                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
911                    throws com.liferay.portal.kernel.exception.SystemException {
912                    return getPersistence()
913                                       .fetchByC_C_C_P_First(companyId, classNameId, classPK,
914                            primary, orderByComparator);
915            }
916    
917            /**
918            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
919            *
920            * @param companyId the company ID
921            * @param classNameId the class name ID
922            * @param classPK the class p k
923            * @param primary the primary
924            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
925            * @return the last matching email address
926            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
927            * @throws SystemException if a system exception occurred
928            */
929            public static com.liferay.portal.model.EmailAddress findByC_C_C_P_Last(
930                    long companyId, long classNameId, long classPK, boolean primary,
931                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
932                    throws com.liferay.portal.NoSuchEmailAddressException,
933                            com.liferay.portal.kernel.exception.SystemException {
934                    return getPersistence()
935                                       .findByC_C_C_P_Last(companyId, classNameId, classPK,
936                            primary, orderByComparator);
937            }
938    
939            /**
940            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
941            *
942            * @param companyId the company ID
943            * @param classNameId the class name ID
944            * @param classPK the class p k
945            * @param primary the primary
946            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
947            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
948            * @throws SystemException if a system exception occurred
949            */
950            public static com.liferay.portal.model.EmailAddress fetchByC_C_C_P_Last(
951                    long companyId, long classNameId, long classPK, boolean primary,
952                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
953                    throws com.liferay.portal.kernel.exception.SystemException {
954                    return getPersistence()
955                                       .fetchByC_C_C_P_Last(companyId, classNameId, classPK,
956                            primary, orderByComparator);
957            }
958    
959            /**
960            * 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;.
961            *
962            * @param emailAddressId the primary key of the current email address
963            * @param companyId the company ID
964            * @param classNameId the class name ID
965            * @param classPK the class p k
966            * @param primary the primary
967            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
968            * @return the previous, current, and next email address
969            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
970            * @throws SystemException if a system exception occurred
971            */
972            public static com.liferay.portal.model.EmailAddress[] findByC_C_C_P_PrevAndNext(
973                    long emailAddressId, long companyId, long classNameId, long classPK,
974                    boolean primary,
975                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
976                    throws com.liferay.portal.NoSuchEmailAddressException,
977                            com.liferay.portal.kernel.exception.SystemException {
978                    return getPersistence()
979                                       .findByC_C_C_P_PrevAndNext(emailAddressId, companyId,
980                            classNameId, classPK, primary, orderByComparator);
981            }
982    
983            /**
984            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63; from the database.
985            *
986            * @param companyId the company ID
987            * @param classNameId the class name ID
988            * @param classPK the class p k
989            * @param primary the primary
990            * @throws SystemException if a system exception occurred
991            */
992            public static void removeByC_C_C_P(long companyId, long classNameId,
993                    long classPK, boolean primary)
994                    throws com.liferay.portal.kernel.exception.SystemException {
995                    getPersistence()
996                            .removeByC_C_C_P(companyId, classNameId, classPK, primary);
997            }
998    
999            /**
1000            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1001            *
1002            * @param companyId the company ID
1003            * @param classNameId the class name ID
1004            * @param classPK the class p k
1005            * @param primary the primary
1006            * @return the number of matching email addresses
1007            * @throws SystemException if a system exception occurred
1008            */
1009            public static int countByC_C_C_P(long companyId, long classNameId,
1010                    long classPK, boolean primary)
1011                    throws com.liferay.portal.kernel.exception.SystemException {
1012                    return getPersistence()
1013                                       .countByC_C_C_P(companyId, classNameId, classPK, primary);
1014            }
1015    
1016            /**
1017            * Caches the email address in the entity cache if it is enabled.
1018            *
1019            * @param emailAddress the email address
1020            */
1021            public static void cacheResult(
1022                    com.liferay.portal.model.EmailAddress emailAddress) {
1023                    getPersistence().cacheResult(emailAddress);
1024            }
1025    
1026            /**
1027            * Caches the email addresses in the entity cache if it is enabled.
1028            *
1029            * @param emailAddresses the email addresses
1030            */
1031            public static void cacheResult(
1032                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses) {
1033                    getPersistence().cacheResult(emailAddresses);
1034            }
1035    
1036            /**
1037            * Creates a new email address with the primary key. Does not add the email address to the database.
1038            *
1039            * @param emailAddressId the primary key for the new email address
1040            * @return the new email address
1041            */
1042            public static com.liferay.portal.model.EmailAddress create(
1043                    long emailAddressId) {
1044                    return getPersistence().create(emailAddressId);
1045            }
1046    
1047            /**
1048            * Removes the email address with the primary key from the database. Also notifies the appropriate model listeners.
1049            *
1050            * @param emailAddressId the primary key of the email address
1051            * @return the email address that was removed
1052            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
1053            * @throws SystemException if a system exception occurred
1054            */
1055            public static com.liferay.portal.model.EmailAddress remove(
1056                    long emailAddressId)
1057                    throws com.liferay.portal.NoSuchEmailAddressException,
1058                            com.liferay.portal.kernel.exception.SystemException {
1059                    return getPersistence().remove(emailAddressId);
1060            }
1061    
1062            public static com.liferay.portal.model.EmailAddress updateImpl(
1063                    com.liferay.portal.model.EmailAddress emailAddress)
1064                    throws com.liferay.portal.kernel.exception.SystemException {
1065                    return getPersistence().updateImpl(emailAddress);
1066            }
1067    
1068            /**
1069            * Returns the email address with the primary key or throws a {@link com.liferay.portal.NoSuchEmailAddressException} if it could not be found.
1070            *
1071            * @param emailAddressId the primary key of the email address
1072            * @return the email address
1073            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
1074            * @throws SystemException if a system exception occurred
1075            */
1076            public static com.liferay.portal.model.EmailAddress findByPrimaryKey(
1077                    long emailAddressId)
1078                    throws com.liferay.portal.NoSuchEmailAddressException,
1079                            com.liferay.portal.kernel.exception.SystemException {
1080                    return getPersistence().findByPrimaryKey(emailAddressId);
1081            }
1082    
1083            /**
1084            * Returns the email address with the primary key or returns <code>null</code> if it could not be found.
1085            *
1086            * @param emailAddressId the primary key of the email address
1087            * @return the email address, or <code>null</code> if a email address with the primary key could not be found
1088            * @throws SystemException if a system exception occurred
1089            */
1090            public static com.liferay.portal.model.EmailAddress fetchByPrimaryKey(
1091                    long emailAddressId)
1092                    throws com.liferay.portal.kernel.exception.SystemException {
1093                    return getPersistence().fetchByPrimaryKey(emailAddressId);
1094            }
1095    
1096            /**
1097            * Returns all the email addresses.
1098            *
1099            * @return the email addresses
1100            * @throws SystemException if a system exception occurred
1101            */
1102            public static java.util.List<com.liferay.portal.model.EmailAddress> findAll()
1103                    throws com.liferay.portal.kernel.exception.SystemException {
1104                    return getPersistence().findAll();
1105            }
1106    
1107            /**
1108            * Returns a range of all the email addresses.
1109            *
1110            * <p>
1111            * 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.
1112            * </p>
1113            *
1114            * @param start the lower bound of the range of email addresses
1115            * @param end the upper bound of the range of email addresses (not inclusive)
1116            * @return the range of email addresses
1117            * @throws SystemException if a system exception occurred
1118            */
1119            public static java.util.List<com.liferay.portal.model.EmailAddress> findAll(
1120                    int start, int end)
1121                    throws com.liferay.portal.kernel.exception.SystemException {
1122                    return getPersistence().findAll(start, end);
1123            }
1124    
1125            /**
1126            * Returns an ordered range of all the email addresses.
1127            *
1128            * <p>
1129            * 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.
1130            * </p>
1131            *
1132            * @param start the lower bound of the range of email addresses
1133            * @param end the upper bound of the range of email addresses (not inclusive)
1134            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1135            * @return the ordered range of email addresses
1136            * @throws SystemException if a system exception occurred
1137            */
1138            public static java.util.List<com.liferay.portal.model.EmailAddress> findAll(
1139                    int start, int end,
1140                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1141                    throws com.liferay.portal.kernel.exception.SystemException {
1142                    return getPersistence().findAll(start, end, orderByComparator);
1143            }
1144    
1145            /**
1146            * Removes all the email addresses from the database.
1147            *
1148            * @throws SystemException if a system exception occurred
1149            */
1150            public static void removeAll()
1151                    throws com.liferay.portal.kernel.exception.SystemException {
1152                    getPersistence().removeAll();
1153            }
1154    
1155            /**
1156            * Returns the number of email addresses.
1157            *
1158            * @return the number of email addresses
1159            * @throws SystemException if a system exception occurred
1160            */
1161            public static int countAll()
1162                    throws com.liferay.portal.kernel.exception.SystemException {
1163                    return getPersistence().countAll();
1164            }
1165    
1166            public static EmailAddressPersistence getPersistence() {
1167                    if (_persistence == null) {
1168                            _persistence = (EmailAddressPersistence)PortalBeanLocatorUtil.locate(EmailAddressPersistence.class.getName());
1169    
1170                            ReferenceRegistry.registerReference(EmailAddressUtil.class,
1171                                    "_persistence");
1172                    }
1173    
1174                    return _persistence;
1175            }
1176    
1177            /**
1178             * @deprecated As of 6.2.0
1179             */
1180            public void setPersistence(EmailAddressPersistence persistence) {
1181            }
1182    
1183            private static EmailAddressPersistence _persistence;
1184    }