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