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