001    /**
002     * Copyright (c) 2000-2010 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.model.Phone;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       PhonePersistence
029     * @see       PhonePersistenceImpl
030     * @generated
031     */
032    public class PhoneUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(Phone phone) {
044                    getPersistence().clearCache(phone);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<Phone> findWithDynamicQuery(DynamicQuery dynamicQuery)
059                    throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<Phone> findWithDynamicQuery(DynamicQuery dynamicQuery,
067                    int start, int end) throws SystemException {
068                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
069            }
070    
071            /**
072             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
073             */
074            public static List<Phone> findWithDynamicQuery(DynamicQuery dynamicQuery,
075                    int start, int end, OrderByComparator orderByComparator)
076                    throws SystemException {
077                    return getPersistence()
078                                       .findWithDynamicQuery(dynamicQuery, start, end,
079                            orderByComparator);
080            }
081    
082            /**
083             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
084             */
085            public static Phone remove(Phone phone) throws SystemException {
086                    return getPersistence().remove(phone);
087            }
088    
089            /**
090             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
091             */
092            public static Phone update(Phone phone, boolean merge)
093                    throws SystemException {
094                    return getPersistence().update(phone, merge);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
099             */
100            public static Phone update(Phone phone, boolean merge,
101                    ServiceContext serviceContext) throws SystemException {
102                    return getPersistence().update(phone, merge, serviceContext);
103            }
104    
105            public static void cacheResult(com.liferay.portal.model.Phone phone) {
106                    getPersistence().cacheResult(phone);
107            }
108    
109            public static void cacheResult(
110                    java.util.List<com.liferay.portal.model.Phone> phones) {
111                    getPersistence().cacheResult(phones);
112            }
113    
114            public static com.liferay.portal.model.Phone create(long phoneId) {
115                    return getPersistence().create(phoneId);
116            }
117    
118            public static com.liferay.portal.model.Phone remove(long phoneId)
119                    throws com.liferay.portal.NoSuchPhoneException,
120                            com.liferay.portal.kernel.exception.SystemException {
121                    return getPersistence().remove(phoneId);
122            }
123    
124            public static com.liferay.portal.model.Phone updateImpl(
125                    com.liferay.portal.model.Phone phone, boolean merge)
126                    throws com.liferay.portal.kernel.exception.SystemException {
127                    return getPersistence().updateImpl(phone, merge);
128            }
129    
130            public static com.liferay.portal.model.Phone findByPrimaryKey(long phoneId)
131                    throws com.liferay.portal.NoSuchPhoneException,
132                            com.liferay.portal.kernel.exception.SystemException {
133                    return getPersistence().findByPrimaryKey(phoneId);
134            }
135    
136            public static com.liferay.portal.model.Phone fetchByPrimaryKey(long phoneId)
137                    throws com.liferay.portal.kernel.exception.SystemException {
138                    return getPersistence().fetchByPrimaryKey(phoneId);
139            }
140    
141            public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
142                    long companyId)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    return getPersistence().findByCompanyId(companyId);
145            }
146    
147            public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
148                    long companyId, int start, int end)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return getPersistence().findByCompanyId(companyId, start, end);
151            }
152    
153            public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
154                    long companyId, int start, int end,
155                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156                    throws com.liferay.portal.kernel.exception.SystemException {
157                    return getPersistence()
158                                       .findByCompanyId(companyId, start, end, orderByComparator);
159            }
160    
161            public static com.liferay.portal.model.Phone findByCompanyId_First(
162                    long companyId,
163                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164                    throws com.liferay.portal.NoSuchPhoneException,
165                            com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence()
167                                       .findByCompanyId_First(companyId, orderByComparator);
168            }
169    
170            public static com.liferay.portal.model.Phone findByCompanyId_Last(
171                    long companyId,
172                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173                    throws com.liferay.portal.NoSuchPhoneException,
174                            com.liferay.portal.kernel.exception.SystemException {
175                    return getPersistence()
176                                       .findByCompanyId_Last(companyId, orderByComparator);
177            }
178    
179            public static com.liferay.portal.model.Phone[] findByCompanyId_PrevAndNext(
180                    long phoneId, long companyId,
181                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182                    throws com.liferay.portal.NoSuchPhoneException,
183                            com.liferay.portal.kernel.exception.SystemException {
184                    return getPersistence()
185                                       .findByCompanyId_PrevAndNext(phoneId, companyId,
186                            orderByComparator);
187            }
188    
189            public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
190                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence().findByUserId(userId);
192            }
193    
194            public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
195                    long userId, int start, int end)
196                    throws com.liferay.portal.kernel.exception.SystemException {
197                    return getPersistence().findByUserId(userId, start, end);
198            }
199    
200            public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
201                    long userId, int start, int end,
202                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203                    throws com.liferay.portal.kernel.exception.SystemException {
204                    return getPersistence()
205                                       .findByUserId(userId, start, end, orderByComparator);
206            }
207    
208            public static com.liferay.portal.model.Phone findByUserId_First(
209                    long userId,
210                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211                    throws com.liferay.portal.NoSuchPhoneException,
212                            com.liferay.portal.kernel.exception.SystemException {
213                    return getPersistence().findByUserId_First(userId, orderByComparator);
214            }
215    
216            public static com.liferay.portal.model.Phone findByUserId_Last(
217                    long userId,
218                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219                    throws com.liferay.portal.NoSuchPhoneException,
220                            com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence().findByUserId_Last(userId, orderByComparator);
222            }
223    
224            public static com.liferay.portal.model.Phone[] findByUserId_PrevAndNext(
225                    long phoneId, long userId,
226                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227                    throws com.liferay.portal.NoSuchPhoneException,
228                            com.liferay.portal.kernel.exception.SystemException {
229                    return getPersistence()
230                                       .findByUserId_PrevAndNext(phoneId, userId, orderByComparator);
231            }
232    
233            public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
234                    long companyId, long classNameId)
235                    throws com.liferay.portal.kernel.exception.SystemException {
236                    return getPersistence().findByC_C(companyId, classNameId);
237            }
238    
239            public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
240                    long companyId, long classNameId, int start, int end)
241                    throws com.liferay.portal.kernel.exception.SystemException {
242                    return getPersistence().findByC_C(companyId, classNameId, start, end);
243            }
244    
245            public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
246                    long companyId, long classNameId, int start, int end,
247                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
248                    throws com.liferay.portal.kernel.exception.SystemException {
249                    return getPersistence()
250                                       .findByC_C(companyId, classNameId, start, end,
251                            orderByComparator);
252            }
253    
254            public static com.liferay.portal.model.Phone findByC_C_First(
255                    long companyId, long classNameId,
256                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
257                    throws com.liferay.portal.NoSuchPhoneException,
258                            com.liferay.portal.kernel.exception.SystemException {
259                    return getPersistence()
260                                       .findByC_C_First(companyId, classNameId, orderByComparator);
261            }
262    
263            public static com.liferay.portal.model.Phone findByC_C_Last(
264                    long companyId, long classNameId,
265                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
266                    throws com.liferay.portal.NoSuchPhoneException,
267                            com.liferay.portal.kernel.exception.SystemException {
268                    return getPersistence()
269                                       .findByC_C_Last(companyId, classNameId, orderByComparator);
270            }
271    
272            public static com.liferay.portal.model.Phone[] findByC_C_PrevAndNext(
273                    long phoneId, long companyId, long classNameId,
274                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
275                    throws com.liferay.portal.NoSuchPhoneException,
276                            com.liferay.portal.kernel.exception.SystemException {
277                    return getPersistence()
278                                       .findByC_C_PrevAndNext(phoneId, companyId, classNameId,
279                            orderByComparator);
280            }
281    
282            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
283                    long companyId, long classNameId, long classPK)
284                    throws com.liferay.portal.kernel.exception.SystemException {
285                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
286            }
287    
288            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
289                    long companyId, long classNameId, long classPK, int start, int end)
290                    throws com.liferay.portal.kernel.exception.SystemException {
291                    return getPersistence()
292                                       .findByC_C_C(companyId, classNameId, classPK, start, end);
293            }
294    
295            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
296                    long companyId, long classNameId, long classPK, int start, int end,
297                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
298                    throws com.liferay.portal.kernel.exception.SystemException {
299                    return getPersistence()
300                                       .findByC_C_C(companyId, classNameId, classPK, start, end,
301                            orderByComparator);
302            }
303    
304            public static com.liferay.portal.model.Phone findByC_C_C_First(
305                    long companyId, long classNameId, long classPK,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.NoSuchPhoneException,
308                            com.liferay.portal.kernel.exception.SystemException {
309                    return getPersistence()
310                                       .findByC_C_C_First(companyId, classNameId, classPK,
311                            orderByComparator);
312            }
313    
314            public static com.liferay.portal.model.Phone findByC_C_C_Last(
315                    long companyId, long classNameId, long classPK,
316                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
317                    throws com.liferay.portal.NoSuchPhoneException,
318                            com.liferay.portal.kernel.exception.SystemException {
319                    return getPersistence()
320                                       .findByC_C_C_Last(companyId, classNameId, classPK,
321                            orderByComparator);
322            }
323    
324            public static com.liferay.portal.model.Phone[] findByC_C_C_PrevAndNext(
325                    long phoneId, long companyId, long classNameId, long classPK,
326                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
327                    throws com.liferay.portal.NoSuchPhoneException,
328                            com.liferay.portal.kernel.exception.SystemException {
329                    return getPersistence()
330                                       .findByC_C_C_PrevAndNext(phoneId, companyId, classNameId,
331                            classPK, orderByComparator);
332            }
333    
334            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
335                    long companyId, long classNameId, long classPK, boolean primary)
336                    throws com.liferay.portal.kernel.exception.SystemException {
337                    return getPersistence()
338                                       .findByC_C_C_P(companyId, classNameId, classPK, primary);
339            }
340    
341            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
342                    long companyId, long classNameId, long classPK, boolean primary,
343                    int start, int end)
344                    throws com.liferay.portal.kernel.exception.SystemException {
345                    return getPersistence()
346                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
347                            start, end);
348            }
349    
350            public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
351                    long companyId, long classNameId, long classPK, boolean primary,
352                    int start, int end,
353                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
354                    throws com.liferay.portal.kernel.exception.SystemException {
355                    return getPersistence()
356                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
357                            start, end, orderByComparator);
358            }
359    
360            public static com.liferay.portal.model.Phone findByC_C_C_P_First(
361                    long companyId, long classNameId, long classPK, boolean primary,
362                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
363                    throws com.liferay.portal.NoSuchPhoneException,
364                            com.liferay.portal.kernel.exception.SystemException {
365                    return getPersistence()
366                                       .findByC_C_C_P_First(companyId, classNameId, classPK,
367                            primary, orderByComparator);
368            }
369    
370            public static com.liferay.portal.model.Phone findByC_C_C_P_Last(
371                    long companyId, long classNameId, long classPK, boolean primary,
372                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
373                    throws com.liferay.portal.NoSuchPhoneException,
374                            com.liferay.portal.kernel.exception.SystemException {
375                    return getPersistence()
376                                       .findByC_C_C_P_Last(companyId, classNameId, classPK,
377                            primary, orderByComparator);
378            }
379    
380            public static com.liferay.portal.model.Phone[] findByC_C_C_P_PrevAndNext(
381                    long phoneId, long companyId, long classNameId, long classPK,
382                    boolean primary,
383                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
384                    throws com.liferay.portal.NoSuchPhoneException,
385                            com.liferay.portal.kernel.exception.SystemException {
386                    return getPersistence()
387                                       .findByC_C_C_P_PrevAndNext(phoneId, companyId, classNameId,
388                            classPK, primary, orderByComparator);
389            }
390    
391            public static java.util.List<com.liferay.portal.model.Phone> findAll()
392                    throws com.liferay.portal.kernel.exception.SystemException {
393                    return getPersistence().findAll();
394            }
395    
396            public static java.util.List<com.liferay.portal.model.Phone> findAll(
397                    int start, int end)
398                    throws com.liferay.portal.kernel.exception.SystemException {
399                    return getPersistence().findAll(start, end);
400            }
401    
402            public static java.util.List<com.liferay.portal.model.Phone> findAll(
403                    int start, int end,
404                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
405                    throws com.liferay.portal.kernel.exception.SystemException {
406                    return getPersistence().findAll(start, end, orderByComparator);
407            }
408    
409            public static void removeByCompanyId(long companyId)
410                    throws com.liferay.portal.kernel.exception.SystemException {
411                    getPersistence().removeByCompanyId(companyId);
412            }
413    
414            public static void removeByUserId(long userId)
415                    throws com.liferay.portal.kernel.exception.SystemException {
416                    getPersistence().removeByUserId(userId);
417            }
418    
419            public static void removeByC_C(long companyId, long classNameId)
420                    throws com.liferay.portal.kernel.exception.SystemException {
421                    getPersistence().removeByC_C(companyId, classNameId);
422            }
423    
424            public static void removeByC_C_C(long companyId, long classNameId,
425                    long classPK)
426                    throws com.liferay.portal.kernel.exception.SystemException {
427                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
428            }
429    
430            public static void removeByC_C_C_P(long companyId, long classNameId,
431                    long classPK, boolean primary)
432                    throws com.liferay.portal.kernel.exception.SystemException {
433                    getPersistence()
434                            .removeByC_C_C_P(companyId, classNameId, classPK, primary);
435            }
436    
437            public static void removeAll()
438                    throws com.liferay.portal.kernel.exception.SystemException {
439                    getPersistence().removeAll();
440            }
441    
442            public static int countByCompanyId(long companyId)
443                    throws com.liferay.portal.kernel.exception.SystemException {
444                    return getPersistence().countByCompanyId(companyId);
445            }
446    
447            public static int countByUserId(long userId)
448                    throws com.liferay.portal.kernel.exception.SystemException {
449                    return getPersistence().countByUserId(userId);
450            }
451    
452            public static int countByC_C(long companyId, long classNameId)
453                    throws com.liferay.portal.kernel.exception.SystemException {
454                    return getPersistence().countByC_C(companyId, classNameId);
455            }
456    
457            public static int countByC_C_C(long companyId, long classNameId,
458                    long classPK)
459                    throws com.liferay.portal.kernel.exception.SystemException {
460                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
461            }
462    
463            public static int countByC_C_C_P(long companyId, long classNameId,
464                    long classPK, boolean primary)
465                    throws com.liferay.portal.kernel.exception.SystemException {
466                    return getPersistence()
467                                       .countByC_C_C_P(companyId, classNameId, classPK, primary);
468            }
469    
470            public static int countAll()
471                    throws com.liferay.portal.kernel.exception.SystemException {
472                    return getPersistence().countAll();
473            }
474    
475            public static PhonePersistence getPersistence() {
476                    if (_persistence == null) {
477                            _persistence = (PhonePersistence)PortalBeanLocatorUtil.locate(PhonePersistence.class.getName());
478                    }
479    
480                    return _persistence;
481            }
482    
483            public void setPersistence(PhonePersistence persistence) {
484                    _persistence = persistence;
485            }
486    
487            private static PhonePersistence _persistence;
488    }