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