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