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