001    /**
002     * Copyright (c) 2000-2013 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.exception.SystemException;
022    import com.liferay.portal.kernel.util.OrderByComparator;
023    import com.liferay.portal.kernel.util.ReferenceRegistry;
024    import com.liferay.portal.model.Phone;
025    import com.liferay.portal.service.ServiceContext;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the phone service. This utility wraps {@link PhonePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
031     *
032     * <p>
033     * Caching information and settings can be found in <code>portal.properties</code>
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see PhonePersistence
038     * @see PhonePersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class PhoneUtil {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
047             */
048    
049            /**
050             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
051             */
052            public static void clearCache() {
053                    getPersistence().clearCache();
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
058             */
059            public static void clearCache(Phone phone) {
060                    getPersistence().clearCache(phone);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
065             */
066            public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
067                    throws SystemException {
068                    return getPersistence().countWithDynamicQuery(dynamicQuery);
069            }
070    
071            /**
072             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
073             */
074            public static List<Phone> findWithDynamicQuery(DynamicQuery dynamicQuery)
075                    throws SystemException {
076                    return getPersistence().findWithDynamicQuery(dynamicQuery);
077            }
078    
079            /**
080             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
081             */
082            public static List<Phone> findWithDynamicQuery(DynamicQuery dynamicQuery,
083                    int start, int end) throws SystemException {
084                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
085            }
086    
087            /**
088             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
089             */
090            public static List<Phone> findWithDynamicQuery(DynamicQuery dynamicQuery,
091                    int start, int end, OrderByComparator orderByComparator)
092                    throws SystemException {
093                    return getPersistence()
094                                       .findWithDynamicQuery(dynamicQuery, start, end,
095                            orderByComparator);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
100             */
101            public static Phone update(Phone phone) throws SystemException {
102                    return getPersistence().update(phone);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
107             */
108            public static Phone update(Phone phone, ServiceContext serviceContext)
109                    throws SystemException {
110                    return getPersistence().update(phone, serviceContext);
111            }
112    
113            /**
114            * Returns all the phones where uuid = &#63;.
115            *
116            * @param uuid the uuid
117            * @return the matching phones
118            * @throws SystemException if a system exception occurred
119            */
120            public static java.util.List<com.liferay.portal.model.Phone> findByUuid(
121                    java.lang.String uuid)
122                    throws com.liferay.portal.kernel.exception.SystemException {
123                    return getPersistence().findByUuid(uuid);
124            }
125    
126            /**
127            * Returns a range of all the phones where uuid = &#63;.
128            *
129            * <p>
130            * 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.
131            * </p>
132            *
133            * @param uuid the uuid
134            * @param start the lower bound of the range of phones
135            * @param end the upper bound of the range of phones (not inclusive)
136            * @return the range of matching phones
137            * @throws SystemException if a system exception occurred
138            */
139            public static java.util.List<com.liferay.portal.model.Phone> findByUuid(
140                    java.lang.String uuid, int start, int end)
141                    throws com.liferay.portal.kernel.exception.SystemException {
142                    return getPersistence().findByUuid(uuid, start, end);
143            }
144    
145            /**
146            * Returns an ordered range of all the phones where uuid = &#63;.
147            *
148            * <p>
149            * 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.
150            * </p>
151            *
152            * @param uuid the uuid
153            * @param start the lower bound of the range of phones
154            * @param end the upper bound of the range of phones (not inclusive)
155            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
156            * @return the ordered range of matching phones
157            * @throws SystemException if a system exception occurred
158            */
159            public static java.util.List<com.liferay.portal.model.Phone> findByUuid(
160                    java.lang.String uuid, int start, int end,
161                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
164            }
165    
166            /**
167            * Returns the first phone in the ordered set where uuid = &#63;.
168            *
169            * @param uuid the uuid
170            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
171            * @return the first matching phone
172            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portal.model.Phone findByUuid_First(
176                    java.lang.String uuid,
177                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178                    throws com.liferay.portal.NoSuchPhoneException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getPersistence().findByUuid_First(uuid, orderByComparator);
181            }
182    
183            /**
184            * Returns the first phone in the ordered set where uuid = &#63;.
185            *
186            * @param uuid the uuid
187            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
188            * @return the first matching phone, or <code>null</code> if a matching phone could not be found
189            * @throws SystemException if a system exception occurred
190            */
191            public static com.liferay.portal.model.Phone fetchByUuid_First(
192                    java.lang.String uuid,
193                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
196            }
197    
198            /**
199            * Returns the last phone in the ordered set where uuid = &#63;.
200            *
201            * @param uuid the uuid
202            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
203            * @return the last matching phone
204            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
205            * @throws SystemException if a system exception occurred
206            */
207            public static com.liferay.portal.model.Phone findByUuid_Last(
208                    java.lang.String uuid,
209                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210                    throws com.liferay.portal.NoSuchPhoneException,
211                            com.liferay.portal.kernel.exception.SystemException {
212                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
213            }
214    
215            /**
216            * Returns the last phone in the ordered set where uuid = &#63;.
217            *
218            * @param uuid the uuid
219            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
220            * @return the last matching phone, or <code>null</code> if a matching phone could not be found
221            * @throws SystemException if a system exception occurred
222            */
223            public static com.liferay.portal.model.Phone fetchByUuid_Last(
224                    java.lang.String uuid,
225                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
228            }
229    
230            /**
231            * Returns the phones before and after the current phone in the ordered set where uuid = &#63;.
232            *
233            * @param phoneId the primary key of the current phone
234            * @param uuid the uuid
235            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
236            * @return the previous, current, and next phone
237            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
238            * @throws SystemException if a system exception occurred
239            */
240            public static com.liferay.portal.model.Phone[] findByUuid_PrevAndNext(
241                    long phoneId, java.lang.String uuid,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.NoSuchPhoneException,
244                            com.liferay.portal.kernel.exception.SystemException {
245                    return getPersistence()
246                                       .findByUuid_PrevAndNext(phoneId, uuid, orderByComparator);
247            }
248    
249            /**
250            * Removes all the phones where uuid = &#63; from the database.
251            *
252            * @param uuid the uuid
253            * @throws SystemException if a system exception occurred
254            */
255            public static void removeByUuid(java.lang.String uuid)
256                    throws com.liferay.portal.kernel.exception.SystemException {
257                    getPersistence().removeByUuid(uuid);
258            }
259    
260            /**
261            * Returns the number of phones where uuid = &#63;.
262            *
263            * @param uuid the uuid
264            * @return the number of matching phones
265            * @throws SystemException if a system exception occurred
266            */
267            public static int countByUuid(java.lang.String uuid)
268                    throws com.liferay.portal.kernel.exception.SystemException {
269                    return getPersistence().countByUuid(uuid);
270            }
271    
272            /**
273            * Returns all the phones where uuid = &#63; and companyId = &#63;.
274            *
275            * @param uuid the uuid
276            * @param companyId the company ID
277            * @return the matching phones
278            * @throws SystemException if a system exception occurred
279            */
280            public static java.util.List<com.liferay.portal.model.Phone> findByUuid_C(
281                    java.lang.String uuid, long companyId)
282                    throws com.liferay.portal.kernel.exception.SystemException {
283                    return getPersistence().findByUuid_C(uuid, companyId);
284            }
285    
286            /**
287            * Returns a range of all the phones where uuid = &#63; and companyId = &#63;.
288            *
289            * <p>
290            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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.
291            * </p>
292            *
293            * @param uuid the uuid
294            * @param companyId the company ID
295            * @param start the lower bound of the range of phones
296            * @param end the upper bound of the range of phones (not inclusive)
297            * @return the range of matching phones
298            * @throws SystemException if a system exception occurred
299            */
300            public static java.util.List<com.liferay.portal.model.Phone> findByUuid_C(
301                    java.lang.String uuid, long companyId, int start, int end)
302                    throws com.liferay.portal.kernel.exception.SystemException {
303                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
304            }
305    
306            /**
307            * Returns an ordered range of all the phones where uuid = &#63; and companyId = &#63;.
308            *
309            * <p>
310            * 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.
311            * </p>
312            *
313            * @param uuid the uuid
314            * @param companyId the company ID
315            * @param start the lower bound of the range of phones
316            * @param end the upper bound of the range of phones (not inclusive)
317            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
318            * @return the ordered range of matching phones
319            * @throws SystemException if a system exception occurred
320            */
321            public static java.util.List<com.liferay.portal.model.Phone> findByUuid_C(
322                    java.lang.String uuid, long companyId, int start, int end,
323                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
324                    throws com.liferay.portal.kernel.exception.SystemException {
325                    return getPersistence()
326                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
327            }
328    
329            /**
330            * Returns the first phone in the ordered set where uuid = &#63; and companyId = &#63;.
331            *
332            * @param uuid the uuid
333            * @param companyId the company ID
334            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
335            * @return the first matching phone
336            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
337            * @throws SystemException if a system exception occurred
338            */
339            public static com.liferay.portal.model.Phone findByUuid_C_First(
340                    java.lang.String uuid, long companyId,
341                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
342                    throws com.liferay.portal.NoSuchPhoneException,
343                            com.liferay.portal.kernel.exception.SystemException {
344                    return getPersistence()
345                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
346            }
347    
348            /**
349            * Returns the first phone in the ordered set where uuid = &#63; and companyId = &#63;.
350            *
351            * @param uuid the uuid
352            * @param companyId the company ID
353            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
354            * @return the first matching phone, or <code>null</code> if a matching phone could not be found
355            * @throws SystemException if a system exception occurred
356            */
357            public static com.liferay.portal.model.Phone fetchByUuid_C_First(
358                    java.lang.String uuid, long companyId,
359                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence()
362                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
363            }
364    
365            /**
366            * Returns the last phone in the ordered set where uuid = &#63; and companyId = &#63;.
367            *
368            * @param uuid the uuid
369            * @param companyId the company ID
370            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
371            * @return the last matching phone
372            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
373            * @throws SystemException if a system exception occurred
374            */
375            public static com.liferay.portal.model.Phone findByUuid_C_Last(
376                    java.lang.String uuid, long companyId,
377                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
378                    throws com.liferay.portal.NoSuchPhoneException,
379                            com.liferay.portal.kernel.exception.SystemException {
380                    return getPersistence()
381                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
382            }
383    
384            /**
385            * Returns the last phone in the ordered set where uuid = &#63; and companyId = &#63;.
386            *
387            * @param uuid the uuid
388            * @param companyId the company ID
389            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
390            * @return the last matching phone, or <code>null</code> if a matching phone could not be found
391            * @throws SystemException if a system exception occurred
392            */
393            public static com.liferay.portal.model.Phone fetchByUuid_C_Last(
394                    java.lang.String uuid, long companyId,
395                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
396                    throws com.liferay.portal.kernel.exception.SystemException {
397                    return getPersistence()
398                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
399            }
400    
401            /**
402            * Returns the phones before and after the current phone in the ordered set where uuid = &#63; and companyId = &#63;.
403            *
404            * @param phoneId the primary key of the current phone
405            * @param uuid the uuid
406            * @param companyId the company ID
407            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
408            * @return the previous, current, and next phone
409            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
410            * @throws SystemException if a system exception occurred
411            */
412            public static com.liferay.portal.model.Phone[] findByUuid_C_PrevAndNext(
413                    long phoneId, java.lang.String uuid, long companyId,
414                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415                    throws com.liferay.portal.NoSuchPhoneException,
416                            com.liferay.portal.kernel.exception.SystemException {
417                    return getPersistence()
418                                       .findByUuid_C_PrevAndNext(phoneId, uuid, companyId,
419                            orderByComparator);
420            }
421    
422            /**
423            * Removes all the phones where uuid = &#63; and companyId = &#63; from the database.
424            *
425            * @param uuid the uuid
426            * @param companyId the company ID
427            * @throws SystemException if a system exception occurred
428            */
429            public static void removeByUuid_C(java.lang.String uuid, long companyId)
430                    throws com.liferay.portal.kernel.exception.SystemException {
431                    getPersistence().removeByUuid_C(uuid, companyId);
432            }
433    
434            /**
435            * Returns the number of phones where uuid = &#63; and companyId = &#63;.
436            *
437            * @param uuid the uuid
438            * @param companyId the company ID
439            * @return the number of matching phones
440            * @throws SystemException if a system exception occurred
441            */
442            public static int countByUuid_C(java.lang.String uuid, long companyId)
443                    throws com.liferay.portal.kernel.exception.SystemException {
444                    return getPersistence().countByUuid_C(uuid, companyId);
445            }
446    
447            /**
448            * Returns all the phones where companyId = &#63;.
449            *
450            * @param companyId the company ID
451            * @return the matching phones
452            * @throws SystemException if a system exception occurred
453            */
454            public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
455                    long companyId)
456                    throws com.liferay.portal.kernel.exception.SystemException {
457                    return getPersistence().findByCompanyId(companyId);
458            }
459    
460            /**
461            * Returns a range of all the phones where companyId = &#63;.
462            *
463            * <p>
464            * 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.
465            * </p>
466            *
467            * @param companyId the company ID
468            * @param start the lower bound of the range of phones
469            * @param end the upper bound of the range of phones (not inclusive)
470            * @return the range of matching phones
471            * @throws SystemException if a system exception occurred
472            */
473            public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
474                    long companyId, int start, int end)
475                    throws com.liferay.portal.kernel.exception.SystemException {
476                    return getPersistence().findByCompanyId(companyId, start, end);
477            }
478    
479            /**
480            * Returns an ordered range of all the phones where companyId = &#63;.
481            *
482            * <p>
483            * 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.
484            * </p>
485            *
486            * @param companyId the company ID
487            * @param start the lower bound of the range of phones
488            * @param end the upper bound of the range of phones (not inclusive)
489            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
490            * @return the ordered range of matching phones
491            * @throws SystemException if a system exception occurred
492            */
493            public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
494                    long companyId, int start, int end,
495                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
496                    throws com.liferay.portal.kernel.exception.SystemException {
497                    return getPersistence()
498                                       .findByCompanyId(companyId, start, end, orderByComparator);
499            }
500    
501            /**
502            * Returns the first phone in the ordered set where companyId = &#63;.
503            *
504            * @param companyId the company ID
505            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
506            * @return the first matching phone
507            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
508            * @throws SystemException if a system exception occurred
509            */
510            public static com.liferay.portal.model.Phone findByCompanyId_First(
511                    long companyId,
512                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
513                    throws com.liferay.portal.NoSuchPhoneException,
514                            com.liferay.portal.kernel.exception.SystemException {
515                    return getPersistence()
516                                       .findByCompanyId_First(companyId, orderByComparator);
517            }
518    
519            /**
520            * Returns the first phone in the ordered set where companyId = &#63;.
521            *
522            * @param companyId the company ID
523            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
524            * @return the first matching phone, or <code>null</code> if a matching phone could not be found
525            * @throws SystemException if a system exception occurred
526            */
527            public static com.liferay.portal.model.Phone fetchByCompanyId_First(
528                    long companyId,
529                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    return getPersistence()
532                                       .fetchByCompanyId_First(companyId, orderByComparator);
533            }
534    
535            /**
536            * Returns the last phone in the ordered set where companyId = &#63;.
537            *
538            * @param companyId the company ID
539            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
540            * @return the last matching phone
541            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
542            * @throws SystemException if a system exception occurred
543            */
544            public static com.liferay.portal.model.Phone findByCompanyId_Last(
545                    long companyId,
546                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
547                    throws com.liferay.portal.NoSuchPhoneException,
548                            com.liferay.portal.kernel.exception.SystemException {
549                    return getPersistence()
550                                       .findByCompanyId_Last(companyId, orderByComparator);
551            }
552    
553            /**
554            * Returns the last phone in the ordered set where companyId = &#63;.
555            *
556            * @param companyId the company ID
557            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
558            * @return the last matching phone, or <code>null</code> if a matching phone could not be found
559            * @throws SystemException if a system exception occurred
560            */
561            public static com.liferay.portal.model.Phone fetchByCompanyId_Last(
562                    long companyId,
563                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
564                    throws com.liferay.portal.kernel.exception.SystemException {
565                    return getPersistence()
566                                       .fetchByCompanyId_Last(companyId, orderByComparator);
567            }
568    
569            /**
570            * Returns the phones before and after the current phone in the ordered set where companyId = &#63;.
571            *
572            * @param phoneId the primary key of the current phone
573            * @param companyId the company ID
574            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
575            * @return the previous, current, and next phone
576            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
577            * @throws SystemException if a system exception occurred
578            */
579            public static com.liferay.portal.model.Phone[] findByCompanyId_PrevAndNext(
580                    long phoneId, long companyId,
581                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
582                    throws com.liferay.portal.NoSuchPhoneException,
583                            com.liferay.portal.kernel.exception.SystemException {
584                    return getPersistence()
585                                       .findByCompanyId_PrevAndNext(phoneId, companyId,
586                            orderByComparator);
587            }
588    
589            /**
590            * Removes all the phones where companyId = &#63; from the database.
591            *
592            * @param companyId the company ID
593            * @throws SystemException if a system exception occurred
594            */
595            public static void removeByCompanyId(long companyId)
596                    throws com.liferay.portal.kernel.exception.SystemException {
597                    getPersistence().removeByCompanyId(companyId);
598            }
599    
600            /**
601            * Returns the number of phones where companyId = &#63;.
602            *
603            * @param companyId the company ID
604            * @return the number of matching phones
605            * @throws SystemException if a system exception occurred
606            */
607            public static int countByCompanyId(long companyId)
608                    throws com.liferay.portal.kernel.exception.SystemException {
609                    return getPersistence().countByCompanyId(companyId);
610            }
611    
612            /**
613            * Returns all the phones where userId = &#63;.
614            *
615            * @param userId the user ID
616            * @return the matching phones
617            * @throws SystemException if a system exception occurred
618            */
619            public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
620                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
621                    return getPersistence().findByUserId(userId);
622            }
623    
624            /**
625            * Returns a range of all the phones where userId = &#63;.
626            *
627            * <p>
628            * 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.
629            * </p>
630            *
631            * @param userId the user ID
632            * @param start the lower bound of the range of phones
633            * @param end the upper bound of the range of phones (not inclusive)
634            * @return the range of matching phones
635            * @throws SystemException if a system exception occurred
636            */
637            public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
638                    long userId, int start, int end)
639                    throws com.liferay.portal.kernel.exception.SystemException {
640                    return getPersistence().findByUserId(userId, start, end);
641            }
642    
643            /**
644            * Returns an ordered range of all the phones where userId = &#63;.
645            *
646            * <p>
647            * 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.
648            * </p>
649            *
650            * @param userId the user ID
651            * @param start the lower bound of the range of phones
652            * @param end the upper bound of the range of phones (not inclusive)
653            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
654            * @return the ordered range of matching phones
655            * @throws SystemException if a system exception occurred
656            */
657            public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
658                    long userId, int start, int end,
659                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
660                    throws com.liferay.portal.kernel.exception.SystemException {
661                    return getPersistence()
662                                       .findByUserId(userId, start, end, orderByComparator);
663            }
664    
665            /**
666            * Returns the first phone in the ordered set where userId = &#63;.
667            *
668            * @param userId the user ID
669            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
670            * @return the first matching phone
671            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
672            * @throws SystemException if a system exception occurred
673            */
674            public static com.liferay.portal.model.Phone findByUserId_First(
675                    long userId,
676                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
677                    throws com.liferay.portal.NoSuchPhoneException,
678                            com.liferay.portal.kernel.exception.SystemException {
679                    return getPersistence().findByUserId_First(userId, orderByComparator);
680            }
681    
682            /**
683            * Returns the first phone in the ordered set where userId = &#63;.
684            *
685            * @param userId the user ID
686            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
687            * @return the first matching phone, or <code>null</code> if a matching phone could not be found
688            * @throws SystemException if a system exception occurred
689            */
690            public static com.liferay.portal.model.Phone fetchByUserId_First(
691                    long userId,
692                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
693                    throws com.liferay.portal.kernel.exception.SystemException {
694                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
695            }
696    
697            /**
698            * Returns the last phone in the ordered set where userId = &#63;.
699            *
700            * @param userId the user ID
701            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
702            * @return the last matching phone
703            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
704            * @throws SystemException if a system exception occurred
705            */
706            public static com.liferay.portal.model.Phone findByUserId_Last(
707                    long userId,
708                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
709                    throws com.liferay.portal.NoSuchPhoneException,
710                            com.liferay.portal.kernel.exception.SystemException {
711                    return getPersistence().findByUserId_Last(userId, orderByComparator);
712            }
713    
714            /**
715            * Returns the last phone in the ordered set where userId = &#63;.
716            *
717            * @param userId the user ID
718            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
719            * @return the last matching phone, or <code>null</code> if a matching phone could not be found
720            * @throws SystemException if a system exception occurred
721            */
722            public static com.liferay.portal.model.Phone fetchByUserId_Last(
723                    long userId,
724                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
725                    throws com.liferay.portal.kernel.exception.SystemException {
726                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
727            }
728    
729            /**
730            * Returns the phones before and after the current phone in the ordered set where userId = &#63;.
731            *
732            * @param phoneId the primary key of the current phone
733            * @param userId the user ID
734            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
735            * @return the previous, current, and next phone
736            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
737            * @throws SystemException if a system exception occurred
738            */
739            public static com.liferay.portal.model.Phone[] findByUserId_PrevAndNext(
740                    long phoneId, long userId,
741                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
742                    throws com.liferay.portal.NoSuchPhoneException,
743                            com.liferay.portal.kernel.exception.SystemException {
744                    return getPersistence()
745                                       .findByUserId_PrevAndNext(phoneId, userId, orderByComparator);
746            }
747    
748            /**
749            * Removes all the phones where userId = &#63; from the database.
750            *
751            * @param userId the user ID
752            * @throws SystemException if a system exception occurred
753            */
754            public static void removeByUserId(long userId)
755                    throws com.liferay.portal.kernel.exception.SystemException {
756                    getPersistence().removeByUserId(userId);
757            }
758    
759            /**
760            * Returns the number of phones where userId = &#63;.
761            *
762            * @param userId the user ID
763            * @return the number of matching phones
764            * @throws SystemException if a system exception occurred
765            */
766            public static int countByUserId(long userId)
767                    throws com.liferay.portal.kernel.exception.SystemException {
768                    return getPersistence().countByUserId(userId);
769            }
770    
771            /**
772            * Returns all the phones where companyId = &#63; and classNameId = &#63;.
773            *
774            * @param companyId the company ID
775            * @param classNameId the class name ID
776            * @return the matching phones
777            * @throws SystemException if a system exception occurred
778            */
779            public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
780                    long companyId, long classNameId)
781                    throws com.liferay.portal.kernel.exception.SystemException {
782                    return getPersistence().findByC_C(companyId, classNameId);
783            }
784    
785            /**
786            * Returns a range of all the phones where companyId = &#63; and classNameId = &#63;.
787            *
788            * <p>
789            * 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.
790            * </p>
791            *
792            * @param companyId the company ID
793            * @param classNameId the class name ID
794            * @param start the lower bound of the range of phones
795            * @param end the upper bound of the range of phones (not inclusive)
796            * @return the range of matching phones
797            * @throws SystemException if a system exception occurred
798            */
799            public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
800                    long companyId, long classNameId, int start, int end)
801                    throws com.liferay.portal.kernel.exception.SystemException {
802                    return getPersistence().findByC_C(companyId, classNameId, start, end);
803            }
804    
805            /**
806            * Returns an ordered range of all the phones where companyId = &#63; and classNameId = &#63;.
807            *
808            * <p>
809            * 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.
810            * </p>
811            *
812            * @param companyId the company ID
813            * @param classNameId the class name ID
814            * @param start the lower bound of the range of phones
815            * @param end the upper bound of the range of phones (not inclusive)
816            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
817            * @return the ordered range of matching phones
818            * @throws SystemException if a system exception occurred
819            */
820            public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
821                    long companyId, long classNameId, int start, int end,
822                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
823                    throws com.liferay.portal.kernel.exception.SystemException {
824                    return getPersistence()
825                                       .findByC_C(companyId, classNameId, start, end,
826                            orderByComparator);
827            }
828    
829            /**
830            * Returns the first phone in the ordered set where companyId = &#63; and classNameId = &#63;.
831            *
832            * @param companyId the company ID
833            * @param classNameId the class name ID
834            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
835            * @return the first matching phone
836            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
837            * @throws SystemException if a system exception occurred
838            */
839            public static com.liferay.portal.model.Phone findByC_C_First(
840                    long companyId, long classNameId,
841                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
842                    throws com.liferay.portal.NoSuchPhoneException,
843                            com.liferay.portal.kernel.exception.SystemException {
844                    return getPersistence()
845                                       .findByC_C_First(companyId, classNameId, orderByComparator);
846            }
847    
848            /**
849            * Returns the first phone in the ordered set where companyId = &#63; and classNameId = &#63;.
850            *
851            * @param companyId the company ID
852            * @param classNameId the class name ID
853            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
854            * @return the first matching phone, or <code>null</code> if a matching phone could not be found
855            * @throws SystemException if a system exception occurred
856            */
857            public static com.liferay.portal.model.Phone fetchByC_C_First(
858                    long companyId, long classNameId,
859                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
860                    throws com.liferay.portal.kernel.exception.SystemException {
861                    return getPersistence()
862                                       .fetchByC_C_First(companyId, classNameId, orderByComparator);
863            }
864    
865            /**
866            * Returns the last phone in the ordered set where companyId = &#63; and classNameId = &#63;.
867            *
868            * @param companyId the company ID
869            * @param classNameId the class name ID
870            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
871            * @return the last matching phone
872            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
873            * @throws SystemException if a system exception occurred
874            */
875            public static com.liferay.portal.model.Phone findByC_C_Last(
876                    long companyId, long classNameId,
877                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
878                    throws com.liferay.portal.NoSuchPhoneException,
879                            com.liferay.portal.kernel.exception.SystemException {
880                    return getPersistence()
881                                       .findByC_C_Last(companyId, classNameId, orderByComparator);
882            }
883    
884            /**
885            * Returns the last phone in the ordered set where companyId = &#63; and classNameId = &#63;.
886            *
887            * @param companyId the company ID
888            * @param classNameId the class name ID
889            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
890            * @return the last matching phone, or <code>null</code> if a matching phone could not be found
891            * @throws SystemException if a system exception occurred
892            */
893            public static com.liferay.portal.model.Phone fetchByC_C_Last(
894                    long companyId, long classNameId,
895                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
896                    throws com.liferay.portal.kernel.exception.SystemException {
897                    return getPersistence()
898                                       .fetchByC_C_Last(companyId, classNameId, orderByComparator);
899            }
900    
901            /**
902            * Returns the phones before and after the current phone in the ordered set where companyId = &#63; and classNameId = &#63;.
903            *
904            * @param phoneId the primary key of the current phone
905            * @param companyId the company ID
906            * @param classNameId the class name ID
907            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
908            * @return the previous, current, and next phone
909            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
910            * @throws SystemException if a system exception occurred
911            */
912            public static com.liferay.portal.model.Phone[] findByC_C_PrevAndNext(
913                    long phoneId, long companyId, long classNameId,
914                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
915                    throws com.liferay.portal.NoSuchPhoneException,
916                            com.liferay.portal.kernel.exception.SystemException {
917                    return getPersistence()
918                                       .findByC_C_PrevAndNext(phoneId, companyId, classNameId,
919                            orderByComparator);
920            }
921    
922            /**
923            * Removes all the phones where companyId = &#63; and classNameId = &#63; from the database.
924            *
925            * @param companyId the company ID
926            * @param classNameId the class name ID
927            * @throws SystemException if a system exception occurred
928            */
929            public static void removeByC_C(long companyId, long classNameId)
930                    throws com.liferay.portal.kernel.exception.SystemException {
931                    getPersistence().removeByC_C(companyId, classNameId);
932            }
933    
934            /**
935            * Returns the number of phones where companyId = &#63; and classNameId = &#63;.
936            *
937            * @param companyId the company ID
938            * @param classNameId the class name ID
939            * @return the number of matching phones
940            * @throws SystemException if a system exception occurred
941            */
942            public static int countByC_C(long companyId, long classNameId)
943                    throws com.liferay.portal.kernel.exception.SystemException {
944                    return getPersistence().countByC_C(companyId, classNameId);
945            }
946    
947            /**
948            * Returns all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
949            *
950            * @param companyId the company ID
951            * @param classNameId the class name ID
952            * @param classPK the class p k
953            * @return the matching phones
954            * @throws SystemException if a system exception occurred
955            */
956            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
957                    long companyId, long classNameId, long classPK)
958                    throws com.liferay.portal.kernel.exception.SystemException {
959                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
960            }
961    
962            /**
963            * Returns a range of all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
964            *
965            * <p>
966            * 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.
967            * </p>
968            *
969            * @param companyId the company ID
970            * @param classNameId the class name ID
971            * @param classPK the class p k
972            * @param start the lower bound of the range of phones
973            * @param end the upper bound of the range of phones (not inclusive)
974            * @return the range of matching phones
975            * @throws SystemException if a system exception occurred
976            */
977            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
978                    long companyId, long classNameId, long classPK, int start, int end)
979                    throws com.liferay.portal.kernel.exception.SystemException {
980                    return getPersistence()
981                                       .findByC_C_C(companyId, classNameId, classPK, start, end);
982            }
983    
984            /**
985            * Returns an ordered range of all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
986            *
987            * <p>
988            * 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.
989            * </p>
990            *
991            * @param companyId the company ID
992            * @param classNameId the class name ID
993            * @param classPK the class p k
994            * @param start the lower bound of the range of phones
995            * @param end the upper bound of the range of phones (not inclusive)
996            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
997            * @return the ordered range of matching phones
998            * @throws SystemException if a system exception occurred
999            */
1000            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
1001                    long companyId, long classNameId, long classPK, int start, int end,
1002                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1003                    throws com.liferay.portal.kernel.exception.SystemException {
1004                    return getPersistence()
1005                                       .findByC_C_C(companyId, classNameId, classPK, start, end,
1006                            orderByComparator);
1007            }
1008    
1009            /**
1010            * Returns the first phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1011            *
1012            * @param companyId the company ID
1013            * @param classNameId the class name ID
1014            * @param classPK the class p k
1015            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1016            * @return the first matching phone
1017            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
1018            * @throws SystemException if a system exception occurred
1019            */
1020            public static com.liferay.portal.model.Phone findByC_C_C_First(
1021                    long companyId, long classNameId, long classPK,
1022                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1023                    throws com.liferay.portal.NoSuchPhoneException,
1024                            com.liferay.portal.kernel.exception.SystemException {
1025                    return getPersistence()
1026                                       .findByC_C_C_First(companyId, classNameId, classPK,
1027                            orderByComparator);
1028            }
1029    
1030            /**
1031            * Returns the first phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1032            *
1033            * @param companyId the company ID
1034            * @param classNameId the class name ID
1035            * @param classPK the class p k
1036            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1037            * @return the first matching phone, or <code>null</code> if a matching phone could not be found
1038            * @throws SystemException if a system exception occurred
1039            */
1040            public static com.liferay.portal.model.Phone fetchByC_C_C_First(
1041                    long companyId, long classNameId, long classPK,
1042                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1043                    throws com.liferay.portal.kernel.exception.SystemException {
1044                    return getPersistence()
1045                                       .fetchByC_C_C_First(companyId, classNameId, classPK,
1046                            orderByComparator);
1047            }
1048    
1049            /**
1050            * Returns the last phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1051            *
1052            * @param companyId the company ID
1053            * @param classNameId the class name ID
1054            * @param classPK the class p k
1055            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1056            * @return the last matching phone
1057            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
1058            * @throws SystemException if a system exception occurred
1059            */
1060            public static com.liferay.portal.model.Phone findByC_C_C_Last(
1061                    long companyId, long classNameId, long classPK,
1062                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1063                    throws com.liferay.portal.NoSuchPhoneException,
1064                            com.liferay.portal.kernel.exception.SystemException {
1065                    return getPersistence()
1066                                       .findByC_C_C_Last(companyId, classNameId, classPK,
1067                            orderByComparator);
1068            }
1069    
1070            /**
1071            * Returns the last phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1072            *
1073            * @param companyId the company ID
1074            * @param classNameId the class name ID
1075            * @param classPK the class p k
1076            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1077            * @return the last matching phone, or <code>null</code> if a matching phone could not be found
1078            * @throws SystemException if a system exception occurred
1079            */
1080            public static com.liferay.portal.model.Phone fetchByC_C_C_Last(
1081                    long companyId, long classNameId, long classPK,
1082                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1083                    throws com.liferay.portal.kernel.exception.SystemException {
1084                    return getPersistence()
1085                                       .fetchByC_C_C_Last(companyId, classNameId, classPK,
1086                            orderByComparator);
1087            }
1088    
1089            /**
1090            * Returns the phones before and after the current phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1091            *
1092            * @param phoneId the primary key of the current phone
1093            * @param companyId the company ID
1094            * @param classNameId the class name ID
1095            * @param classPK the class p k
1096            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1097            * @return the previous, current, and next phone
1098            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
1099            * @throws SystemException if a system exception occurred
1100            */
1101            public static com.liferay.portal.model.Phone[] findByC_C_C_PrevAndNext(
1102                    long phoneId, long companyId, long classNameId, long classPK,
1103                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1104                    throws com.liferay.portal.NoSuchPhoneException,
1105                            com.liferay.portal.kernel.exception.SystemException {
1106                    return getPersistence()
1107                                       .findByC_C_C_PrevAndNext(phoneId, companyId, classNameId,
1108                            classPK, orderByComparator);
1109            }
1110    
1111            /**
1112            * Removes all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
1113            *
1114            * @param companyId the company ID
1115            * @param classNameId the class name ID
1116            * @param classPK the class p k
1117            * @throws SystemException if a system exception occurred
1118            */
1119            public static void removeByC_C_C(long companyId, long classNameId,
1120                    long classPK)
1121                    throws com.liferay.portal.kernel.exception.SystemException {
1122                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
1123            }
1124    
1125            /**
1126            * Returns the number of phones where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1127            *
1128            * @param companyId the company ID
1129            * @param classNameId the class name ID
1130            * @param classPK the class p k
1131            * @return the number of matching phones
1132            * @throws SystemException if a system exception occurred
1133            */
1134            public static int countByC_C_C(long companyId, long classNameId,
1135                    long classPK)
1136                    throws com.liferay.portal.kernel.exception.SystemException {
1137                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
1138            }
1139    
1140            /**
1141            * Returns all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1142            *
1143            * @param companyId the company ID
1144            * @param classNameId the class name ID
1145            * @param classPK the class p k
1146            * @param primary the primary
1147            * @return the matching phones
1148            * @throws SystemException if a system exception occurred
1149            */
1150            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
1151                    long companyId, long classNameId, long classPK, boolean primary)
1152                    throws com.liferay.portal.kernel.exception.SystemException {
1153                    return getPersistence()
1154                                       .findByC_C_C_P(companyId, classNameId, classPK, primary);
1155            }
1156    
1157            /**
1158            * Returns a range of all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1159            *
1160            * <p>
1161            * 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.
1162            * </p>
1163            *
1164            * @param companyId the company ID
1165            * @param classNameId the class name ID
1166            * @param classPK the class p k
1167            * @param primary the primary
1168            * @param start the lower bound of the range of phones
1169            * @param end the upper bound of the range of phones (not inclusive)
1170            * @return the range of matching phones
1171            * @throws SystemException if a system exception occurred
1172            */
1173            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
1174                    long companyId, long classNameId, long classPK, boolean primary,
1175                    int start, int end)
1176                    throws com.liferay.portal.kernel.exception.SystemException {
1177                    return getPersistence()
1178                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
1179                            start, end);
1180            }
1181    
1182            /**
1183            * Returns an ordered range of all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1184            *
1185            * <p>
1186            * 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.
1187            * </p>
1188            *
1189            * @param companyId the company ID
1190            * @param classNameId the class name ID
1191            * @param classPK the class p k
1192            * @param primary the primary
1193            * @param start the lower bound of the range of phones
1194            * @param end the upper bound of the range of phones (not inclusive)
1195            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1196            * @return the ordered range of matching phones
1197            * @throws SystemException if a system exception occurred
1198            */
1199            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
1200                    long companyId, long classNameId, long classPK, boolean primary,
1201                    int start, int end,
1202                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1203                    throws com.liferay.portal.kernel.exception.SystemException {
1204                    return getPersistence()
1205                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
1206                            start, end, orderByComparator);
1207            }
1208    
1209            /**
1210            * Returns the first phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1211            *
1212            * @param companyId the company ID
1213            * @param classNameId the class name ID
1214            * @param classPK the class p k
1215            * @param primary the primary
1216            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1217            * @return the first matching phone
1218            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
1219            * @throws SystemException if a system exception occurred
1220            */
1221            public static com.liferay.portal.model.Phone findByC_C_C_P_First(
1222                    long companyId, long classNameId, long classPK, boolean primary,
1223                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1224                    throws com.liferay.portal.NoSuchPhoneException,
1225                            com.liferay.portal.kernel.exception.SystemException {
1226                    return getPersistence()
1227                                       .findByC_C_C_P_First(companyId, classNameId, classPK,
1228                            primary, orderByComparator);
1229            }
1230    
1231            /**
1232            * Returns the first phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1233            *
1234            * @param companyId the company ID
1235            * @param classNameId the class name ID
1236            * @param classPK the class p k
1237            * @param primary the primary
1238            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1239            * @return the first matching phone, or <code>null</code> if a matching phone could not be found
1240            * @throws SystemException if a system exception occurred
1241            */
1242            public static com.liferay.portal.model.Phone fetchByC_C_C_P_First(
1243                    long companyId, long classNameId, long classPK, boolean primary,
1244                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1245                    throws com.liferay.portal.kernel.exception.SystemException {
1246                    return getPersistence()
1247                                       .fetchByC_C_C_P_First(companyId, classNameId, classPK,
1248                            primary, orderByComparator);
1249            }
1250    
1251            /**
1252            * Returns the last phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1253            *
1254            * @param companyId the company ID
1255            * @param classNameId the class name ID
1256            * @param classPK the class p k
1257            * @param primary the primary
1258            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1259            * @return the last matching phone
1260            * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found
1261            * @throws SystemException if a system exception occurred
1262            */
1263            public static com.liferay.portal.model.Phone findByC_C_C_P_Last(
1264                    long companyId, long classNameId, long classPK, boolean primary,
1265                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1266                    throws com.liferay.portal.NoSuchPhoneException,
1267                            com.liferay.portal.kernel.exception.SystemException {
1268                    return getPersistence()
1269                                       .findByC_C_C_P_Last(companyId, classNameId, classPK,
1270                            primary, orderByComparator);
1271            }
1272    
1273            /**
1274            * Returns the last phone in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1275            *
1276            * @param companyId the company ID
1277            * @param classNameId the class name ID
1278            * @param classPK the class p k
1279            * @param primary the primary
1280            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1281            * @return the last matching phone, or <code>null</code> if a matching phone could not be found
1282            * @throws SystemException if a system exception occurred
1283            */
1284            public static com.liferay.portal.model.Phone fetchByC_C_C_P_Last(
1285                    long companyId, long classNameId, long classPK, boolean primary,
1286                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1287                    throws com.liferay.portal.kernel.exception.SystemException {
1288                    return getPersistence()
1289                                       .fetchByC_C_C_P_Last(companyId, classNameId, classPK,
1290                            primary, orderByComparator);
1291            }
1292    
1293            /**
1294            * 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;.
1295            *
1296            * @param phoneId the primary key of the current phone
1297            * @param companyId the company ID
1298            * @param classNameId the class name ID
1299            * @param classPK the class p k
1300            * @param primary the primary
1301            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1302            * @return the previous, current, and next phone
1303            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
1304            * @throws SystemException if a system exception occurred
1305            */
1306            public static com.liferay.portal.model.Phone[] findByC_C_C_P_PrevAndNext(
1307                    long phoneId, long companyId, long classNameId, long classPK,
1308                    boolean primary,
1309                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1310                    throws com.liferay.portal.NoSuchPhoneException,
1311                            com.liferay.portal.kernel.exception.SystemException {
1312                    return getPersistence()
1313                                       .findByC_C_C_P_PrevAndNext(phoneId, companyId, classNameId,
1314                            classPK, primary, orderByComparator);
1315            }
1316    
1317            /**
1318            * Removes all the phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63; from the database.
1319            *
1320            * @param companyId the company ID
1321            * @param classNameId the class name ID
1322            * @param classPK the class p k
1323            * @param primary the primary
1324            * @throws SystemException if a system exception occurred
1325            */
1326            public static void removeByC_C_C_P(long companyId, long classNameId,
1327                    long classPK, boolean primary)
1328                    throws com.liferay.portal.kernel.exception.SystemException {
1329                    getPersistence()
1330                            .removeByC_C_C_P(companyId, classNameId, classPK, primary);
1331            }
1332    
1333            /**
1334            * Returns the number of phones where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1335            *
1336            * @param companyId the company ID
1337            * @param classNameId the class name ID
1338            * @param classPK the class p k
1339            * @param primary the primary
1340            * @return the number of matching phones
1341            * @throws SystemException if a system exception occurred
1342            */
1343            public static int countByC_C_C_P(long companyId, long classNameId,
1344                    long classPK, boolean primary)
1345                    throws com.liferay.portal.kernel.exception.SystemException {
1346                    return getPersistence()
1347                                       .countByC_C_C_P(companyId, classNameId, classPK, primary);
1348            }
1349    
1350            /**
1351            * Caches the phone in the entity cache if it is enabled.
1352            *
1353            * @param phone the phone
1354            */
1355            public static void cacheResult(com.liferay.portal.model.Phone phone) {
1356                    getPersistence().cacheResult(phone);
1357            }
1358    
1359            /**
1360            * Caches the phones in the entity cache if it is enabled.
1361            *
1362            * @param phones the phones
1363            */
1364            public static void cacheResult(
1365                    java.util.List<com.liferay.portal.model.Phone> phones) {
1366                    getPersistence().cacheResult(phones);
1367            }
1368    
1369            /**
1370            * Creates a new phone with the primary key. Does not add the phone to the database.
1371            *
1372            * @param phoneId the primary key for the new phone
1373            * @return the new phone
1374            */
1375            public static com.liferay.portal.model.Phone create(long phoneId) {
1376                    return getPersistence().create(phoneId);
1377            }
1378    
1379            /**
1380            * Removes the phone with the primary key from the database. Also notifies the appropriate model listeners.
1381            *
1382            * @param phoneId the primary key of the phone
1383            * @return the phone that was removed
1384            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
1385            * @throws SystemException if a system exception occurred
1386            */
1387            public static com.liferay.portal.model.Phone remove(long phoneId)
1388                    throws com.liferay.portal.NoSuchPhoneException,
1389                            com.liferay.portal.kernel.exception.SystemException {
1390                    return getPersistence().remove(phoneId);
1391            }
1392    
1393            public static com.liferay.portal.model.Phone updateImpl(
1394                    com.liferay.portal.model.Phone phone)
1395                    throws com.liferay.portal.kernel.exception.SystemException {
1396                    return getPersistence().updateImpl(phone);
1397            }
1398    
1399            /**
1400            * Returns the phone with the primary key or throws a {@link com.liferay.portal.NoSuchPhoneException} if it could not be found.
1401            *
1402            * @param phoneId the primary key of the phone
1403            * @return the phone
1404            * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found
1405            * @throws SystemException if a system exception occurred
1406            */
1407            public static com.liferay.portal.model.Phone findByPrimaryKey(long phoneId)
1408                    throws com.liferay.portal.NoSuchPhoneException,
1409                            com.liferay.portal.kernel.exception.SystemException {
1410                    return getPersistence().findByPrimaryKey(phoneId);
1411            }
1412    
1413            /**
1414            * Returns the phone with the primary key or returns <code>null</code> if it could not be found.
1415            *
1416            * @param phoneId the primary key of the phone
1417            * @return the phone, or <code>null</code> if a phone with the primary key could not be found
1418            * @throws SystemException if a system exception occurred
1419            */
1420            public static com.liferay.portal.model.Phone fetchByPrimaryKey(long phoneId)
1421                    throws com.liferay.portal.kernel.exception.SystemException {
1422                    return getPersistence().fetchByPrimaryKey(phoneId);
1423            }
1424    
1425            /**
1426            * Returns all the phones.
1427            *
1428            * @return the phones
1429            * @throws SystemException if a system exception occurred
1430            */
1431            public static java.util.List<com.liferay.portal.model.Phone> findAll()
1432                    throws com.liferay.portal.kernel.exception.SystemException {
1433                    return getPersistence().findAll();
1434            }
1435    
1436            /**
1437            * Returns a range of all the phones.
1438            *
1439            * <p>
1440            * 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.
1441            * </p>
1442            *
1443            * @param start the lower bound of the range of phones
1444            * @param end the upper bound of the range of phones (not inclusive)
1445            * @return the range of phones
1446            * @throws SystemException if a system exception occurred
1447            */
1448            public static java.util.List<com.liferay.portal.model.Phone> findAll(
1449                    int start, int end)
1450                    throws com.liferay.portal.kernel.exception.SystemException {
1451                    return getPersistence().findAll(start, end);
1452            }
1453    
1454            /**
1455            * Returns an ordered range of all the phones.
1456            *
1457            * <p>
1458            * 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.
1459            * </p>
1460            *
1461            * @param start the lower bound of the range of phones
1462            * @param end the upper bound of the range of phones (not inclusive)
1463            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1464            * @return the ordered range of phones
1465            * @throws SystemException if a system exception occurred
1466            */
1467            public static java.util.List<com.liferay.portal.model.Phone> findAll(
1468                    int start, int end,
1469                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1470                    throws com.liferay.portal.kernel.exception.SystemException {
1471                    return getPersistence().findAll(start, end, orderByComparator);
1472            }
1473    
1474            /**
1475            * Removes all the phones from the database.
1476            *
1477            * @throws SystemException if a system exception occurred
1478            */
1479            public static void removeAll()
1480                    throws com.liferay.portal.kernel.exception.SystemException {
1481                    getPersistence().removeAll();
1482            }
1483    
1484            /**
1485            * Returns the number of phones.
1486            *
1487            * @return the number of phones
1488            * @throws SystemException if a system exception occurred
1489            */
1490            public static int countAll()
1491                    throws com.liferay.portal.kernel.exception.SystemException {
1492                    return getPersistence().countAll();
1493            }
1494    
1495            public static PhonePersistence getPersistence() {
1496                    if (_persistence == null) {
1497                            _persistence = (PhonePersistence)PortalBeanLocatorUtil.locate(PhonePersistence.class.getName());
1498    
1499                            ReferenceRegistry.registerReference(PhoneUtil.class, "_persistence");
1500                    }
1501    
1502                    return _persistence;
1503            }
1504    
1505            /**
1506             * @deprecated As of 6.2.0
1507             */
1508            public void setPersistence(PhonePersistence persistence) {
1509            }
1510    
1511            private static PhonePersistence _persistence;
1512    }