001    /**
002     * Copyright (c) 2000-2010 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.Phone;
018    
019    /**
020     * The persistence interface for the phone service.
021     *
022     * <p>
023     * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface.
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see PhonePersistenceImpl
028     * @see PhoneUtil
029     * @generated
030     */
031    public interface PhonePersistence extends BasePersistence<Phone> {
032            /**
033            * Caches the phone in the entity cache if it is enabled.
034            *
035            * @param phone the phone to cache
036            */
037            public void cacheResult(com.liferay.portal.model.Phone phone);
038    
039            /**
040            * Caches the phones in the entity cache if it is enabled.
041            *
042            * @param phones the phones to cache
043            */
044            public void cacheResult(
045                    java.util.List<com.liferay.portal.model.Phone> phones);
046    
047            /**
048            * Creates a new phone with the primary key.
049            *
050            * @param phoneId the primary key for the new phone
051            * @return the new phone
052            */
053            public com.liferay.portal.model.Phone create(long phoneId);
054    
055            /**
056            * Removes the phone with the primary key from the database. Also notifies the appropriate model listeners.
057            *
058            * @param phoneId the primary key of the phone to remove
059            * @return the phone that was removed
060            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
061            * @throws SystemException if a system exception occurred
062            */
063            public com.liferay.portal.model.Phone remove(long phoneId)
064                    throws com.liferay.portal.NoSuchPhoneException,
065                            com.liferay.portal.kernel.exception.SystemException;
066    
067            public com.liferay.portal.model.Phone updateImpl(
068                    com.liferay.portal.model.Phone phone, boolean merge)
069                    throws com.liferay.portal.kernel.exception.SystemException;
070    
071            /**
072            * Finds the phone with the primary key or throws a {@link com.liferay.portal.NoSuchPhoneException} if it could not be found.
073            *
074            * @param phoneId the primary key of the phone to find
075            * @return the phone
076            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
077            * @throws SystemException if a system exception occurred
078            */
079            public com.liferay.portal.model.Phone findByPrimaryKey(long phoneId)
080                    throws com.liferay.portal.NoSuchPhoneException,
081                            com.liferay.portal.kernel.exception.SystemException;
082    
083            /**
084            * Finds the phone with the primary key or returns <code>null</code> if it could not be found.
085            *
086            * @param phoneId the primary key of the phone to find
087            * @return the phone, or <code>null</code> if a phone with the primary key could not be found
088            * @throws SystemException if a system exception occurred
089            */
090            public com.liferay.portal.model.Phone fetchByPrimaryKey(long phoneId)
091                    throws com.liferay.portal.kernel.exception.SystemException;
092    
093            /**
094            * Finds all the phones where companyId = &#63;.
095            *
096            * @param companyId the company id to search with
097            * @return the matching phones
098            * @throws SystemException if a system exception occurred
099            */
100            public java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
101                    long companyId)
102                    throws com.liferay.portal.kernel.exception.SystemException;
103    
104            /**
105            * Finds a range of all the phones where companyId = &#63;.
106            *
107            * <p>
108            * 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.
109            * </p>
110            *
111            * @param companyId the company id to search with
112            * @param start the lower bound of the range of phones to return
113            * @param end the upper bound of the range of phones to return (not inclusive)
114            * @return the range of matching phones
115            * @throws SystemException if a system exception occurred
116            */
117            public java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
118                    long companyId, int start, int end)
119                    throws com.liferay.portal.kernel.exception.SystemException;
120    
121            /**
122            * Finds an ordered range of all the phones where companyId = &#63;.
123            *
124            * <p>
125            * 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.
126            * </p>
127            *
128            * @param companyId the company id to search with
129            * @param start the lower bound of the range of phones to return
130            * @param end the upper bound of the range of phones to return (not inclusive)
131            * @param orderByComparator the comparator to order the results by
132            * @return the ordered range of matching phones
133            * @throws SystemException if a system exception occurred
134            */
135            public java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
136                    long companyId, int start, int end,
137                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
138                    throws com.liferay.portal.kernel.exception.SystemException;
139    
140            /**
141            * Finds the first phone in the ordered set where companyId = &#63;.
142            *
143            * <p>
144            * 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.
145            * </p>
146            *
147            * @param companyId the company id to search with
148            * @param orderByComparator the comparator to order the set by
149            * @return the first matching phone
150            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            public com.liferay.portal.model.Phone findByCompanyId_First(
154                    long companyId,
155                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156                    throws com.liferay.portal.NoSuchPhoneException,
157                            com.liferay.portal.kernel.exception.SystemException;
158    
159            /**
160            * Finds the last phone in the ordered set where companyId = &#63;.
161            *
162            * <p>
163            * 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.
164            * </p>
165            *
166            * @param companyId the company id to search with
167            * @param orderByComparator the comparator to order the set by
168            * @return the last matching phone
169            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public com.liferay.portal.model.Phone findByCompanyId_Last(long companyId,
173                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
174                    throws com.liferay.portal.NoSuchPhoneException,
175                            com.liferay.portal.kernel.exception.SystemException;
176    
177            /**
178            * Finds the phones before and after the current phone in the ordered set where companyId = &#63;.
179            *
180            * <p>
181            * 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.
182            * </p>
183            *
184            * @param phoneId the primary key of the current phone
185            * @param companyId the company id to search with
186            * @param orderByComparator the comparator to order the set by
187            * @return the previous, current, and next phone
188            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
189            * @throws SystemException if a system exception occurred
190            */
191            public com.liferay.portal.model.Phone[] findByCompanyId_PrevAndNext(
192                    long phoneId, long companyId,
193                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194                    throws com.liferay.portal.NoSuchPhoneException,
195                            com.liferay.portal.kernel.exception.SystemException;
196    
197            /**
198            * Finds all the phones where userId = &#63;.
199            *
200            * @param userId the user id to search with
201            * @return the matching phones
202            * @throws SystemException if a system exception occurred
203            */
204            public java.util.List<com.liferay.portal.model.Phone> findByUserId(
205                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
206    
207            /**
208            * Finds a range of all the phones where userId = &#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.
212            * </p>
213            *
214            * @param userId the user id to search with
215            * @param start the lower bound of the range of phones to return
216            * @param end the upper bound of the range of phones to return (not inclusive)
217            * @return the range of matching phones
218            * @throws SystemException if a system exception occurred
219            */
220            public java.util.List<com.liferay.portal.model.Phone> findByUserId(
221                    long userId, int start, int end)
222                    throws com.liferay.portal.kernel.exception.SystemException;
223    
224            /**
225            * Finds an ordered range of all the phones where userId = &#63;.
226            *
227            * <p>
228            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
229            * </p>
230            *
231            * @param userId the user id to search with
232            * @param start the lower bound of the range of phones to return
233            * @param end the upper bound of the range of phones to return (not inclusive)
234            * @param orderByComparator the comparator to order the results by
235            * @return the ordered range of matching phones
236            * @throws SystemException if a system exception occurred
237            */
238            public java.util.List<com.liferay.portal.model.Phone> findByUserId(
239                    long userId, int start, int end,
240                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
241                    throws com.liferay.portal.kernel.exception.SystemException;
242    
243            /**
244            * Finds the first phone in the ordered set where userId = &#63;.
245            *
246            * <p>
247            * 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.
248            * </p>
249            *
250            * @param userId the user id to search with
251            * @param orderByComparator the comparator to order the set by
252            * @return the first matching phone
253            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
254            * @throws SystemException if a system exception occurred
255            */
256            public com.liferay.portal.model.Phone findByUserId_First(long userId,
257                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
258                    throws com.liferay.portal.NoSuchPhoneException,
259                            com.liferay.portal.kernel.exception.SystemException;
260    
261            /**
262            * Finds the last phone in the ordered set where userId = &#63;.
263            *
264            * <p>
265            * 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.
266            * </p>
267            *
268            * @param userId the user id to search with
269            * @param orderByComparator the comparator to order the set by
270            * @return the last matching phone
271            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
272            * @throws SystemException if a system exception occurred
273            */
274            public com.liferay.portal.model.Phone findByUserId_Last(long userId,
275                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
276                    throws com.liferay.portal.NoSuchPhoneException,
277                            com.liferay.portal.kernel.exception.SystemException;
278    
279            /**
280            * Finds the phones before and after the current phone in the ordered set where userId = &#63;.
281            *
282            * <p>
283            * 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.
284            * </p>
285            *
286            * @param phoneId the primary key of the current phone
287            * @param userId the user id to search with
288            * @param orderByComparator the comparator to order the set by
289            * @return the previous, current, and next phone
290            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
291            * @throws SystemException if a system exception occurred
292            */
293            public com.liferay.portal.model.Phone[] findByUserId_PrevAndNext(
294                    long phoneId, long userId,
295                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
296                    throws com.liferay.portal.NoSuchPhoneException,
297                            com.liferay.portal.kernel.exception.SystemException;
298    
299            /**
300            * Finds all the phones where companyId = &#63; and classNameId = &#63;.
301            *
302            * @param companyId the company id to search with
303            * @param classNameId the class name id to search with
304            * @return the matching phones
305            * @throws SystemException if a system exception occurred
306            */
307            public java.util.List<com.liferay.portal.model.Phone> findByC_C(
308                    long companyId, long classNameId)
309                    throws com.liferay.portal.kernel.exception.SystemException;
310    
311            /**
312            * Finds a range of all the phones where companyId = &#63; and classNameId = &#63;.
313            *
314            * <p>
315            * 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.
316            * </p>
317            *
318            * @param companyId the company id to search with
319            * @param classNameId the class name id to search with
320            * @param start the lower bound of the range of phones to return
321            * @param end the upper bound of the range of phones to return (not inclusive)
322            * @return the range of matching phones
323            * @throws SystemException if a system exception occurred
324            */
325            public java.util.List<com.liferay.portal.model.Phone> findByC_C(
326                    long companyId, long classNameId, int start, int end)
327                    throws com.liferay.portal.kernel.exception.SystemException;
328    
329            /**
330            * Finds an ordered range of all the phones where companyId = &#63; and classNameId = &#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.
334            * </p>
335            *
336            * @param companyId the company id to search with
337            * @param classNameId the class name id to search with
338            * @param start the lower bound of the range of phones to return
339            * @param end the upper bound of the range of phones to return (not inclusive)
340            * @param orderByComparator the comparator to order the results by
341            * @return the ordered range of matching phones
342            * @throws SystemException if a system exception occurred
343            */
344            public java.util.List<com.liferay.portal.model.Phone> findByC_C(
345                    long companyId, long classNameId, int start, int end,
346                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
347                    throws com.liferay.portal.kernel.exception.SystemException;
348    
349            /**
350            * Finds the first phone in the ordered set where companyId = &#63; and classNameId = &#63;.
351            *
352            * <p>
353            * 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.
354            * </p>
355            *
356            * @param companyId the company id to search with
357            * @param classNameId the class name id to search with
358            * @param orderByComparator the comparator to order the set by
359            * @return the first matching phone
360            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
361            * @throws SystemException if a system exception occurred
362            */
363            public com.liferay.portal.model.Phone findByC_C_First(long companyId,
364                    long classNameId,
365                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
366                    throws com.liferay.portal.NoSuchPhoneException,
367                            com.liferay.portal.kernel.exception.SystemException;
368    
369            /**
370            * Finds the last phone in the ordered set where companyId = &#63; and classNameId = &#63;.
371            *
372            * <p>
373            * 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.
374            * </p>
375            *
376            * @param companyId the company id to search with
377            * @param classNameId the class name id to search with
378            * @param orderByComparator the comparator to order the set by
379            * @return the last matching phone
380            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
381            * @throws SystemException if a system exception occurred
382            */
383            public com.liferay.portal.model.Phone findByC_C_Last(long companyId,
384                    long classNameId,
385                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
386                    throws com.liferay.portal.NoSuchPhoneException,
387                            com.liferay.portal.kernel.exception.SystemException;
388    
389            /**
390            * Finds the phones before and after the current phone in the ordered set where companyId = &#63; and classNameId = &#63;.
391            *
392            * <p>
393            * 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.
394            * </p>
395            *
396            * @param phoneId the primary key of the current phone
397            * @param companyId the company id to search with
398            * @param classNameId the class name id to search with
399            * @param orderByComparator the comparator to order the set by
400            * @return the previous, current, and next phone
401            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
402            * @throws SystemException if a system exception occurred
403            */
404            public com.liferay.portal.model.Phone[] findByC_C_PrevAndNext(
405                    long phoneId, long companyId, long classNameId,
406                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
407                    throws com.liferay.portal.NoSuchPhoneException,
408                            com.liferay.portal.kernel.exception.SystemException;
409    
410            /**
411            * Finds all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
412            *
413            * @param companyId the company id to search with
414            * @param classNameId the class name id to search with
415            * @param classPK the class p k to search with
416            * @return the matching phones
417            * @throws SystemException if a system exception occurred
418            */
419            public java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
420                    long companyId, long classNameId, long classPK)
421                    throws com.liferay.portal.kernel.exception.SystemException;
422    
423            /**
424            * Finds a range of all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
425            *
426            * <p>
427            * 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.
428            * </p>
429            *
430            * @param companyId the company id to search with
431            * @param classNameId the class name id to search with
432            * @param classPK the class p k to search with
433            * @param start the lower bound of the range of phones to return
434            * @param end the upper bound of the range of phones to return (not inclusive)
435            * @return the range of matching phones
436            * @throws SystemException if a system exception occurred
437            */
438            public java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
439                    long companyId, long classNameId, long classPK, int start, int end)
440                    throws com.liferay.portal.kernel.exception.SystemException;
441    
442            /**
443            * Finds an ordered range of all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
444            *
445            * <p>
446            * 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.
447            * </p>
448            *
449            * @param companyId the company id to search with
450            * @param classNameId the class name id to search with
451            * @param classPK the class p k to search with
452            * @param start the lower bound of the range of phones to return
453            * @param end the upper bound of the range of phones to return (not inclusive)
454            * @param orderByComparator the comparator to order the results by
455            * @return the ordered range of matching phones
456            * @throws SystemException if a system exception occurred
457            */
458            public java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
459                    long companyId, long classNameId, long classPK, int start, int end,
460                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
461                    throws com.liferay.portal.kernel.exception.SystemException;
462    
463            /**
464            * Finds the first phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
465            *
466            * <p>
467            * 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.
468            * </p>
469            *
470            * @param companyId the company id to search with
471            * @param classNameId the class name id to search with
472            * @param classPK the class p k to search with
473            * @param orderByComparator the comparator to order the set by
474            * @return the first matching phone
475            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
476            * @throws SystemException if a system exception occurred
477            */
478            public com.liferay.portal.model.Phone findByC_C_C_First(long companyId,
479                    long classNameId, long classPK,
480                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
481                    throws com.liferay.portal.NoSuchPhoneException,
482                            com.liferay.portal.kernel.exception.SystemException;
483    
484            /**
485            * Finds the last phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
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.
489            * </p>
490            *
491            * @param companyId the company id to search with
492            * @param classNameId the class name id to search with
493            * @param classPK the class p k to search with
494            * @param orderByComparator the comparator to order the set by
495            * @return the last matching phone
496            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
497            * @throws SystemException if a system exception occurred
498            */
499            public com.liferay.portal.model.Phone findByC_C_C_Last(long companyId,
500                    long classNameId, long classPK,
501                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
502                    throws com.liferay.portal.NoSuchPhoneException,
503                            com.liferay.portal.kernel.exception.SystemException;
504    
505            /**
506            * Finds the phones before and after the current phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
507            *
508            * <p>
509            * 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.
510            * </p>
511            *
512            * @param phoneId the primary key of the current phone
513            * @param companyId the company id to search with
514            * @param classNameId the class name id to search with
515            * @param classPK the class p k to search with
516            * @param orderByComparator the comparator to order the set by
517            * @return the previous, current, and next phone
518            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
519            * @throws SystemException if a system exception occurred
520            */
521            public com.liferay.portal.model.Phone[] findByC_C_C_PrevAndNext(
522                    long phoneId, long companyId, long classNameId, long classPK,
523                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
524                    throws com.liferay.portal.NoSuchPhoneException,
525                            com.liferay.portal.kernel.exception.SystemException;
526    
527            /**
528            * Finds all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
529            *
530            * @param companyId the company id to search with
531            * @param classNameId the class name id to search with
532            * @param classPK the class p k to search with
533            * @param primary the primary to search with
534            * @return the matching phones
535            * @throws SystemException if a system exception occurred
536            */
537            public java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
538                    long companyId, long classNameId, long classPK, boolean primary)
539                    throws com.liferay.portal.kernel.exception.SystemException;
540    
541            /**
542            * Finds a range of all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
543            *
544            * <p>
545            * 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.
546            * </p>
547            *
548            * @param companyId the company id to search with
549            * @param classNameId the class name id to search with
550            * @param classPK the class p k to search with
551            * @param primary the primary to search with
552            * @param start the lower bound of the range of phones to return
553            * @param end the upper bound of the range of phones to return (not inclusive)
554            * @return the range of matching phones
555            * @throws SystemException if a system exception occurred
556            */
557            public java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
558                    long companyId, long classNameId, long classPK, boolean primary,
559                    int start, int end)
560                    throws com.liferay.portal.kernel.exception.SystemException;
561    
562            /**
563            * Finds an ordered range of all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
564            *
565            * <p>
566            * 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.
567            * </p>
568            *
569            * @param companyId the company id to search with
570            * @param classNameId the class name id to search with
571            * @param classPK the class p k to search with
572            * @param primary the primary to search with
573            * @param start the lower bound of the range of phones to return
574            * @param end the upper bound of the range of phones to return (not inclusive)
575            * @param orderByComparator the comparator to order the results by
576            * @return the ordered range of matching phones
577            * @throws SystemException if a system exception occurred
578            */
579            public java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
580                    long companyId, long classNameId, long classPK, boolean primary,
581                    int start, int end,
582                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
583                    throws com.liferay.portal.kernel.exception.SystemException;
584    
585            /**
586            * Finds the first phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
587            *
588            * <p>
589            * 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.
590            * </p>
591            *
592            * @param companyId the company id to search with
593            * @param classNameId the class name id to search with
594            * @param classPK the class p k to search with
595            * @param primary the primary to search with
596            * @param orderByComparator the comparator to order the set by
597            * @return the first matching phone
598            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
599            * @throws SystemException if a system exception occurred
600            */
601            public com.liferay.portal.model.Phone findByC_C_C_P_First(long companyId,
602                    long classNameId, long classPK, boolean primary,
603                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
604                    throws com.liferay.portal.NoSuchPhoneException,
605                            com.liferay.portal.kernel.exception.SystemException;
606    
607            /**
608            * Finds the last phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
609            *
610            * <p>
611            * 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.
612            * </p>
613            *
614            * @param companyId the company id to search with
615            * @param classNameId the class name id to search with
616            * @param classPK the class p k to search with
617            * @param primary the primary to search with
618            * @param orderByComparator the comparator to order the set by
619            * @return the last matching phone
620            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
621            * @throws SystemException if a system exception occurred
622            */
623            public com.liferay.portal.model.Phone findByC_C_C_P_Last(long companyId,
624                    long classNameId, long classPK, boolean primary,
625                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
626                    throws com.liferay.portal.NoSuchPhoneException,
627                            com.liferay.portal.kernel.exception.SystemException;
628    
629            /**
630            * Finds the phones before and after the current phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
631            *
632            * <p>
633            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
634            * </p>
635            *
636            * @param phoneId the primary key of the current phone
637            * @param companyId the company id to search with
638            * @param classNameId the class name id to search with
639            * @param classPK the class p k to search with
640            * @param primary the primary to search with
641            * @param orderByComparator the comparator to order the set by
642            * @return the previous, current, and next phone
643            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
644            * @throws SystemException if a system exception occurred
645            */
646            public com.liferay.portal.model.Phone[] findByC_C_C_P_PrevAndNext(
647                    long phoneId, long companyId, long classNameId, long classPK,
648                    boolean primary,
649                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
650                    throws com.liferay.portal.NoSuchPhoneException,
651                            com.liferay.portal.kernel.exception.SystemException;
652    
653            /**
654            * Finds all the phones.
655            *
656            * @return the phones
657            * @throws SystemException if a system exception occurred
658            */
659            public java.util.List<com.liferay.portal.model.Phone> findAll()
660                    throws com.liferay.portal.kernel.exception.SystemException;
661    
662            /**
663            * Finds a range of all the phones.
664            *
665            * <p>
666            * 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.
667            * </p>
668            *
669            * @param start the lower bound of the range of phones to return
670            * @param end the upper bound of the range of phones to return (not inclusive)
671            * @return the range of phones
672            * @throws SystemException if a system exception occurred
673            */
674            public java.util.List<com.liferay.portal.model.Phone> findAll(int start,
675                    int end) throws com.liferay.portal.kernel.exception.SystemException;
676    
677            /**
678            * Finds an ordered range of all the phones.
679            *
680            * <p>
681            * 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.
682            * </p>
683            *
684            * @param start the lower bound of the range of phones to return
685            * @param end the upper bound of the range of phones to return (not inclusive)
686            * @param orderByComparator the comparator to order the results by
687            * @return the ordered range of phones
688            * @throws SystemException if a system exception occurred
689            */
690            public java.util.List<com.liferay.portal.model.Phone> findAll(int start,
691                    int end,
692                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
693                    throws com.liferay.portal.kernel.exception.SystemException;
694    
695            /**
696            * Removes all the phones where companyId = &#63; from the database.
697            *
698            * @param companyId the company id to search with
699            * @throws SystemException if a system exception occurred
700            */
701            public void removeByCompanyId(long companyId)
702                    throws com.liferay.portal.kernel.exception.SystemException;
703    
704            /**
705            * Removes all the phones where userId = &#63; from the database.
706            *
707            * @param userId the user id to search with
708            * @throws SystemException if a system exception occurred
709            */
710            public void removeByUserId(long userId)
711                    throws com.liferay.portal.kernel.exception.SystemException;
712    
713            /**
714            * Removes all the phones where companyId = &#63; and classNameId = &#63; from the database.
715            *
716            * @param companyId the company id to search with
717            * @param classNameId the class name id to search with
718            * @throws SystemException if a system exception occurred
719            */
720            public void removeByC_C(long companyId, long classNameId)
721                    throws com.liferay.portal.kernel.exception.SystemException;
722    
723            /**
724            * Removes all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
725            *
726            * @param companyId the company id to search with
727            * @param classNameId the class name id to search with
728            * @param classPK the class p k to search with
729            * @throws SystemException if a system exception occurred
730            */
731            public void removeByC_C_C(long companyId, long classNameId, long classPK)
732                    throws com.liferay.portal.kernel.exception.SystemException;
733    
734            /**
735            * Removes all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63; from the database.
736            *
737            * @param companyId the company id to search with
738            * @param classNameId the class name id to search with
739            * @param classPK the class p k to search with
740            * @param primary the primary to search with
741            * @throws SystemException if a system exception occurred
742            */
743            public void removeByC_C_C_P(long companyId, long classNameId, long classPK,
744                    boolean primary)
745                    throws com.liferay.portal.kernel.exception.SystemException;
746    
747            /**
748            * Removes all the phones from the database.
749            *
750            * @throws SystemException if a system exception occurred
751            */
752            public void removeAll()
753                    throws com.liferay.portal.kernel.exception.SystemException;
754    
755            /**
756            * Counts all the phones where companyId = &#63;.
757            *
758            * @param companyId the company id to search with
759            * @return the number of matching phones
760            * @throws SystemException if a system exception occurred
761            */
762            public int countByCompanyId(long companyId)
763                    throws com.liferay.portal.kernel.exception.SystemException;
764    
765            /**
766            * Counts all the phones where userId = &#63;.
767            *
768            * @param userId the user id to search with
769            * @return the number of matching phones
770            * @throws SystemException if a system exception occurred
771            */
772            public int countByUserId(long userId)
773                    throws com.liferay.portal.kernel.exception.SystemException;
774    
775            /**
776            * Counts all the phones where companyId = &#63; and classNameId = &#63;.
777            *
778            * @param companyId the company id to search with
779            * @param classNameId the class name id to search with
780            * @return the number of matching phones
781            * @throws SystemException if a system exception occurred
782            */
783            public int countByC_C(long companyId, long classNameId)
784                    throws com.liferay.portal.kernel.exception.SystemException;
785    
786            /**
787            * Counts all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
788            *
789            * @param companyId the company id to search with
790            * @param classNameId the class name id to search with
791            * @param classPK the class p k to search with
792            * @return the number of matching phones
793            * @throws SystemException if a system exception occurred
794            */
795            public int countByC_C_C(long companyId, long classNameId, long classPK)
796                    throws com.liferay.portal.kernel.exception.SystemException;
797    
798            /**
799            * Counts all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
800            *
801            * @param companyId the company id to search with
802            * @param classNameId the class name id to search with
803            * @param classPK the class p k to search with
804            * @param primary the primary to search with
805            * @return the number of matching phones
806            * @throws SystemException if a system exception occurred
807            */
808            public int countByC_C_C_P(long companyId, long classNameId, long classPK,
809                    boolean primary)
810                    throws com.liferay.portal.kernel.exception.SystemException;
811    
812            /**
813            * Counts all the phones.
814            *
815            * @return the number of phones
816            * @throws SystemException if a system exception occurred
817            */
818            public int countAll()
819                    throws com.liferay.portal.kernel.exception.SystemException;
820    }