001    /**
002     * Copyright (c) 2000-2012 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            * <p>
250            * 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.
251            * </p>
252            *
253            * @param companyId the company ID
254            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
255            * @return the first matching email address
256            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
257            * @throws SystemException if a system exception occurred
258            */
259            public static com.liferay.portal.model.EmailAddress findByCompanyId_First(
260                    long companyId,
261                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
262                    throws com.liferay.portal.NoSuchEmailAddressException,
263                            com.liferay.portal.kernel.exception.SystemException {
264                    return getPersistence()
265                                       .findByCompanyId_First(companyId, orderByComparator);
266            }
267    
268            /**
269            * Returns the last email address in the ordered set where companyId = &#63;.
270            *
271            * <p>
272            * 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.
273            * </p>
274            *
275            * @param companyId the company ID
276            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
277            * @return the last matching email address
278            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
279            * @throws SystemException if a system exception occurred
280            */
281            public static com.liferay.portal.model.EmailAddress findByCompanyId_Last(
282                    long companyId,
283                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
284                    throws com.liferay.portal.NoSuchEmailAddressException,
285                            com.liferay.portal.kernel.exception.SystemException {
286                    return getPersistence()
287                                       .findByCompanyId_Last(companyId, orderByComparator);
288            }
289    
290            /**
291            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63;.
292            *
293            * <p>
294            * 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.
295            * </p>
296            *
297            * @param emailAddressId the primary key of the current email address
298            * @param companyId the company ID
299            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
300            * @return the previous, current, and next email address
301            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public static com.liferay.portal.model.EmailAddress[] findByCompanyId_PrevAndNext(
305                    long emailAddressId, long companyId,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.NoSuchEmailAddressException,
308                            com.liferay.portal.kernel.exception.SystemException {
309                    return getPersistence()
310                                       .findByCompanyId_PrevAndNext(emailAddressId, companyId,
311                            orderByComparator);
312            }
313    
314            /**
315            * Returns all the email addresses where userId = &#63;.
316            *
317            * @param userId the user ID
318            * @return the matching email addresses
319            * @throws SystemException if a system exception occurred
320            */
321            public static java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
322                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
323                    return getPersistence().findByUserId(userId);
324            }
325    
326            /**
327            * Returns a range of all the email addresses where userId = &#63;.
328            *
329            * <p>
330            * 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.
331            * </p>
332            *
333            * @param userId the user ID
334            * @param start the lower bound of the range of email addresses
335            * @param end the upper bound of the range of email addresses (not inclusive)
336            * @return the range of matching email addresses
337            * @throws SystemException if a system exception occurred
338            */
339            public static java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
340                    long userId, int start, int end)
341                    throws com.liferay.portal.kernel.exception.SystemException {
342                    return getPersistence().findByUserId(userId, start, end);
343            }
344    
345            /**
346            * Returns an ordered range of all the email addresses where userId = &#63;.
347            *
348            * <p>
349            * 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.
350            * </p>
351            *
352            * @param userId the user ID
353            * @param start the lower bound of the range of email addresses
354            * @param end the upper bound of the range of email addresses (not inclusive)
355            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
356            * @return the ordered 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                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
362                    throws com.liferay.portal.kernel.exception.SystemException {
363                    return getPersistence()
364                                       .findByUserId(userId, start, end, orderByComparator);
365            }
366    
367            /**
368            * Returns the first email address in the ordered set where userId = &#63;.
369            *
370            * <p>
371            * 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.
372            * </p>
373            *
374            * @param userId the user ID
375            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
376            * @return the first matching email address
377            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
378            * @throws SystemException if a system exception occurred
379            */
380            public static com.liferay.portal.model.EmailAddress findByUserId_First(
381                    long userId,
382                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
383                    throws com.liferay.portal.NoSuchEmailAddressException,
384                            com.liferay.portal.kernel.exception.SystemException {
385                    return getPersistence().findByUserId_First(userId, orderByComparator);
386            }
387    
388            /**
389            * Returns the last email address in the ordered set where userId = &#63;.
390            *
391            * <p>
392            * 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.
393            * </p>
394            *
395            * @param userId the user ID
396            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
397            * @return the last matching email address
398            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
399            * @throws SystemException if a system exception occurred
400            */
401            public static com.liferay.portal.model.EmailAddress findByUserId_Last(
402                    long userId,
403                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
404                    throws com.liferay.portal.NoSuchEmailAddressException,
405                            com.liferay.portal.kernel.exception.SystemException {
406                    return getPersistence().findByUserId_Last(userId, orderByComparator);
407            }
408    
409            /**
410            * Returns the email addresses before and after the current email address in the ordered set where userId = &#63;.
411            *
412            * <p>
413            * 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.
414            * </p>
415            *
416            * @param emailAddressId the primary key of the current email address
417            * @param userId the user ID
418            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
419            * @return the previous, current, and next email address
420            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
421            * @throws SystemException if a system exception occurred
422            */
423            public static com.liferay.portal.model.EmailAddress[] findByUserId_PrevAndNext(
424                    long emailAddressId, long userId,
425                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
426                    throws com.liferay.portal.NoSuchEmailAddressException,
427                            com.liferay.portal.kernel.exception.SystemException {
428                    return getPersistence()
429                                       .findByUserId_PrevAndNext(emailAddressId, userId,
430                            orderByComparator);
431            }
432    
433            /**
434            * Returns all the email addresses where companyId = &#63; and classNameId = &#63;.
435            *
436            * @param companyId the company ID
437            * @param classNameId the class name ID
438            * @return the matching email addresses
439            * @throws SystemException if a system exception occurred
440            */
441            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
442                    long companyId, long classNameId)
443                    throws com.liferay.portal.kernel.exception.SystemException {
444                    return getPersistence().findByC_C(companyId, classNameId);
445            }
446    
447            /**
448            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63;.
449            *
450            * <p>
451            * 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.
452            * </p>
453            *
454            * @param companyId the company ID
455            * @param classNameId the class name ID
456            * @param start the lower bound of the range of email addresses
457            * @param end the upper bound of the range of email addresses (not inclusive)
458            * @return the range of matching email addresses
459            * @throws SystemException if a system exception occurred
460            */
461            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
462                    long companyId, long classNameId, int start, int end)
463                    throws com.liferay.portal.kernel.exception.SystemException {
464                    return getPersistence().findByC_C(companyId, classNameId, start, end);
465            }
466    
467            /**
468            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63;.
469            *
470            * <p>
471            * 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.
472            * </p>
473            *
474            * @param companyId the company ID
475            * @param classNameId the class name ID
476            * @param start the lower bound of the range of email addresses
477            * @param end the upper bound of the range of email addresses (not inclusive)
478            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
479            * @return the ordered range of matching email addresses
480            * @throws SystemException if a system exception occurred
481            */
482            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
483                    long companyId, long classNameId, int start, int end,
484                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
485                    throws com.liferay.portal.kernel.exception.SystemException {
486                    return getPersistence()
487                                       .findByC_C(companyId, classNameId, start, end,
488                            orderByComparator);
489            }
490    
491            /**
492            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63;.
493            *
494            * <p>
495            * 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.
496            * </p>
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 last email address in the ordered set where companyId = &#63; and classNameId = &#63;.
516            *
517            * <p>
518            * 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.
519            * </p>
520            *
521            * @param companyId the company ID
522            * @param classNameId the class name ID
523            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
524            * @return the last matching email address
525            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
526            * @throws SystemException if a system exception occurred
527            */
528            public static com.liferay.portal.model.EmailAddress findByC_C_Last(
529                    long companyId, long classNameId,
530                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
531                    throws com.liferay.portal.NoSuchEmailAddressException,
532                            com.liferay.portal.kernel.exception.SystemException {
533                    return getPersistence()
534                                       .findByC_C_Last(companyId, classNameId, orderByComparator);
535            }
536    
537            /**
538            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63; and classNameId = &#63;.
539            *
540            * <p>
541            * 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.
542            * </p>
543            *
544            * @param emailAddressId the primary key of the current email address
545            * @param companyId the company ID
546            * @param classNameId the class name ID
547            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
548            * @return the previous, current, and next email address
549            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
550            * @throws SystemException if a system exception occurred
551            */
552            public static com.liferay.portal.model.EmailAddress[] findByC_C_PrevAndNext(
553                    long emailAddressId, long companyId, long classNameId,
554                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
555                    throws com.liferay.portal.NoSuchEmailAddressException,
556                            com.liferay.portal.kernel.exception.SystemException {
557                    return getPersistence()
558                                       .findByC_C_PrevAndNext(emailAddressId, companyId,
559                            classNameId, orderByComparator);
560            }
561    
562            /**
563            * Returns all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
564            *
565            * @param companyId the company ID
566            * @param classNameId the class name ID
567            * @param classPK the class p k
568            * @return the matching email addresses
569            * @throws SystemException if a system exception occurred
570            */
571            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
572                    long companyId, long classNameId, long classPK)
573                    throws com.liferay.portal.kernel.exception.SystemException {
574                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
575            }
576    
577            /**
578            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
579            *
580            * <p>
581            * 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.
582            * </p>
583            *
584            * @param companyId the company ID
585            * @param classNameId the class name ID
586            * @param classPK the class p k
587            * @param start the lower bound of the range of email addresses
588            * @param end the upper bound of the range of email addresses (not inclusive)
589            * @return the range of matching email addresses
590            * @throws SystemException if a system exception occurred
591            */
592            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
593                    long companyId, long classNameId, long classPK, int start, int end)
594                    throws com.liferay.portal.kernel.exception.SystemException {
595                    return getPersistence()
596                                       .findByC_C_C(companyId, classNameId, classPK, start, end);
597            }
598    
599            /**
600            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
601            *
602            * <p>
603            * 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.
604            * </p>
605            *
606            * @param companyId the company ID
607            * @param classNameId the class name ID
608            * @param classPK the class p k
609            * @param start the lower bound of the range of email addresses
610            * @param end the upper bound of the range of email addresses (not inclusive)
611            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
612            * @return the ordered range of matching email addresses
613            * @throws SystemException if a system exception occurred
614            */
615            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
616                    long companyId, long classNameId, long classPK, int start, int end,
617                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
618                    throws com.liferay.portal.kernel.exception.SystemException {
619                    return getPersistence()
620                                       .findByC_C_C(companyId, classNameId, classPK, start, end,
621                            orderByComparator);
622            }
623    
624            /**
625            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
626            *
627            * <p>
628            * 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.
629            * </p>
630            *
631            * @param companyId the company ID
632            * @param classNameId the class name ID
633            * @param classPK the class p k
634            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
635            * @return the first matching email address
636            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
637            * @throws SystemException if a system exception occurred
638            */
639            public static com.liferay.portal.model.EmailAddress findByC_C_C_First(
640                    long companyId, long classNameId, long classPK,
641                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
642                    throws com.liferay.portal.NoSuchEmailAddressException,
643                            com.liferay.portal.kernel.exception.SystemException {
644                    return getPersistence()
645                                       .findByC_C_C_First(companyId, classNameId, classPK,
646                            orderByComparator);
647            }
648    
649            /**
650            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
651            *
652            * <p>
653            * 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.
654            * </p>
655            *
656            * @param companyId the company ID
657            * @param classNameId the class name ID
658            * @param classPK the class p k
659            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
660            * @return the last matching email address
661            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
662            * @throws SystemException if a system exception occurred
663            */
664            public static com.liferay.portal.model.EmailAddress findByC_C_C_Last(
665                    long companyId, long classNameId, long classPK,
666                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
667                    throws com.liferay.portal.NoSuchEmailAddressException,
668                            com.liferay.portal.kernel.exception.SystemException {
669                    return getPersistence()
670                                       .findByC_C_C_Last(companyId, classNameId, classPK,
671                            orderByComparator);
672            }
673    
674            /**
675            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
676            *
677            * <p>
678            * 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.
679            * </p>
680            *
681            * @param emailAddressId the primary key of the current email address
682            * @param companyId the company ID
683            * @param classNameId the class name ID
684            * @param classPK the class p k
685            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
686            * @return the previous, current, and next email address
687            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
688            * @throws SystemException if a system exception occurred
689            */
690            public static com.liferay.portal.model.EmailAddress[] findByC_C_C_PrevAndNext(
691                    long emailAddressId, long companyId, long classNameId, long classPK,
692                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
693                    throws com.liferay.portal.NoSuchEmailAddressException,
694                            com.liferay.portal.kernel.exception.SystemException {
695                    return getPersistence()
696                                       .findByC_C_C_PrevAndNext(emailAddressId, companyId,
697                            classNameId, classPK, orderByComparator);
698            }
699    
700            /**
701            * Returns all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
702            *
703            * @param companyId the company ID
704            * @param classNameId the class name ID
705            * @param classPK the class p k
706            * @param primary the primary
707            * @return the matching email addresses
708            * @throws SystemException if a system exception occurred
709            */
710            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
711                    long companyId, long classNameId, long classPK, boolean primary)
712                    throws com.liferay.portal.kernel.exception.SystemException {
713                    return getPersistence()
714                                       .findByC_C_C_P(companyId, classNameId, classPK, primary);
715            }
716    
717            /**
718            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
719            *
720            * <p>
721            * 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.
722            * </p>
723            *
724            * @param companyId the company ID
725            * @param classNameId the class name ID
726            * @param classPK the class p k
727            * @param primary the primary
728            * @param start the lower bound of the range of email addresses
729            * @param end the upper bound of the range of email addresses (not inclusive)
730            * @return the range of matching email addresses
731            * @throws SystemException if a system exception occurred
732            */
733            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
734                    long companyId, long classNameId, long classPK, boolean primary,
735                    int start, int end)
736                    throws com.liferay.portal.kernel.exception.SystemException {
737                    return getPersistence()
738                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
739                            start, end);
740            }
741    
742            /**
743            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
744            *
745            * <p>
746            * 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.
747            * </p>
748            *
749            * @param companyId the company ID
750            * @param classNameId the class name ID
751            * @param classPK the class p k
752            * @param primary the primary
753            * @param start the lower bound of the range of email addresses
754            * @param end the upper bound of the range of email addresses (not inclusive)
755            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
756            * @return the ordered range of matching email addresses
757            * @throws SystemException if a system exception occurred
758            */
759            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
760                    long companyId, long classNameId, long classPK, boolean primary,
761                    int start, int end,
762                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
763                    throws com.liferay.portal.kernel.exception.SystemException {
764                    return getPersistence()
765                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
766                            start, end, orderByComparator);
767            }
768    
769            /**
770            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
771            *
772            * <p>
773            * 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.
774            * </p>
775            *
776            * @param companyId the company ID
777            * @param classNameId the class name ID
778            * @param classPK the class p k
779            * @param primary the primary
780            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
781            * @return the first matching email address
782            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
783            * @throws SystemException if a system exception occurred
784            */
785            public static com.liferay.portal.model.EmailAddress findByC_C_C_P_First(
786                    long companyId, long classNameId, long classPK, boolean primary,
787                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
788                    throws com.liferay.portal.NoSuchEmailAddressException,
789                            com.liferay.portal.kernel.exception.SystemException {
790                    return getPersistence()
791                                       .findByC_C_C_P_First(companyId, classNameId, classPK,
792                            primary, orderByComparator);
793            }
794    
795            /**
796            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
797            *
798            * <p>
799            * 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.
800            * </p>
801            *
802            * @param companyId the company ID
803            * @param classNameId the class name ID
804            * @param classPK the class p k
805            * @param primary the primary
806            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
807            * @return the last matching email address
808            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
809            * @throws SystemException if a system exception occurred
810            */
811            public static com.liferay.portal.model.EmailAddress findByC_C_C_P_Last(
812                    long companyId, long classNameId, long classPK, boolean primary,
813                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
814                    throws com.liferay.portal.NoSuchEmailAddressException,
815                            com.liferay.portal.kernel.exception.SystemException {
816                    return getPersistence()
817                                       .findByC_C_C_P_Last(companyId, classNameId, classPK,
818                            primary, orderByComparator);
819            }
820    
821            /**
822            * 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;.
823            *
824            * <p>
825            * 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.
826            * </p>
827            *
828            * @param emailAddressId the primary key of the current email address
829            * @param companyId the company ID
830            * @param classNameId the class name ID
831            * @param classPK the class p k
832            * @param primary the primary
833            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
834            * @return the previous, current, and next email address
835            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
836            * @throws SystemException if a system exception occurred
837            */
838            public static com.liferay.portal.model.EmailAddress[] findByC_C_C_P_PrevAndNext(
839                    long emailAddressId, long companyId, long classNameId, long classPK,
840                    boolean primary,
841                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
842                    throws com.liferay.portal.NoSuchEmailAddressException,
843                            com.liferay.portal.kernel.exception.SystemException {
844                    return getPersistence()
845                                       .findByC_C_C_P_PrevAndNext(emailAddressId, companyId,
846                            classNameId, classPK, primary, orderByComparator);
847            }
848    
849            /**
850            * Returns all the email addresses.
851            *
852            * @return the email addresses
853            * @throws SystemException if a system exception occurred
854            */
855            public static java.util.List<com.liferay.portal.model.EmailAddress> findAll()
856                    throws com.liferay.portal.kernel.exception.SystemException {
857                    return getPersistence().findAll();
858            }
859    
860            /**
861            * Returns a range of all the email addresses.
862            *
863            * <p>
864            * 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.
865            * </p>
866            *
867            * @param start the lower bound of the range of email addresses
868            * @param end the upper bound of the range of email addresses (not inclusive)
869            * @return the range of email addresses
870            * @throws SystemException if a system exception occurred
871            */
872            public static java.util.List<com.liferay.portal.model.EmailAddress> findAll(
873                    int start, int end)
874                    throws com.liferay.portal.kernel.exception.SystemException {
875                    return getPersistence().findAll(start, end);
876            }
877    
878            /**
879            * Returns an ordered range of all the email addresses.
880            *
881            * <p>
882            * 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.
883            * </p>
884            *
885            * @param start the lower bound of the range of email addresses
886            * @param end the upper bound of the range of email addresses (not inclusive)
887            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
888            * @return the ordered range of email addresses
889            * @throws SystemException if a system exception occurred
890            */
891            public static java.util.List<com.liferay.portal.model.EmailAddress> findAll(
892                    int start, int end,
893                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
894                    throws com.liferay.portal.kernel.exception.SystemException {
895                    return getPersistence().findAll(start, end, orderByComparator);
896            }
897    
898            /**
899            * Removes all the email addresses where companyId = &#63; from the database.
900            *
901            * @param companyId the company ID
902            * @throws SystemException if a system exception occurred
903            */
904            public static void removeByCompanyId(long companyId)
905                    throws com.liferay.portal.kernel.exception.SystemException {
906                    getPersistence().removeByCompanyId(companyId);
907            }
908    
909            /**
910            * Removes all the email addresses where userId = &#63; from the database.
911            *
912            * @param userId the user ID
913            * @throws SystemException if a system exception occurred
914            */
915            public static void removeByUserId(long userId)
916                    throws com.liferay.portal.kernel.exception.SystemException {
917                    getPersistence().removeByUserId(userId);
918            }
919    
920            /**
921            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; from the database.
922            *
923            * @param companyId the company ID
924            * @param classNameId the class name ID
925            * @throws SystemException if a system exception occurred
926            */
927            public static void removeByC_C(long companyId, long classNameId)
928                    throws com.liferay.portal.kernel.exception.SystemException {
929                    getPersistence().removeByC_C(companyId, classNameId);
930            }
931    
932            /**
933            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
934            *
935            * @param companyId the company ID
936            * @param classNameId the class name ID
937            * @param classPK the class p k
938            * @throws SystemException if a system exception occurred
939            */
940            public static void removeByC_C_C(long companyId, long classNameId,
941                    long classPK)
942                    throws com.liferay.portal.kernel.exception.SystemException {
943                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
944            }
945    
946            /**
947            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63; from the database.
948            *
949            * @param companyId the company ID
950            * @param classNameId the class name ID
951            * @param classPK the class p k
952            * @param primary the primary
953            * @throws SystemException if a system exception occurred
954            */
955            public static void removeByC_C_C_P(long companyId, long classNameId,
956                    long classPK, boolean primary)
957                    throws com.liferay.portal.kernel.exception.SystemException {
958                    getPersistence()
959                            .removeByC_C_C_P(companyId, classNameId, classPK, primary);
960            }
961    
962            /**
963            * Removes all the email addresses from the database.
964            *
965            * @throws SystemException if a system exception occurred
966            */
967            public static void removeAll()
968                    throws com.liferay.portal.kernel.exception.SystemException {
969                    getPersistence().removeAll();
970            }
971    
972            /**
973            * Returns the number of email addresses where companyId = &#63;.
974            *
975            * @param companyId the company ID
976            * @return the number of matching email addresses
977            * @throws SystemException if a system exception occurred
978            */
979            public static int countByCompanyId(long companyId)
980                    throws com.liferay.portal.kernel.exception.SystemException {
981                    return getPersistence().countByCompanyId(companyId);
982            }
983    
984            /**
985            * Returns the number of email addresses where userId = &#63;.
986            *
987            * @param userId the user ID
988            * @return the number of matching email addresses
989            * @throws SystemException if a system exception occurred
990            */
991            public static int countByUserId(long userId)
992                    throws com.liferay.portal.kernel.exception.SystemException {
993                    return getPersistence().countByUserId(userId);
994            }
995    
996            /**
997            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63;.
998            *
999            * @param companyId the company ID
1000            * @param classNameId the class name ID
1001            * @return the number of matching email addresses
1002            * @throws SystemException if a system exception occurred
1003            */
1004            public static int countByC_C(long companyId, long classNameId)
1005                    throws com.liferay.portal.kernel.exception.SystemException {
1006                    return getPersistence().countByC_C(companyId, classNameId);
1007            }
1008    
1009            /**
1010            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1011            *
1012            * @param companyId the company ID
1013            * @param classNameId the class name ID
1014            * @param classPK the class p k
1015            * @return the number of matching email addresses
1016            * @throws SystemException if a system exception occurred
1017            */
1018            public static int countByC_C_C(long companyId, long classNameId,
1019                    long classPK)
1020                    throws com.liferay.portal.kernel.exception.SystemException {
1021                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
1022            }
1023    
1024            /**
1025            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1026            *
1027            * @param companyId the company ID
1028            * @param classNameId the class name ID
1029            * @param classPK the class p k
1030            * @param primary the primary
1031            * @return the number of matching email addresses
1032            * @throws SystemException if a system exception occurred
1033            */
1034            public static int countByC_C_C_P(long companyId, long classNameId,
1035                    long classPK, boolean primary)
1036                    throws com.liferay.portal.kernel.exception.SystemException {
1037                    return getPersistence()
1038                                       .countByC_C_C_P(companyId, classNameId, classPK, primary);
1039            }
1040    
1041            /**
1042            * Returns the number of email addresses.
1043            *
1044            * @return the number of email addresses
1045            * @throws SystemException if a system exception occurred
1046            */
1047            public static int countAll()
1048                    throws com.liferay.portal.kernel.exception.SystemException {
1049                    return getPersistence().countAll();
1050            }
1051    
1052            public static EmailAddressPersistence getPersistence() {
1053                    if (_persistence == null) {
1054                            _persistence = (EmailAddressPersistence)PortalBeanLocatorUtil.locate(EmailAddressPersistence.class.getName());
1055    
1056                            ReferenceRegistry.registerReference(EmailAddressUtil.class,
1057                                    "_persistence");
1058                    }
1059    
1060                    return _persistence;
1061            }
1062    
1063            public void setPersistence(EmailAddressPersistence persistence) {
1064                    _persistence = persistence;
1065    
1066                    ReferenceRegistry.registerReference(EmailAddressUtil.class,
1067                            "_persistence");
1068            }
1069    
1070            private static EmailAddressPersistence _persistence;
1071    }