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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.Contact;
020    
021    /**
022     * The persistence interface for the contact service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see ContactPersistenceImpl
030     * @see ContactUtil
031     * @generated
032     */
033    @ProviderType
034    public interface ContactPersistence extends BasePersistence<Contact> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link ContactUtil} to access the contact persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns all the contacts where companyId = &#63;.
043            *
044            * @param companyId the company ID
045            * @return the matching contacts
046            * @throws SystemException if a system exception occurred
047            */
048            public java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
049                    long companyId)
050                    throws com.liferay.portal.kernel.exception.SystemException;
051    
052            /**
053            * Returns a range of all the contacts where companyId = &#63;.
054            *
055            * <p>
056            * 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.ContactModelImpl}. 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.
057            * </p>
058            *
059            * @param companyId the company ID
060            * @param start the lower bound of the range of contacts
061            * @param end the upper bound of the range of contacts (not inclusive)
062            * @return the range of matching contacts
063            * @throws SystemException if a system exception occurred
064            */
065            public java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
066                    long companyId, int start, int end)
067                    throws com.liferay.portal.kernel.exception.SystemException;
068    
069            /**
070            * Returns an ordered range of all the contacts where companyId = &#63;.
071            *
072            * <p>
073            * 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.ContactModelImpl}. 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.
074            * </p>
075            *
076            * @param companyId the company ID
077            * @param start the lower bound of the range of contacts
078            * @param end the upper bound of the range of contacts (not inclusive)
079            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
080            * @return the ordered range of matching contacts
081            * @throws SystemException if a system exception occurred
082            */
083            public java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
084                    long companyId, int start, int end,
085                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
086                    throws com.liferay.portal.kernel.exception.SystemException;
087    
088            /**
089            * Returns the first contact in the ordered set where companyId = &#63;.
090            *
091            * @param companyId the company ID
092            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
093            * @return the first matching contact
094            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
095            * @throws SystemException if a system exception occurred
096            */
097            public com.liferay.portal.model.Contact findByCompanyId_First(
098                    long companyId,
099                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
100                    throws com.liferay.portal.NoSuchContactException,
101                            com.liferay.portal.kernel.exception.SystemException;
102    
103            /**
104            * Returns the first contact in the ordered set where companyId = &#63;.
105            *
106            * @param companyId the company ID
107            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
108            * @return the first matching contact, or <code>null</code> if a matching contact could not be found
109            * @throws SystemException if a system exception occurred
110            */
111            public com.liferay.portal.model.Contact fetchByCompanyId_First(
112                    long companyId,
113                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
114                    throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Returns the last contact in the ordered set where companyId = &#63;.
118            *
119            * @param companyId the company ID
120            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
121            * @return the last matching contact
122            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
123            * @throws SystemException if a system exception occurred
124            */
125            public com.liferay.portal.model.Contact findByCompanyId_Last(
126                    long companyId,
127                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
128                    throws com.liferay.portal.NoSuchContactException,
129                            com.liferay.portal.kernel.exception.SystemException;
130    
131            /**
132            * Returns the last contact in the ordered set where companyId = &#63;.
133            *
134            * @param companyId the company ID
135            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
136            * @return the last matching contact, or <code>null</code> if a matching contact could not be found
137            * @throws SystemException if a system exception occurred
138            */
139            public com.liferay.portal.model.Contact fetchByCompanyId_Last(
140                    long companyId,
141                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142                    throws com.liferay.portal.kernel.exception.SystemException;
143    
144            /**
145            * Returns the contacts before and after the current contact in the ordered set where companyId = &#63;.
146            *
147            * @param contactId the primary key of the current contact
148            * @param companyId the company ID
149            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
150            * @return the previous, current, and next contact
151            * @throws com.liferay.portal.NoSuchContactException if a contact with the primary key could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            public com.liferay.portal.model.Contact[] findByCompanyId_PrevAndNext(
155                    long contactId, long companyId,
156                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157                    throws com.liferay.portal.NoSuchContactException,
158                            com.liferay.portal.kernel.exception.SystemException;
159    
160            /**
161            * Removes all the contacts where companyId = &#63; from the database.
162            *
163            * @param companyId the company ID
164            * @throws SystemException if a system exception occurred
165            */
166            public void removeByCompanyId(long companyId)
167                    throws com.liferay.portal.kernel.exception.SystemException;
168    
169            /**
170            * Returns the number of contacts where companyId = &#63;.
171            *
172            * @param companyId the company ID
173            * @return the number of matching contacts
174            * @throws SystemException if a system exception occurred
175            */
176            public int countByCompanyId(long companyId)
177                    throws com.liferay.portal.kernel.exception.SystemException;
178    
179            /**
180            * Returns all the contacts where accountId = &#63;.
181            *
182            * @param accountId the account ID
183            * @return the matching contacts
184            * @throws SystemException if a system exception occurred
185            */
186            public java.util.List<com.liferay.portal.model.Contact> findByAccountId(
187                    long accountId)
188                    throws com.liferay.portal.kernel.exception.SystemException;
189    
190            /**
191            * Returns a range of all the contacts where accountId = &#63;.
192            *
193            * <p>
194            * 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.ContactModelImpl}. 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.
195            * </p>
196            *
197            * @param accountId the account ID
198            * @param start the lower bound of the range of contacts
199            * @param end the upper bound of the range of contacts (not inclusive)
200            * @return the range of matching contacts
201            * @throws SystemException if a system exception occurred
202            */
203            public java.util.List<com.liferay.portal.model.Contact> findByAccountId(
204                    long accountId, int start, int end)
205                    throws com.liferay.portal.kernel.exception.SystemException;
206    
207            /**
208            * Returns an ordered range of all the contacts where accountId = &#63;.
209            *
210            * <p>
211            * 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.ContactModelImpl}. 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.
212            * </p>
213            *
214            * @param accountId the account ID
215            * @param start the lower bound of the range of contacts
216            * @param end the upper bound of the range of contacts (not inclusive)
217            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
218            * @return the ordered range of matching contacts
219            * @throws SystemException if a system exception occurred
220            */
221            public java.util.List<com.liferay.portal.model.Contact> findByAccountId(
222                    long accountId, int start, int end,
223                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
224                    throws com.liferay.portal.kernel.exception.SystemException;
225    
226            /**
227            * Returns the first contact in the ordered set where accountId = &#63;.
228            *
229            * @param accountId the account ID
230            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
231            * @return the first matching contact
232            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
233            * @throws SystemException if a system exception occurred
234            */
235            public com.liferay.portal.model.Contact findByAccountId_First(
236                    long accountId,
237                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
238                    throws com.liferay.portal.NoSuchContactException,
239                            com.liferay.portal.kernel.exception.SystemException;
240    
241            /**
242            * Returns the first contact in the ordered set where accountId = &#63;.
243            *
244            * @param accountId the account ID
245            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
246            * @return the first matching contact, or <code>null</code> if a matching contact could not be found
247            * @throws SystemException if a system exception occurred
248            */
249            public com.liferay.portal.model.Contact fetchByAccountId_First(
250                    long accountId,
251                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252                    throws com.liferay.portal.kernel.exception.SystemException;
253    
254            /**
255            * Returns the last contact in the ordered set where accountId = &#63;.
256            *
257            * @param accountId the account ID
258            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
259            * @return the last matching contact
260            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
261            * @throws SystemException if a system exception occurred
262            */
263            public com.liferay.portal.model.Contact findByAccountId_Last(
264                    long accountId,
265                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
266                    throws com.liferay.portal.NoSuchContactException,
267                            com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * Returns the last contact in the ordered set where accountId = &#63;.
271            *
272            * @param accountId the account ID
273            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
274            * @return the last matching contact, or <code>null</code> if a matching contact could not be found
275            * @throws SystemException if a system exception occurred
276            */
277            public com.liferay.portal.model.Contact fetchByAccountId_Last(
278                    long accountId,
279                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
280                    throws com.liferay.portal.kernel.exception.SystemException;
281    
282            /**
283            * Returns the contacts before and after the current contact in the ordered set where accountId = &#63;.
284            *
285            * @param contactId the primary key of the current contact
286            * @param accountId the account ID
287            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
288            * @return the previous, current, and next contact
289            * @throws com.liferay.portal.NoSuchContactException if a contact with the primary key could not be found
290            * @throws SystemException if a system exception occurred
291            */
292            public com.liferay.portal.model.Contact[] findByAccountId_PrevAndNext(
293                    long contactId, long accountId,
294                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
295                    throws com.liferay.portal.NoSuchContactException,
296                            com.liferay.portal.kernel.exception.SystemException;
297    
298            /**
299            * Removes all the contacts where accountId = &#63; from the database.
300            *
301            * @param accountId the account ID
302            * @throws SystemException if a system exception occurred
303            */
304            public void removeByAccountId(long accountId)
305                    throws com.liferay.portal.kernel.exception.SystemException;
306    
307            /**
308            * Returns the number of contacts where accountId = &#63;.
309            *
310            * @param accountId the account ID
311            * @return the number of matching contacts
312            * @throws SystemException if a system exception occurred
313            */
314            public int countByAccountId(long accountId)
315                    throws com.liferay.portal.kernel.exception.SystemException;
316    
317            /**
318            * Returns all the contacts where classNameId = &#63; and classPK = &#63;.
319            *
320            * @param classNameId the class name ID
321            * @param classPK the class p k
322            * @return the matching contacts
323            * @throws SystemException if a system exception occurred
324            */
325            public java.util.List<com.liferay.portal.model.Contact> findByC_C(
326                    long classNameId, long classPK)
327                    throws com.liferay.portal.kernel.exception.SystemException;
328    
329            /**
330            * Returns a range of all the contacts where classNameId = &#63; and classPK = &#63;.
331            *
332            * <p>
333            * 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.ContactModelImpl}. 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.
334            * </p>
335            *
336            * @param classNameId the class name ID
337            * @param classPK the class p k
338            * @param start the lower bound of the range of contacts
339            * @param end the upper bound of the range of contacts (not inclusive)
340            * @return the range of matching contacts
341            * @throws SystemException if a system exception occurred
342            */
343            public java.util.List<com.liferay.portal.model.Contact> findByC_C(
344                    long classNameId, long classPK, int start, int end)
345                    throws com.liferay.portal.kernel.exception.SystemException;
346    
347            /**
348            * Returns an ordered range of all the contacts where classNameId = &#63; and classPK = &#63;.
349            *
350            * <p>
351            * 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.ContactModelImpl}. 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.
352            * </p>
353            *
354            * @param classNameId the class name ID
355            * @param classPK the class p k
356            * @param start the lower bound of the range of contacts
357            * @param end the upper bound of the range of contacts (not inclusive)
358            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
359            * @return the ordered range of matching contacts
360            * @throws SystemException if a system exception occurred
361            */
362            public java.util.List<com.liferay.portal.model.Contact> findByC_C(
363                    long classNameId, long classPK, int start, int end,
364                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
365                    throws com.liferay.portal.kernel.exception.SystemException;
366    
367            /**
368            * Returns the first contact in the ordered set where classNameId = &#63; and classPK = &#63;.
369            *
370            * @param classNameId the class name ID
371            * @param classPK the class p k
372            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
373            * @return the first matching contact
374            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
375            * @throws SystemException if a system exception occurred
376            */
377            public com.liferay.portal.model.Contact findByC_C_First(long classNameId,
378                    long classPK,
379                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
380                    throws com.liferay.portal.NoSuchContactException,
381                            com.liferay.portal.kernel.exception.SystemException;
382    
383            /**
384            * Returns the first contact in the ordered set where classNameId = &#63; and classPK = &#63;.
385            *
386            * @param classNameId the class name ID
387            * @param classPK the class p k
388            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
389            * @return the first matching contact, or <code>null</code> if a matching contact could not be found
390            * @throws SystemException if a system exception occurred
391            */
392            public com.liferay.portal.model.Contact fetchByC_C_First(long classNameId,
393                    long classPK,
394                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
395                    throws com.liferay.portal.kernel.exception.SystemException;
396    
397            /**
398            * Returns the last contact in the ordered set where classNameId = &#63; and classPK = &#63;.
399            *
400            * @param classNameId the class name ID
401            * @param classPK the class p k
402            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
403            * @return the last matching contact
404            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
405            * @throws SystemException if a system exception occurred
406            */
407            public com.liferay.portal.model.Contact findByC_C_Last(long classNameId,
408                    long classPK,
409                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
410                    throws com.liferay.portal.NoSuchContactException,
411                            com.liferay.portal.kernel.exception.SystemException;
412    
413            /**
414            * Returns the last contact in the ordered set where classNameId = &#63; and classPK = &#63;.
415            *
416            * @param classNameId the class name ID
417            * @param classPK the class p k
418            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
419            * @return the last matching contact, or <code>null</code> if a matching contact could not be found
420            * @throws SystemException if a system exception occurred
421            */
422            public com.liferay.portal.model.Contact fetchByC_C_Last(long classNameId,
423                    long classPK,
424                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
425                    throws com.liferay.portal.kernel.exception.SystemException;
426    
427            /**
428            * Returns the contacts before and after the current contact in the ordered set where classNameId = &#63; and classPK = &#63;.
429            *
430            * @param contactId the primary key of the current contact
431            * @param classNameId the class name ID
432            * @param classPK the class p k
433            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
434            * @return the previous, current, and next contact
435            * @throws com.liferay.portal.NoSuchContactException if a contact with the primary key could not be found
436            * @throws SystemException if a system exception occurred
437            */
438            public com.liferay.portal.model.Contact[] findByC_C_PrevAndNext(
439                    long contactId, long classNameId, long classPK,
440                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
441                    throws com.liferay.portal.NoSuchContactException,
442                            com.liferay.portal.kernel.exception.SystemException;
443    
444            /**
445            * Removes all the contacts where classNameId = &#63; and classPK = &#63; from the database.
446            *
447            * @param classNameId the class name ID
448            * @param classPK the class p k
449            * @throws SystemException if a system exception occurred
450            */
451            public void removeByC_C(long classNameId, long classPK)
452                    throws com.liferay.portal.kernel.exception.SystemException;
453    
454            /**
455            * Returns the number of contacts where classNameId = &#63; and classPK = &#63;.
456            *
457            * @param classNameId the class name ID
458            * @param classPK the class p k
459            * @return the number of matching contacts
460            * @throws SystemException if a system exception occurred
461            */
462            public int countByC_C(long classNameId, long classPK)
463                    throws com.liferay.portal.kernel.exception.SystemException;
464    
465            /**
466            * Caches the contact in the entity cache if it is enabled.
467            *
468            * @param contact the contact
469            */
470            public void cacheResult(com.liferay.portal.model.Contact contact);
471    
472            /**
473            * Caches the contacts in the entity cache if it is enabled.
474            *
475            * @param contacts the contacts
476            */
477            public void cacheResult(
478                    java.util.List<com.liferay.portal.model.Contact> contacts);
479    
480            /**
481            * Creates a new contact with the primary key. Does not add the contact to the database.
482            *
483            * @param contactId the primary key for the new contact
484            * @return the new contact
485            */
486            public com.liferay.portal.model.Contact create(long contactId);
487    
488            /**
489            * Removes the contact with the primary key from the database. Also notifies the appropriate model listeners.
490            *
491            * @param contactId the primary key of the contact
492            * @return the contact that was removed
493            * @throws com.liferay.portal.NoSuchContactException if a contact with the primary key could not be found
494            * @throws SystemException if a system exception occurred
495            */
496            public com.liferay.portal.model.Contact remove(long contactId)
497                    throws com.liferay.portal.NoSuchContactException,
498                            com.liferay.portal.kernel.exception.SystemException;
499    
500            public com.liferay.portal.model.Contact updateImpl(
501                    com.liferay.portal.model.Contact contact)
502                    throws com.liferay.portal.kernel.exception.SystemException;
503    
504            /**
505            * Returns the contact with the primary key or throws a {@link com.liferay.portal.NoSuchContactException} if it could not be found.
506            *
507            * @param contactId the primary key of the contact
508            * @return the contact
509            * @throws com.liferay.portal.NoSuchContactException if a contact with the primary key could not be found
510            * @throws SystemException if a system exception occurred
511            */
512            public com.liferay.portal.model.Contact findByPrimaryKey(long contactId)
513                    throws com.liferay.portal.NoSuchContactException,
514                            com.liferay.portal.kernel.exception.SystemException;
515    
516            /**
517            * Returns the contact with the primary key or returns <code>null</code> if it could not be found.
518            *
519            * @param contactId the primary key of the contact
520            * @return the contact, or <code>null</code> if a contact with the primary key could not be found
521            * @throws SystemException if a system exception occurred
522            */
523            public com.liferay.portal.model.Contact fetchByPrimaryKey(long contactId)
524                    throws com.liferay.portal.kernel.exception.SystemException;
525    
526            /**
527            * Returns all the contacts.
528            *
529            * @return the contacts
530            * @throws SystemException if a system exception occurred
531            */
532            public java.util.List<com.liferay.portal.model.Contact> findAll()
533                    throws com.liferay.portal.kernel.exception.SystemException;
534    
535            /**
536            * Returns a range of all the contacts.
537            *
538            * <p>
539            * 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.ContactModelImpl}. 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.
540            * </p>
541            *
542            * @param start the lower bound of the range of contacts
543            * @param end the upper bound of the range of contacts (not inclusive)
544            * @return the range of contacts
545            * @throws SystemException if a system exception occurred
546            */
547            public java.util.List<com.liferay.portal.model.Contact> findAll(int start,
548                    int end) throws com.liferay.portal.kernel.exception.SystemException;
549    
550            /**
551            * Returns an ordered range of all the contacts.
552            *
553            * <p>
554            * 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.ContactModelImpl}. 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.
555            * </p>
556            *
557            * @param start the lower bound of the range of contacts
558            * @param end the upper bound of the range of contacts (not inclusive)
559            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
560            * @return the ordered range of contacts
561            * @throws SystemException if a system exception occurred
562            */
563            public java.util.List<com.liferay.portal.model.Contact> findAll(int start,
564                    int end,
565                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
566                    throws com.liferay.portal.kernel.exception.SystemException;
567    
568            /**
569            * Removes all the contacts from the database.
570            *
571            * @throws SystemException if a system exception occurred
572            */
573            public void removeAll()
574                    throws com.liferay.portal.kernel.exception.SystemException;
575    
576            /**
577            * Returns the number of contacts.
578            *
579            * @return the number of contacts
580            * @throws SystemException if a system exception occurred
581            */
582            public int countAll()
583                    throws com.liferay.portal.kernel.exception.SystemException;
584    }