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