001    /**
002     * Copyright (c) 2000-present 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            */
047            public java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
048                    long companyId);
049    
050            /**
051            * Returns a range of all the contacts where companyId = &#63;.
052            *
053            * <p>
054            * 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.
055            * </p>
056            *
057            * @param companyId the company ID
058            * @param start the lower bound of the range of contacts
059            * @param end the upper bound of the range of contacts (not inclusive)
060            * @return the range of matching contacts
061            */
062            public java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
063                    long companyId, int start, int end);
064    
065            /**
066            * Returns an ordered range of all the contacts where companyId = &#63;.
067            *
068            * <p>
069            * 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.
070            * </p>
071            *
072            * @param companyId the company ID
073            * @param start the lower bound of the range of contacts
074            * @param end the upper bound of the range of contacts (not inclusive)
075            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
076            * @return the ordered range of matching contacts
077            */
078            public java.util.List<com.liferay.portal.model.Contact> findByCompanyId(
079                    long companyId, int start, int end,
080                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator);
081    
082            /**
083            * Returns the first contact in the ordered set where companyId = &#63;.
084            *
085            * @param companyId the company ID
086            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
087            * @return the first matching contact
088            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
089            */
090            public com.liferay.portal.model.Contact findByCompanyId_First(
091                    long companyId,
092                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator)
093                    throws com.liferay.portal.NoSuchContactException;
094    
095            /**
096            * Returns the first contact in the ordered set where companyId = &#63;.
097            *
098            * @param companyId the company ID
099            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
100            * @return the first matching contact, or <code>null</code> if a matching contact could not be found
101            */
102            public com.liferay.portal.model.Contact fetchByCompanyId_First(
103                    long companyId,
104                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator);
105    
106            /**
107            * Returns the last contact in the ordered set where companyId = &#63;.
108            *
109            * @param companyId the company ID
110            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
111            * @return the last matching contact
112            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
113            */
114            public com.liferay.portal.model.Contact findByCompanyId_Last(
115                    long companyId,
116                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator)
117                    throws com.liferay.portal.NoSuchContactException;
118    
119            /**
120            * Returns the last contact in the ordered set where companyId = &#63;.
121            *
122            * @param companyId the company ID
123            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
124            * @return the last matching contact, or <code>null</code> if a matching contact could not be found
125            */
126            public com.liferay.portal.model.Contact fetchByCompanyId_Last(
127                    long companyId,
128                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator);
129    
130            /**
131            * Returns the contacts before and after the current contact in the ordered set where companyId = &#63;.
132            *
133            * @param contactId the primary key of the current contact
134            * @param companyId the company ID
135            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
136            * @return the previous, current, and next contact
137            * @throws com.liferay.portal.NoSuchContactException if a contact with the primary key could not be found
138            */
139            public com.liferay.portal.model.Contact[] findByCompanyId_PrevAndNext(
140                    long contactId, long companyId,
141                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator)
142                    throws com.liferay.portal.NoSuchContactException;
143    
144            /**
145            * Removes all the contacts where companyId = &#63; from the database.
146            *
147            * @param companyId the company ID
148            */
149            public void removeByCompanyId(long companyId);
150    
151            /**
152            * Returns the number of contacts where companyId = &#63;.
153            *
154            * @param companyId the company ID
155            * @return the number of matching contacts
156            */
157            public int countByCompanyId(long companyId);
158    
159            /**
160            * Returns all the contacts where accountId = &#63;.
161            *
162            * @param accountId the account ID
163            * @return the matching contacts
164            */
165            public java.util.List<com.liferay.portal.model.Contact> findByAccountId(
166                    long accountId);
167    
168            /**
169            * Returns a range of all the contacts where accountId = &#63;.
170            *
171            * <p>
172            * 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.
173            * </p>
174            *
175            * @param accountId the account ID
176            * @param start the lower bound of the range of contacts
177            * @param end the upper bound of the range of contacts (not inclusive)
178            * @return the range of matching contacts
179            */
180            public java.util.List<com.liferay.portal.model.Contact> findByAccountId(
181                    long accountId, int start, int end);
182    
183            /**
184            * Returns an ordered range of all the contacts where accountId = &#63;.
185            *
186            * <p>
187            * 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.
188            * </p>
189            *
190            * @param accountId the account ID
191            * @param start the lower bound of the range of contacts
192            * @param end the upper bound of the range of contacts (not inclusive)
193            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
194            * @return the ordered range of matching contacts
195            */
196            public java.util.List<com.liferay.portal.model.Contact> findByAccountId(
197                    long accountId, int start, int end,
198                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator);
199    
200            /**
201            * Returns the first contact in the ordered set where accountId = &#63;.
202            *
203            * @param accountId the account ID
204            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
205            * @return the first matching contact
206            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
207            */
208            public com.liferay.portal.model.Contact findByAccountId_First(
209                    long accountId,
210                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator)
211                    throws com.liferay.portal.NoSuchContactException;
212    
213            /**
214            * Returns the first contact in the ordered set where accountId = &#63;.
215            *
216            * @param accountId the account ID
217            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
218            * @return the first matching contact, or <code>null</code> if a matching contact could not be found
219            */
220            public com.liferay.portal.model.Contact fetchByAccountId_First(
221                    long accountId,
222                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator);
223    
224            /**
225            * Returns the last contact in the ordered set where accountId = &#63;.
226            *
227            * @param accountId the account ID
228            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
229            * @return the last matching contact
230            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
231            */
232            public com.liferay.portal.model.Contact findByAccountId_Last(
233                    long accountId,
234                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator)
235                    throws com.liferay.portal.NoSuchContactException;
236    
237            /**
238            * Returns the last contact in the ordered set where accountId = &#63;.
239            *
240            * @param accountId the account ID
241            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
242            * @return the last matching contact, or <code>null</code> if a matching contact could not be found
243            */
244            public com.liferay.portal.model.Contact fetchByAccountId_Last(
245                    long accountId,
246                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator);
247    
248            /**
249            * Returns the contacts before and after the current contact in the ordered set where accountId = &#63;.
250            *
251            * @param contactId the primary key of the current contact
252            * @param accountId the account ID
253            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
254            * @return the previous, current, and next contact
255            * @throws com.liferay.portal.NoSuchContactException if a contact with the primary key could not be found
256            */
257            public com.liferay.portal.model.Contact[] findByAccountId_PrevAndNext(
258                    long contactId, long accountId,
259                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator)
260                    throws com.liferay.portal.NoSuchContactException;
261    
262            /**
263            * Removes all the contacts where accountId = &#63; from the database.
264            *
265            * @param accountId the account ID
266            */
267            public void removeByAccountId(long accountId);
268    
269            /**
270            * Returns the number of contacts where accountId = &#63;.
271            *
272            * @param accountId the account ID
273            * @return the number of matching contacts
274            */
275            public int countByAccountId(long accountId);
276    
277            /**
278            * Returns all the contacts where classNameId = &#63; and classPK = &#63;.
279            *
280            * @param classNameId the class name ID
281            * @param classPK the class p k
282            * @return the matching contacts
283            */
284            public java.util.List<com.liferay.portal.model.Contact> findByC_C(
285                    long classNameId, long classPK);
286    
287            /**
288            * Returns a range of all the contacts where classNameId = &#63; and classPK = &#63;.
289            *
290            * <p>
291            * 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.
292            * </p>
293            *
294            * @param classNameId the class name ID
295            * @param classPK the class p k
296            * @param start the lower bound of the range of contacts
297            * @param end the upper bound of the range of contacts (not inclusive)
298            * @return the range of matching contacts
299            */
300            public java.util.List<com.liferay.portal.model.Contact> findByC_C(
301                    long classNameId, long classPK, int start, int end);
302    
303            /**
304            * Returns an ordered range of all the contacts where classNameId = &#63; and classPK = &#63;.
305            *
306            * <p>
307            * 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.
308            * </p>
309            *
310            * @param classNameId the class name ID
311            * @param classPK the class p k
312            * @param start the lower bound of the range of contacts
313            * @param end the upper bound of the range of contacts (not inclusive)
314            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
315            * @return the ordered range of matching contacts
316            */
317            public java.util.List<com.liferay.portal.model.Contact> findByC_C(
318                    long classNameId, long classPK, int start, int end,
319                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator);
320    
321            /**
322            * Returns the first contact in the ordered set where classNameId = &#63; and classPK = &#63;.
323            *
324            * @param classNameId the class name ID
325            * @param classPK the class p k
326            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
327            * @return the first matching contact
328            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
329            */
330            public com.liferay.portal.model.Contact findByC_C_First(long classNameId,
331                    long classPK,
332                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator)
333                    throws com.liferay.portal.NoSuchContactException;
334    
335            /**
336            * Returns the first contact in the ordered set where classNameId = &#63; and classPK = &#63;.
337            *
338            * @param classNameId the class name ID
339            * @param classPK the class p k
340            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
341            * @return the first matching contact, or <code>null</code> if a matching contact could not be found
342            */
343            public com.liferay.portal.model.Contact fetchByC_C_First(long classNameId,
344                    long classPK,
345                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator);
346    
347            /**
348            * Returns the last contact in the ordered set where classNameId = &#63; and classPK = &#63;.
349            *
350            * @param classNameId the class name ID
351            * @param classPK the class p k
352            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
353            * @return the last matching contact
354            * @throws com.liferay.portal.NoSuchContactException if a matching contact could not be found
355            */
356            public com.liferay.portal.model.Contact findByC_C_Last(long classNameId,
357                    long classPK,
358                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator)
359                    throws com.liferay.portal.NoSuchContactException;
360    
361            /**
362            * Returns the last contact in the ordered set where classNameId = &#63; and classPK = &#63;.
363            *
364            * @param classNameId the class name ID
365            * @param classPK the class p k
366            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
367            * @return the last matching contact, or <code>null</code> if a matching contact could not be found
368            */
369            public com.liferay.portal.model.Contact fetchByC_C_Last(long classNameId,
370                    long classPK,
371                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator);
372    
373            /**
374            * Returns the contacts before and after the current contact in the ordered set where classNameId = &#63; and classPK = &#63;.
375            *
376            * @param contactId the primary key of the current contact
377            * @param classNameId the class name ID
378            * @param classPK the class p k
379            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
380            * @return the previous, current, and next contact
381            * @throws com.liferay.portal.NoSuchContactException if a contact with the primary key could not be found
382            */
383            public com.liferay.portal.model.Contact[] findByC_C_PrevAndNext(
384                    long contactId, long classNameId, long classPK,
385                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator)
386                    throws com.liferay.portal.NoSuchContactException;
387    
388            /**
389            * Removes all the contacts where classNameId = &#63; and classPK = &#63; from the database.
390            *
391            * @param classNameId the class name ID
392            * @param classPK the class p k
393            */
394            public void removeByC_C(long classNameId, long classPK);
395    
396            /**
397            * Returns the number of contacts where classNameId = &#63; and classPK = &#63;.
398            *
399            * @param classNameId the class name ID
400            * @param classPK the class p k
401            * @return the number of matching contacts
402            */
403            public int countByC_C(long classNameId, long classPK);
404    
405            /**
406            * Caches the contact in the entity cache if it is enabled.
407            *
408            * @param contact the contact
409            */
410            public void cacheResult(com.liferay.portal.model.Contact contact);
411    
412            /**
413            * Caches the contacts in the entity cache if it is enabled.
414            *
415            * @param contacts the contacts
416            */
417            public void cacheResult(
418                    java.util.List<com.liferay.portal.model.Contact> contacts);
419    
420            /**
421            * Creates a new contact with the primary key. Does not add the contact to the database.
422            *
423            * @param contactId the primary key for the new contact
424            * @return the new contact
425            */
426            public com.liferay.portal.model.Contact create(long contactId);
427    
428            /**
429            * Removes the contact with the primary key from the database. Also notifies the appropriate model listeners.
430            *
431            * @param contactId the primary key of the contact
432            * @return the contact that was removed
433            * @throws com.liferay.portal.NoSuchContactException if a contact with the primary key could not be found
434            */
435            public com.liferay.portal.model.Contact remove(long contactId)
436                    throws com.liferay.portal.NoSuchContactException;
437    
438            public com.liferay.portal.model.Contact updateImpl(
439                    com.liferay.portal.model.Contact contact);
440    
441            /**
442            * Returns the contact with the primary key or throws a {@link com.liferay.portal.NoSuchContactException} if it could not be found.
443            *
444            * @param contactId the primary key of the contact
445            * @return the contact
446            * @throws com.liferay.portal.NoSuchContactException if a contact with the primary key could not be found
447            */
448            public com.liferay.portal.model.Contact findByPrimaryKey(long contactId)
449                    throws com.liferay.portal.NoSuchContactException;
450    
451            /**
452            * Returns the contact with the primary key or returns <code>null</code> if it could not be found.
453            *
454            * @param contactId the primary key of the contact
455            * @return the contact, or <code>null</code> if a contact with the primary key could not be found
456            */
457            public com.liferay.portal.model.Contact fetchByPrimaryKey(long contactId);
458    
459            @Override
460            public java.util.Map<java.io.Serializable, com.liferay.portal.model.Contact> fetchByPrimaryKeys(
461                    java.util.Set<java.io.Serializable> primaryKeys);
462    
463            /**
464            * Returns all the contacts.
465            *
466            * @return the contacts
467            */
468            public java.util.List<com.liferay.portal.model.Contact> findAll();
469    
470            /**
471            * Returns a range of all the contacts.
472            *
473            * <p>
474            * 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.
475            * </p>
476            *
477            * @param start the lower bound of the range of contacts
478            * @param end the upper bound of the range of contacts (not inclusive)
479            * @return the range of contacts
480            */
481            public java.util.List<com.liferay.portal.model.Contact> findAll(int start,
482                    int end);
483    
484            /**
485            * Returns an ordered range of all the contacts.
486            *
487            * <p>
488            * 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.
489            * </p>
490            *
491            * @param start the lower bound of the range of contacts
492            * @param end the upper bound of the range of contacts (not inclusive)
493            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
494            * @return the ordered range of contacts
495            */
496            public java.util.List<com.liferay.portal.model.Contact> findAll(int start,
497                    int end,
498                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Contact> orderByComparator);
499    
500            /**
501            * Removes all the contacts from the database.
502            */
503            public void removeAll();
504    
505            /**
506            * Returns the number of contacts.
507            *
508            * @return the number of contacts
509            */
510            public int countAll();
511    }