1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.Phone;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="PhoneUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       PhonePersistence
34   * @see       PhonePersistenceImpl
35   * @generated
36   */
37  public class PhoneUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(Phone)
47       */
48      public static void clearCache(Phone phone) {
49          getPersistence().clearCache(phone);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<Phone> findWithDynamicQuery(DynamicQuery dynamicQuery)
64          throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<Phone> findWithDynamicQuery(DynamicQuery dynamicQuery,
72          int start, int end) throws SystemException {
73          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
74      }
75  
76      /**
77       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
78       */
79      public static Phone remove(Phone phone) throws SystemException {
80          return getPersistence().remove(phone);
81      }
82  
83      /**
84       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
85       */
86      public static Phone update(Phone phone, boolean merge)
87          throws SystemException {
88          return getPersistence().update(phone, merge);
89      }
90  
91      public static void cacheResult(com.liferay.portal.model.Phone phone) {
92          getPersistence().cacheResult(phone);
93      }
94  
95      public static void cacheResult(
96          java.util.List<com.liferay.portal.model.Phone> phones) {
97          getPersistence().cacheResult(phones);
98      }
99  
100     public static com.liferay.portal.model.Phone create(long phoneId) {
101         return getPersistence().create(phoneId);
102     }
103 
104     public static com.liferay.portal.model.Phone remove(long phoneId)
105         throws com.liferay.portal.NoSuchPhoneException,
106             com.liferay.portal.kernel.exception.SystemException {
107         return getPersistence().remove(phoneId);
108     }
109 
110     public static com.liferay.portal.model.Phone updateImpl(
111         com.liferay.portal.model.Phone phone, boolean merge)
112         throws com.liferay.portal.kernel.exception.SystemException {
113         return getPersistence().updateImpl(phone, merge);
114     }
115 
116     public static com.liferay.portal.model.Phone findByPrimaryKey(long phoneId)
117         throws com.liferay.portal.NoSuchPhoneException,
118             com.liferay.portal.kernel.exception.SystemException {
119         return getPersistence().findByPrimaryKey(phoneId);
120     }
121 
122     public static com.liferay.portal.model.Phone fetchByPrimaryKey(long phoneId)
123         throws com.liferay.portal.kernel.exception.SystemException {
124         return getPersistence().fetchByPrimaryKey(phoneId);
125     }
126 
127     public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
128         long companyId)
129         throws com.liferay.portal.kernel.exception.SystemException {
130         return getPersistence().findByCompanyId(companyId);
131     }
132 
133     public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
134         long companyId, int start, int end)
135         throws com.liferay.portal.kernel.exception.SystemException {
136         return getPersistence().findByCompanyId(companyId, start, end);
137     }
138 
139     public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
140         long companyId, int start, int end,
141         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142         throws com.liferay.portal.kernel.exception.SystemException {
143         return getPersistence()
144                    .findByCompanyId(companyId, start, end, orderByComparator);
145     }
146 
147     public static com.liferay.portal.model.Phone findByCompanyId_First(
148         long companyId,
149         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150         throws com.liferay.portal.NoSuchPhoneException,
151             com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence()
153                    .findByCompanyId_First(companyId, orderByComparator);
154     }
155 
156     public static com.liferay.portal.model.Phone findByCompanyId_Last(
157         long companyId,
158         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159         throws com.liferay.portal.NoSuchPhoneException,
160             com.liferay.portal.kernel.exception.SystemException {
161         return getPersistence()
162                    .findByCompanyId_Last(companyId, orderByComparator);
163     }
164 
165     public static com.liferay.portal.model.Phone[] findByCompanyId_PrevAndNext(
166         long phoneId, long companyId,
167         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168         throws com.liferay.portal.NoSuchPhoneException,
169             com.liferay.portal.kernel.exception.SystemException {
170         return getPersistence()
171                    .findByCompanyId_PrevAndNext(phoneId, companyId,
172             orderByComparator);
173     }
174 
175     public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
176         long userId) throws com.liferay.portal.kernel.exception.SystemException {
177         return getPersistence().findByUserId(userId);
178     }
179 
180     public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
181         long userId, int start, int end)
182         throws com.liferay.portal.kernel.exception.SystemException {
183         return getPersistence().findByUserId(userId, start, end);
184     }
185 
186     public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
187         long userId, int start, int end,
188         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
189         throws com.liferay.portal.kernel.exception.SystemException {
190         return getPersistence()
191                    .findByUserId(userId, start, end, orderByComparator);
192     }
193 
194     public static com.liferay.portal.model.Phone findByUserId_First(
195         long userId,
196         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
197         throws com.liferay.portal.NoSuchPhoneException,
198             com.liferay.portal.kernel.exception.SystemException {
199         return getPersistence().findByUserId_First(userId, orderByComparator);
200     }
201 
202     public static com.liferay.portal.model.Phone findByUserId_Last(
203         long userId,
204         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
205         throws com.liferay.portal.NoSuchPhoneException,
206             com.liferay.portal.kernel.exception.SystemException {
207         return getPersistence().findByUserId_Last(userId, orderByComparator);
208     }
209 
210     public static com.liferay.portal.model.Phone[] findByUserId_PrevAndNext(
211         long phoneId, long userId,
212         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
213         throws com.liferay.portal.NoSuchPhoneException,
214             com.liferay.portal.kernel.exception.SystemException {
215         return getPersistence()
216                    .findByUserId_PrevAndNext(phoneId, userId, orderByComparator);
217     }
218 
219     public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
220         long companyId, long classNameId)
221         throws com.liferay.portal.kernel.exception.SystemException {
222         return getPersistence().findByC_C(companyId, classNameId);
223     }
224 
225     public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
226         long companyId, long classNameId, int start, int end)
227         throws com.liferay.portal.kernel.exception.SystemException {
228         return getPersistence().findByC_C(companyId, classNameId, start, end);
229     }
230 
231     public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
232         long companyId, long classNameId, int start, int end,
233         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
234         throws com.liferay.portal.kernel.exception.SystemException {
235         return getPersistence()
236                    .findByC_C(companyId, classNameId, start, end,
237             orderByComparator);
238     }
239 
240     public static com.liferay.portal.model.Phone findByC_C_First(
241         long companyId, long classNameId,
242         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243         throws com.liferay.portal.NoSuchPhoneException,
244             com.liferay.portal.kernel.exception.SystemException {
245         return getPersistence()
246                    .findByC_C_First(companyId, classNameId, orderByComparator);
247     }
248 
249     public static com.liferay.portal.model.Phone findByC_C_Last(
250         long companyId, long classNameId,
251         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252         throws com.liferay.portal.NoSuchPhoneException,
253             com.liferay.portal.kernel.exception.SystemException {
254         return getPersistence()
255                    .findByC_C_Last(companyId, classNameId, orderByComparator);
256     }
257 
258     public static com.liferay.portal.model.Phone[] findByC_C_PrevAndNext(
259         long phoneId, long companyId, long classNameId,
260         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261         throws com.liferay.portal.NoSuchPhoneException,
262             com.liferay.portal.kernel.exception.SystemException {
263         return getPersistence()
264                    .findByC_C_PrevAndNext(phoneId, companyId, classNameId,
265             orderByComparator);
266     }
267 
268     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
269         long companyId, long classNameId, long classPK)
270         throws com.liferay.portal.kernel.exception.SystemException {
271         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
272     }
273 
274     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
275         long companyId, long classNameId, long classPK, int start, int end)
276         throws com.liferay.portal.kernel.exception.SystemException {
277         return getPersistence()
278                    .findByC_C_C(companyId, classNameId, classPK, start, end);
279     }
280 
281     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
282         long companyId, long classNameId, long classPK, int start, int end,
283         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
284         throws com.liferay.portal.kernel.exception.SystemException {
285         return getPersistence()
286                    .findByC_C_C(companyId, classNameId, classPK, start, end,
287             orderByComparator);
288     }
289 
290     public static com.liferay.portal.model.Phone findByC_C_C_First(
291         long companyId, long classNameId, long classPK,
292         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
293         throws com.liferay.portal.NoSuchPhoneException,
294             com.liferay.portal.kernel.exception.SystemException {
295         return getPersistence()
296                    .findByC_C_C_First(companyId, classNameId, classPK,
297             orderByComparator);
298     }
299 
300     public static com.liferay.portal.model.Phone findByC_C_C_Last(
301         long companyId, long classNameId, long classPK,
302         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
303         throws com.liferay.portal.NoSuchPhoneException,
304             com.liferay.portal.kernel.exception.SystemException {
305         return getPersistence()
306                    .findByC_C_C_Last(companyId, classNameId, classPK,
307             orderByComparator);
308     }
309 
310     public static com.liferay.portal.model.Phone[] findByC_C_C_PrevAndNext(
311         long phoneId, long companyId, long classNameId, long classPK,
312         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
313         throws com.liferay.portal.NoSuchPhoneException,
314             com.liferay.portal.kernel.exception.SystemException {
315         return getPersistence()
316                    .findByC_C_C_PrevAndNext(phoneId, companyId, classNameId,
317             classPK, orderByComparator);
318     }
319 
320     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
321         long companyId, long classNameId, long classPK, boolean primary)
322         throws com.liferay.portal.kernel.exception.SystemException {
323         return getPersistence()
324                    .findByC_C_C_P(companyId, classNameId, classPK, primary);
325     }
326 
327     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
328         long companyId, long classNameId, long classPK, boolean primary,
329         int start, int end)
330         throws com.liferay.portal.kernel.exception.SystemException {
331         return getPersistence()
332                    .findByC_C_C_P(companyId, classNameId, classPK, primary,
333             start, end);
334     }
335 
336     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
337         long companyId, long classNameId, long classPK, boolean primary,
338         int start, int end,
339         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
340         throws com.liferay.portal.kernel.exception.SystemException {
341         return getPersistence()
342                    .findByC_C_C_P(companyId, classNameId, classPK, primary,
343             start, end, orderByComparator);
344     }
345 
346     public static com.liferay.portal.model.Phone findByC_C_C_P_First(
347         long companyId, long classNameId, long classPK, boolean primary,
348         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
349         throws com.liferay.portal.NoSuchPhoneException,
350             com.liferay.portal.kernel.exception.SystemException {
351         return getPersistence()
352                    .findByC_C_C_P_First(companyId, classNameId, classPK,
353             primary, orderByComparator);
354     }
355 
356     public static com.liferay.portal.model.Phone findByC_C_C_P_Last(
357         long companyId, long classNameId, long classPK, boolean primary,
358         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
359         throws com.liferay.portal.NoSuchPhoneException,
360             com.liferay.portal.kernel.exception.SystemException {
361         return getPersistence()
362                    .findByC_C_C_P_Last(companyId, classNameId, classPK,
363             primary, orderByComparator);
364     }
365 
366     public static com.liferay.portal.model.Phone[] findByC_C_C_P_PrevAndNext(
367         long phoneId, long companyId, long classNameId, long classPK,
368         boolean primary,
369         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
370         throws com.liferay.portal.NoSuchPhoneException,
371             com.liferay.portal.kernel.exception.SystemException {
372         return getPersistence()
373                    .findByC_C_C_P_PrevAndNext(phoneId, companyId, classNameId,
374             classPK, primary, orderByComparator);
375     }
376 
377     public static java.util.List<com.liferay.portal.model.Phone> findAll()
378         throws com.liferay.portal.kernel.exception.SystemException {
379         return getPersistence().findAll();
380     }
381 
382     public static java.util.List<com.liferay.portal.model.Phone> findAll(
383         int start, int end)
384         throws com.liferay.portal.kernel.exception.SystemException {
385         return getPersistence().findAll(start, end);
386     }
387 
388     public static java.util.List<com.liferay.portal.model.Phone> findAll(
389         int start, int end,
390         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
391         throws com.liferay.portal.kernel.exception.SystemException {
392         return getPersistence().findAll(start, end, orderByComparator);
393     }
394 
395     public static void removeByCompanyId(long companyId)
396         throws com.liferay.portal.kernel.exception.SystemException {
397         getPersistence().removeByCompanyId(companyId);
398     }
399 
400     public static void removeByUserId(long userId)
401         throws com.liferay.portal.kernel.exception.SystemException {
402         getPersistence().removeByUserId(userId);
403     }
404 
405     public static void removeByC_C(long companyId, long classNameId)
406         throws com.liferay.portal.kernel.exception.SystemException {
407         getPersistence().removeByC_C(companyId, classNameId);
408     }
409 
410     public static void removeByC_C_C(long companyId, long classNameId,
411         long classPK)
412         throws com.liferay.portal.kernel.exception.SystemException {
413         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
414     }
415 
416     public static void removeByC_C_C_P(long companyId, long classNameId,
417         long classPK, boolean primary)
418         throws com.liferay.portal.kernel.exception.SystemException {
419         getPersistence()
420             .removeByC_C_C_P(companyId, classNameId, classPK, primary);
421     }
422 
423     public static void removeAll()
424         throws com.liferay.portal.kernel.exception.SystemException {
425         getPersistence().removeAll();
426     }
427 
428     public static int countByCompanyId(long companyId)
429         throws com.liferay.portal.kernel.exception.SystemException {
430         return getPersistence().countByCompanyId(companyId);
431     }
432 
433     public static int countByUserId(long userId)
434         throws com.liferay.portal.kernel.exception.SystemException {
435         return getPersistence().countByUserId(userId);
436     }
437 
438     public static int countByC_C(long companyId, long classNameId)
439         throws com.liferay.portal.kernel.exception.SystemException {
440         return getPersistence().countByC_C(companyId, classNameId);
441     }
442 
443     public static int countByC_C_C(long companyId, long classNameId,
444         long classPK)
445         throws com.liferay.portal.kernel.exception.SystemException {
446         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
447     }
448 
449     public static int countByC_C_C_P(long companyId, long classNameId,
450         long classPK, boolean primary)
451         throws com.liferay.portal.kernel.exception.SystemException {
452         return getPersistence()
453                    .countByC_C_C_P(companyId, classNameId, classPK, primary);
454     }
455 
456     public static int countAll()
457         throws com.liferay.portal.kernel.exception.SystemException {
458         return getPersistence().countAll();
459     }
460 
461     public static PhonePersistence getPersistence() {
462         if (_persistence == null) {
463             _persistence = (PhonePersistence)PortalBeanLocatorUtil.locate(PhonePersistence.class.getName());
464         }
465 
466         return _persistence;
467     }
468 
469     public void setPersistence(PhonePersistence persistence) {
470         _persistence = persistence;
471     }
472 
473     private static PhonePersistence _persistence;
474 }