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