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