001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.model.EmailAddress;
018    
019    /**
020     * The persistence interface for the email address service.
021     *
022     * <p>
023     * Caching information and settings can be found in <code>portal.properties</code>
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see EmailAddressPersistenceImpl
028     * @see EmailAddressUtil
029     * @generated
030     */
031    public interface EmailAddressPersistence extends BasePersistence<EmailAddress> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * Never modify or reference this interface directly. Always use {@link EmailAddressUtil} to access the email address persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
036             */
037    
038            /**
039            * Returns all the email addresses where companyId = &#63;.
040            *
041            * @param companyId the company ID
042            * @return the matching email addresses
043            * @throws SystemException if a system exception occurred
044            */
045            public java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
046                    long companyId)
047                    throws com.liferay.portal.kernel.exception.SystemException;
048    
049            /**
050            * Returns a range of all the email addresses where companyId = &#63;.
051            *
052            * <p>
053            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
054            * </p>
055            *
056            * @param companyId the company ID
057            * @param start the lower bound of the range of email addresses
058            * @param end the upper bound of the range of email addresses (not inclusive)
059            * @return the range of matching email addresses
060            * @throws SystemException if a system exception occurred
061            */
062            public java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
063                    long companyId, int start, int end)
064                    throws com.liferay.portal.kernel.exception.SystemException;
065    
066            /**
067            * Returns an ordered range of all the email addresses where companyId = &#63;.
068            *
069            * <p>
070            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
071            * </p>
072            *
073            * @param companyId the company ID
074            * @param start the lower bound of the range of email addresses
075            * @param end the upper bound of the range of email addresses (not inclusive)
076            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
077            * @return the ordered range of matching email addresses
078            * @throws SystemException if a system exception occurred
079            */
080            public java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
081                    long companyId, int start, int end,
082                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
083                    throws com.liferay.portal.kernel.exception.SystemException;
084    
085            /**
086            * Returns the first email address in the ordered set where companyId = &#63;.
087            *
088            * @param companyId the company ID
089            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
090            * @return the first matching email address
091            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
092            * @throws SystemException if a system exception occurred
093            */
094            public com.liferay.portal.model.EmailAddress findByCompanyId_First(
095                    long companyId,
096                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
097                    throws com.liferay.portal.NoSuchEmailAddressException,
098                            com.liferay.portal.kernel.exception.SystemException;
099    
100            /**
101            * Returns the first email address in the ordered set where companyId = &#63;.
102            *
103            * @param companyId the company ID
104            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
105            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
106            * @throws SystemException if a system exception occurred
107            */
108            public com.liferay.portal.model.EmailAddress fetchByCompanyId_First(
109                    long companyId,
110                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
111                    throws com.liferay.portal.kernel.exception.SystemException;
112    
113            /**
114            * Returns the last email address in the ordered set where companyId = &#63;.
115            *
116            * @param companyId the company ID
117            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
118            * @return the last matching email address
119            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
120            * @throws SystemException if a system exception occurred
121            */
122            public com.liferay.portal.model.EmailAddress findByCompanyId_Last(
123                    long companyId,
124                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
125                    throws com.liferay.portal.NoSuchEmailAddressException,
126                            com.liferay.portal.kernel.exception.SystemException;
127    
128            /**
129            * Returns the last email address in the ordered set where companyId = &#63;.
130            *
131            * @param companyId the company ID
132            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
133            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
134            * @throws SystemException if a system exception occurred
135            */
136            public com.liferay.portal.model.EmailAddress fetchByCompanyId_Last(
137                    long companyId,
138                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139                    throws com.liferay.portal.kernel.exception.SystemException;
140    
141            /**
142            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63;.
143            *
144            * @param emailAddressId the primary key of the current email address
145            * @param companyId the company ID
146            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
147            * @return the previous, current, and next email address
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 com.liferay.portal.model.EmailAddress[] findByCompanyId_PrevAndNext(
152                    long emailAddressId, long companyId,
153                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
154                    throws com.liferay.portal.NoSuchEmailAddressException,
155                            com.liferay.portal.kernel.exception.SystemException;
156    
157            /**
158            * Removes all the email addresses where companyId = &#63; from the database.
159            *
160            * @param companyId the company ID
161            * @throws SystemException if a system exception occurred
162            */
163            public void removeByCompanyId(long companyId)
164                    throws com.liferay.portal.kernel.exception.SystemException;
165    
166            /**
167            * Returns the number of email addresses where companyId = &#63;.
168            *
169            * @param companyId the company ID
170            * @return the number of matching email addresses
171            * @throws SystemException if a system exception occurred
172            */
173            public int countByCompanyId(long companyId)
174                    throws com.liferay.portal.kernel.exception.SystemException;
175    
176            /**
177            * Returns all the email addresses where userId = &#63;.
178            *
179            * @param userId the user ID
180            * @return the matching email addresses
181            * @throws SystemException if a system exception occurred
182            */
183            public java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
184                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
185    
186            /**
187            * Returns a range of all the email addresses where userId = &#63;.
188            *
189            * <p>
190            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
191            * </p>
192            *
193            * @param userId the user ID
194            * @param start the lower bound of the range of email addresses
195            * @param end the upper bound of the range of email addresses (not inclusive)
196            * @return the range of matching email addresses
197            * @throws SystemException if a system exception occurred
198            */
199            public java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
200                    long userId, int start, int end)
201                    throws com.liferay.portal.kernel.exception.SystemException;
202    
203            /**
204            * Returns an ordered range of all the email addresses where userId = &#63;.
205            *
206            * <p>
207            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
208            * </p>
209            *
210            * @param userId the user ID
211            * @param start the lower bound of the range of email addresses
212            * @param end the upper bound of the range of email addresses (not inclusive)
213            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
214            * @return the ordered range of matching email addresses
215            * @throws SystemException if a system exception occurred
216            */
217            public java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
218                    long userId, int start, int end,
219                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
220                    throws com.liferay.portal.kernel.exception.SystemException;
221    
222            /**
223            * Returns the first email address in the ordered set where userId = &#63;.
224            *
225            * @param userId the user ID
226            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
227            * @return the first matching email address
228            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
229            * @throws SystemException if a system exception occurred
230            */
231            public com.liferay.portal.model.EmailAddress findByUserId_First(
232                    long userId,
233                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
234                    throws com.liferay.portal.NoSuchEmailAddressException,
235                            com.liferay.portal.kernel.exception.SystemException;
236    
237            /**
238            * Returns the first email address in the ordered set where userId = &#63;.
239            *
240            * @param userId the user ID
241            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
242            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
243            * @throws SystemException if a system exception occurred
244            */
245            public com.liferay.portal.model.EmailAddress fetchByUserId_First(
246                    long userId,
247                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
248                    throws com.liferay.portal.kernel.exception.SystemException;
249    
250            /**
251            * Returns the last email address in the ordered set where userId = &#63;.
252            *
253            * @param userId the user ID
254            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
255            * @return the last 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 com.liferay.portal.model.EmailAddress findByUserId_Last(
260                    long userId,
261                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
262                    throws com.liferay.portal.NoSuchEmailAddressException,
263                            com.liferay.portal.kernel.exception.SystemException;
264    
265            /**
266            * Returns the last email address in the ordered set where userId = &#63;.
267            *
268            * @param userId the user ID
269            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
270            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
271            * @throws SystemException if a system exception occurred
272            */
273            public com.liferay.portal.model.EmailAddress fetchByUserId_Last(
274                    long userId,
275                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
276                    throws com.liferay.portal.kernel.exception.SystemException;
277    
278            /**
279            * Returns the email addresses before and after the current email address in the ordered set where userId = &#63;.
280            *
281            * @param emailAddressId the primary key of the current email address
282            * @param userId the user ID
283            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
284            * @return the previous, current, and next email address
285            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
286            * @throws SystemException if a system exception occurred
287            */
288            public com.liferay.portal.model.EmailAddress[] findByUserId_PrevAndNext(
289                    long emailAddressId, long userId,
290                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
291                    throws com.liferay.portal.NoSuchEmailAddressException,
292                            com.liferay.portal.kernel.exception.SystemException;
293    
294            /**
295            * Removes all the email addresses where userId = &#63; from the database.
296            *
297            * @param userId the user ID
298            * @throws SystemException if a system exception occurred
299            */
300            public void removeByUserId(long userId)
301                    throws com.liferay.portal.kernel.exception.SystemException;
302    
303            /**
304            * Returns the number of email addresses where userId = &#63;.
305            *
306            * @param userId the user ID
307            * @return the number of matching email addresses
308            * @throws SystemException if a system exception occurred
309            */
310            public int countByUserId(long userId)
311                    throws com.liferay.portal.kernel.exception.SystemException;
312    
313            /**
314            * Returns all the email addresses where companyId = &#63; and classNameId = &#63;.
315            *
316            * @param companyId the company ID
317            * @param classNameId the class name ID
318            * @return the matching email addresses
319            * @throws SystemException if a system exception occurred
320            */
321            public java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
322                    long companyId, long classNameId)
323                    throws com.liferay.portal.kernel.exception.SystemException;
324    
325            /**
326            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63;.
327            *
328            * <p>
329            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
330            * </p>
331            *
332            * @param companyId the company ID
333            * @param classNameId the class name 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 java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
340                    long companyId, long classNameId, int start, int end)
341                    throws com.liferay.portal.kernel.exception.SystemException;
342    
343            /**
344            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63;.
345            *
346            * <p>
347            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
348            * </p>
349            *
350            * @param companyId the company ID
351            * @param classNameId the class name ID
352            * @param start the lower bound of the range of email addresses
353            * @param end the upper bound of the range of email addresses (not inclusive)
354            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
355            * @return the ordered range of matching email addresses
356            * @throws SystemException if a system exception occurred
357            */
358            public java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
359                    long companyId, long classNameId, int start, int end,
360                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
361                    throws com.liferay.portal.kernel.exception.SystemException;
362    
363            /**
364            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63;.
365            *
366            * @param companyId the company ID
367            * @param classNameId the class name ID
368            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
369            * @return the first matching email address
370            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
371            * @throws SystemException if a system exception occurred
372            */
373            public com.liferay.portal.model.EmailAddress findByC_C_First(
374                    long companyId, long classNameId,
375                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
376                    throws com.liferay.portal.NoSuchEmailAddressException,
377                            com.liferay.portal.kernel.exception.SystemException;
378    
379            /**
380            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63;.
381            *
382            * @param companyId the company ID
383            * @param classNameId the class name ID
384            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
385            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
386            * @throws SystemException if a system exception occurred
387            */
388            public com.liferay.portal.model.EmailAddress fetchByC_C_First(
389                    long companyId, long classNameId,
390                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
391                    throws com.liferay.portal.kernel.exception.SystemException;
392    
393            /**
394            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63;.
395            *
396            * @param companyId the company ID
397            * @param classNameId the class name ID
398            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
399            * @return the last matching email address
400            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
401            * @throws SystemException if a system exception occurred
402            */
403            public com.liferay.portal.model.EmailAddress findByC_C_Last(
404                    long companyId, long classNameId,
405                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
406                    throws com.liferay.portal.NoSuchEmailAddressException,
407                            com.liferay.portal.kernel.exception.SystemException;
408    
409            /**
410            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63;.
411            *
412            * @param companyId the company ID
413            * @param classNameId the class name ID
414            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
415            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
416            * @throws SystemException if a system exception occurred
417            */
418            public com.liferay.portal.model.EmailAddress fetchByC_C_Last(
419                    long companyId, long classNameId,
420                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
421                    throws com.liferay.portal.kernel.exception.SystemException;
422    
423            /**
424            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63; and classNameId = &#63;.
425            *
426            * @param emailAddressId the primary key of the current email address
427            * @param companyId the company ID
428            * @param classNameId the class name ID
429            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
430            * @return the previous, current, and next email address
431            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
432            * @throws SystemException if a system exception occurred
433            */
434            public com.liferay.portal.model.EmailAddress[] findByC_C_PrevAndNext(
435                    long emailAddressId, long companyId, long classNameId,
436                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
437                    throws com.liferay.portal.NoSuchEmailAddressException,
438                            com.liferay.portal.kernel.exception.SystemException;
439    
440            /**
441            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; from the database.
442            *
443            * @param companyId the company ID
444            * @param classNameId the class name ID
445            * @throws SystemException if a system exception occurred
446            */
447            public void removeByC_C(long companyId, long classNameId)
448                    throws com.liferay.portal.kernel.exception.SystemException;
449    
450            /**
451            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63;.
452            *
453            * @param companyId the company ID
454            * @param classNameId the class name ID
455            * @return the number of matching email addresses
456            * @throws SystemException if a system exception occurred
457            */
458            public int countByC_C(long companyId, long classNameId)
459                    throws com.liferay.portal.kernel.exception.SystemException;
460    
461            /**
462            * Returns all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
463            *
464            * @param companyId the company ID
465            * @param classNameId the class name ID
466            * @param classPK the class p k
467            * @return the matching email addresses
468            * @throws SystemException if a system exception occurred
469            */
470            public java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
471                    long companyId, long classNameId, long classPK)
472                    throws com.liferay.portal.kernel.exception.SystemException;
473    
474            /**
475            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
476            *
477            * <p>
478            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
479            * </p>
480            *
481            * @param companyId the company ID
482            * @param classNameId the class name ID
483            * @param classPK the class p k
484            * @param start the lower bound of the range of email addresses
485            * @param end the upper bound of the range of email addresses (not inclusive)
486            * @return the range of matching email addresses
487            * @throws SystemException if a system exception occurred
488            */
489            public java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
490                    long companyId, long classNameId, long classPK, int start, int end)
491                    throws com.liferay.portal.kernel.exception.SystemException;
492    
493            /**
494            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
495            *
496            * <p>
497            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
498            * </p>
499            *
500            * @param companyId the company ID
501            * @param classNameId the class name ID
502            * @param classPK the class p k
503            * @param start the lower bound of the range of email addresses
504            * @param end the upper bound of the range of email addresses (not inclusive)
505            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
506            * @return the ordered range of matching email addresses
507            * @throws SystemException if a system exception occurred
508            */
509            public java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
510                    long companyId, long classNameId, long classPK, int start, int end,
511                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
512                    throws com.liferay.portal.kernel.exception.SystemException;
513    
514            /**
515            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
516            *
517            * @param companyId the company ID
518            * @param classNameId the class name ID
519            * @param classPK the class p k
520            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
521            * @return the first matching email address
522            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
523            * @throws SystemException if a system exception occurred
524            */
525            public com.liferay.portal.model.EmailAddress findByC_C_C_First(
526                    long companyId, long classNameId, long classPK,
527                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
528                    throws com.liferay.portal.NoSuchEmailAddressException,
529                            com.liferay.portal.kernel.exception.SystemException;
530    
531            /**
532            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
533            *
534            * @param companyId the company ID
535            * @param classNameId the class name ID
536            * @param classPK the class p k
537            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
538            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
539            * @throws SystemException if a system exception occurred
540            */
541            public com.liferay.portal.model.EmailAddress fetchByC_C_C_First(
542                    long companyId, long classNameId, long classPK,
543                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
544                    throws com.liferay.portal.kernel.exception.SystemException;
545    
546            /**
547            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
548            *
549            * @param companyId the company ID
550            * @param classNameId the class name ID
551            * @param classPK the class p k
552            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
553            * @return the last matching email address
554            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
555            * @throws SystemException if a system exception occurred
556            */
557            public com.liferay.portal.model.EmailAddress findByC_C_C_Last(
558                    long companyId, long classNameId, long classPK,
559                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
560                    throws com.liferay.portal.NoSuchEmailAddressException,
561                            com.liferay.portal.kernel.exception.SystemException;
562    
563            /**
564            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
565            *
566            * @param companyId the company ID
567            * @param classNameId the class name ID
568            * @param classPK the class p k
569            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
570            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
571            * @throws SystemException if a system exception occurred
572            */
573            public com.liferay.portal.model.EmailAddress fetchByC_C_C_Last(
574                    long companyId, long classNameId, long classPK,
575                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
576                    throws com.liferay.portal.kernel.exception.SystemException;
577    
578            /**
579            * Returns the email addresses before and after the current email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
580            *
581            * @param emailAddressId the primary key of the current email address
582            * @param companyId the company ID
583            * @param classNameId the class name ID
584            * @param classPK the class p k
585            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
586            * @return the previous, current, and next email address
587            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
588            * @throws SystemException if a system exception occurred
589            */
590            public com.liferay.portal.model.EmailAddress[] findByC_C_C_PrevAndNext(
591                    long emailAddressId, long companyId, long classNameId, long classPK,
592                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
593                    throws com.liferay.portal.NoSuchEmailAddressException,
594                            com.liferay.portal.kernel.exception.SystemException;
595    
596            /**
597            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
598            *
599            * @param companyId the company ID
600            * @param classNameId the class name ID
601            * @param classPK the class p k
602            * @throws SystemException if a system exception occurred
603            */
604            public void removeByC_C_C(long companyId, long classNameId, long classPK)
605                    throws com.liferay.portal.kernel.exception.SystemException;
606    
607            /**
608            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
609            *
610            * @param companyId the company ID
611            * @param classNameId the class name ID
612            * @param classPK the class p k
613            * @return the number of matching email addresses
614            * @throws SystemException if a system exception occurred
615            */
616            public int countByC_C_C(long companyId, long classNameId, long classPK)
617                    throws com.liferay.portal.kernel.exception.SystemException;
618    
619            /**
620            * Returns all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
621            *
622            * @param companyId the company ID
623            * @param classNameId the class name ID
624            * @param classPK the class p k
625            * @param primary the primary
626            * @return the matching email addresses
627            * @throws SystemException if a system exception occurred
628            */
629            public java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
630                    long companyId, long classNameId, long classPK, boolean primary)
631                    throws com.liferay.portal.kernel.exception.SystemException;
632    
633            /**
634            * Returns a range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
635            *
636            * <p>
637            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
638            * </p>
639            *
640            * @param companyId the company ID
641            * @param classNameId the class name ID
642            * @param classPK the class p k
643            * @param primary the primary
644            * @param start the lower bound of the range of email addresses
645            * @param end the upper bound of the range of email addresses (not inclusive)
646            * @return the range of matching email addresses
647            * @throws SystemException if a system exception occurred
648            */
649            public java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
650                    long companyId, long classNameId, long classPK, boolean primary,
651                    int start, int end)
652                    throws com.liferay.portal.kernel.exception.SystemException;
653    
654            /**
655            * Returns an ordered range of all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
659            * </p>
660            *
661            * @param companyId the company ID
662            * @param classNameId the class name ID
663            * @param classPK the class p k
664            * @param primary the primary
665            * @param start the lower bound of the range of email addresses
666            * @param end the upper bound of the range of email addresses (not inclusive)
667            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
668            * @return the ordered range of matching email addresses
669            * @throws SystemException if a system exception occurred
670            */
671            public java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
672                    long companyId, long classNameId, long classPK, boolean primary,
673                    int start, int end,
674                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
675                    throws com.liferay.portal.kernel.exception.SystemException;
676    
677            /**
678            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
679            *
680            * @param companyId the company ID
681            * @param classNameId the class name ID
682            * @param classPK the class p k
683            * @param primary the primary
684            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
685            * @return the first matching email address
686            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
687            * @throws SystemException if a system exception occurred
688            */
689            public com.liferay.portal.model.EmailAddress findByC_C_C_P_First(
690                    long companyId, long classNameId, long classPK, boolean primary,
691                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
692                    throws com.liferay.portal.NoSuchEmailAddressException,
693                            com.liferay.portal.kernel.exception.SystemException;
694    
695            /**
696            * Returns the first email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
697            *
698            * @param companyId the company ID
699            * @param classNameId the class name ID
700            * @param classPK the class p k
701            * @param primary the primary
702            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
703            * @return the first matching email address, or <code>null</code> if a matching email address could not be found
704            * @throws SystemException if a system exception occurred
705            */
706            public com.liferay.portal.model.EmailAddress fetchByC_C_C_P_First(
707                    long companyId, long classNameId, long classPK, boolean primary,
708                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
709                    throws com.liferay.portal.kernel.exception.SystemException;
710    
711            /**
712            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
713            *
714            * @param companyId the company ID
715            * @param classNameId the class name ID
716            * @param classPK the class p k
717            * @param primary the primary
718            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
719            * @return the last matching email address
720            * @throws com.liferay.portal.NoSuchEmailAddressException if a matching email address could not be found
721            * @throws SystemException if a system exception occurred
722            */
723            public com.liferay.portal.model.EmailAddress findByC_C_C_P_Last(
724                    long companyId, long classNameId, long classPK, boolean primary,
725                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
726                    throws com.liferay.portal.NoSuchEmailAddressException,
727                            com.liferay.portal.kernel.exception.SystemException;
728    
729            /**
730            * Returns the last email address in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
731            *
732            * @param companyId the company ID
733            * @param classNameId the class name ID
734            * @param classPK the class p k
735            * @param primary the primary
736            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
737            * @return the last matching email address, or <code>null</code> if a matching email address could not be found
738            * @throws SystemException if a system exception occurred
739            */
740            public com.liferay.portal.model.EmailAddress fetchByC_C_C_P_Last(
741                    long companyId, long classNameId, long classPK, boolean primary,
742                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
743                    throws com.liferay.portal.kernel.exception.SystemException;
744    
745            /**
746            * 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;.
747            *
748            * @param emailAddressId the primary key of the current email address
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 orderByComparator the comparator to order the set by (optionally <code>null</code>)
754            * @return the previous, current, and next email address
755            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
756            * @throws SystemException if a system exception occurred
757            */
758            public com.liferay.portal.model.EmailAddress[] findByC_C_C_P_PrevAndNext(
759                    long emailAddressId, long companyId, long classNameId, long classPK,
760                    boolean primary,
761                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
762                    throws com.liferay.portal.NoSuchEmailAddressException,
763                            com.liferay.portal.kernel.exception.SystemException;
764    
765            /**
766            * Removes all the email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63; from the database.
767            *
768            * @param companyId the company ID
769            * @param classNameId the class name ID
770            * @param classPK the class p k
771            * @param primary the primary
772            * @throws SystemException if a system exception occurred
773            */
774            public void removeByC_C_C_P(long companyId, long classNameId, long classPK,
775                    boolean primary)
776                    throws com.liferay.portal.kernel.exception.SystemException;
777    
778            /**
779            * Returns the number of email addresses where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
780            *
781            * @param companyId the company ID
782            * @param classNameId the class name ID
783            * @param classPK the class p k
784            * @param primary the primary
785            * @return the number of matching email addresses
786            * @throws SystemException if a system exception occurred
787            */
788            public int countByC_C_C_P(long companyId, long classNameId, long classPK,
789                    boolean primary)
790                    throws com.liferay.portal.kernel.exception.SystemException;
791    
792            /**
793            * Caches the email address in the entity cache if it is enabled.
794            *
795            * @param emailAddress the email address
796            */
797            public void cacheResult(com.liferay.portal.model.EmailAddress emailAddress);
798    
799            /**
800            * Caches the email addresses in the entity cache if it is enabled.
801            *
802            * @param emailAddresses the email addresses
803            */
804            public void cacheResult(
805                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses);
806    
807            /**
808            * Creates a new email address with the primary key. Does not add the email address to the database.
809            *
810            * @param emailAddressId the primary key for the new email address
811            * @return the new email address
812            */
813            public com.liferay.portal.model.EmailAddress create(long emailAddressId);
814    
815            /**
816            * Removes the email address with the primary key from the database. Also notifies the appropriate model listeners.
817            *
818            * @param emailAddressId the primary key of the email address
819            * @return the email address that was removed
820            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
821            * @throws SystemException if a system exception occurred
822            */
823            public com.liferay.portal.model.EmailAddress remove(long emailAddressId)
824                    throws com.liferay.portal.NoSuchEmailAddressException,
825                            com.liferay.portal.kernel.exception.SystemException;
826    
827            public com.liferay.portal.model.EmailAddress updateImpl(
828                    com.liferay.portal.model.EmailAddress emailAddress)
829                    throws com.liferay.portal.kernel.exception.SystemException;
830    
831            /**
832            * Returns the email address with the primary key or throws a {@link com.liferay.portal.NoSuchEmailAddressException} if it could not be found.
833            *
834            * @param emailAddressId the primary key of the email address
835            * @return the email address
836            * @throws com.liferay.portal.NoSuchEmailAddressException if a email address with the primary key could not be found
837            * @throws SystemException if a system exception occurred
838            */
839            public com.liferay.portal.model.EmailAddress findByPrimaryKey(
840                    long emailAddressId)
841                    throws com.liferay.portal.NoSuchEmailAddressException,
842                            com.liferay.portal.kernel.exception.SystemException;
843    
844            /**
845            * Returns the email address with the primary key or returns <code>null</code> if it could not be found.
846            *
847            * @param emailAddressId the primary key of the email address
848            * @return the email address, or <code>null</code> if a email address with the primary key could not be found
849            * @throws SystemException if a system exception occurred
850            */
851            public com.liferay.portal.model.EmailAddress fetchByPrimaryKey(
852                    long emailAddressId)
853                    throws com.liferay.portal.kernel.exception.SystemException;
854    
855            /**
856            * Returns all the email addresses.
857            *
858            * @return the email addresses
859            * @throws SystemException if a system exception occurred
860            */
861            public java.util.List<com.liferay.portal.model.EmailAddress> findAll()
862                    throws com.liferay.portal.kernel.exception.SystemException;
863    
864            /**
865            * Returns a range of all the email addresses.
866            *
867            * <p>
868            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
869            * </p>
870            *
871            * @param start the lower bound of the range of email addresses
872            * @param end the upper bound of the range of email addresses (not inclusive)
873            * @return the range of email addresses
874            * @throws SystemException if a system exception occurred
875            */
876            public java.util.List<com.liferay.portal.model.EmailAddress> findAll(
877                    int start, int end)
878                    throws com.liferay.portal.kernel.exception.SystemException;
879    
880            /**
881            * Returns an ordered range of all the email addresses.
882            *
883            * <p>
884            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.EmailAddressModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
885            * </p>
886            *
887            * @param start the lower bound of the range of email addresses
888            * @param end the upper bound of the range of email addresses (not inclusive)
889            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
890            * @return the ordered range of email addresses
891            * @throws SystemException if a system exception occurred
892            */
893            public java.util.List<com.liferay.portal.model.EmailAddress> findAll(
894                    int start, int end,
895                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
896                    throws com.liferay.portal.kernel.exception.SystemException;
897    
898            /**
899            * Removes all the email addresses from the database.
900            *
901            * @throws SystemException if a system exception occurred
902            */
903            public void removeAll()
904                    throws com.liferay.portal.kernel.exception.SystemException;
905    
906            /**
907            * Returns the number of email addresses.
908            *
909            * @return the number of email addresses
910            * @throws SystemException if a system exception occurred
911            */
912            public int countAll()
913                    throws com.liferay.portal.kernel.exception.SystemException;
914    }