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