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