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#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static Phone remove(Phone phone) throws SystemException {
65          return getPersistence().remove(phone);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
70       */
71      public static Phone update(Phone phone, boolean merge)
72          throws SystemException {
73          return getPersistence().update(phone, merge);
74      }
75  
76      public static void cacheResult(com.liferay.portal.model.Phone phone) {
77          getPersistence().cacheResult(phone);
78      }
79  
80      public static void cacheResult(
81          java.util.List<com.liferay.portal.model.Phone> phones) {
82          getPersistence().cacheResult(phones);
83      }
84  
85      public static com.liferay.portal.model.Phone create(long phoneId) {
86          return getPersistence().create(phoneId);
87      }
88  
89      public static com.liferay.portal.model.Phone remove(long phoneId)
90          throws com.liferay.portal.NoSuchPhoneException,
91              com.liferay.portal.kernel.exception.SystemException {
92          return getPersistence().remove(phoneId);
93      }
94  
95      public static com.liferay.portal.model.Phone updateImpl(
96          com.liferay.portal.model.Phone phone, boolean merge)
97          throws com.liferay.portal.kernel.exception.SystemException {
98          return getPersistence().updateImpl(phone, merge);
99      }
100 
101     public static com.liferay.portal.model.Phone findByPrimaryKey(long phoneId)
102         throws com.liferay.portal.NoSuchPhoneException,
103             com.liferay.portal.kernel.exception.SystemException {
104         return getPersistence().findByPrimaryKey(phoneId);
105     }
106 
107     public static com.liferay.portal.model.Phone fetchByPrimaryKey(long phoneId)
108         throws com.liferay.portal.kernel.exception.SystemException {
109         return getPersistence().fetchByPrimaryKey(phoneId);
110     }
111 
112     public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
113         long companyId)
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getPersistence().findByCompanyId(companyId);
116     }
117 
118     public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
119         long companyId, int start, int end)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getPersistence().findByCompanyId(companyId, start, end);
122     }
123 
124     public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId(
125         long companyId, int start, int end,
126         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
127         throws com.liferay.portal.kernel.exception.SystemException {
128         return getPersistence()
129                    .findByCompanyId(companyId, start, end, orderByComparator);
130     }
131 
132     public static com.liferay.portal.model.Phone findByCompanyId_First(
133         long companyId,
134         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135         throws com.liferay.portal.NoSuchPhoneException,
136             com.liferay.portal.kernel.exception.SystemException {
137         return getPersistence()
138                    .findByCompanyId_First(companyId, orderByComparator);
139     }
140 
141     public static com.liferay.portal.model.Phone findByCompanyId_Last(
142         long companyId,
143         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
144         throws com.liferay.portal.NoSuchPhoneException,
145             com.liferay.portal.kernel.exception.SystemException {
146         return getPersistence()
147                    .findByCompanyId_Last(companyId, orderByComparator);
148     }
149 
150     public static com.liferay.portal.model.Phone[] findByCompanyId_PrevAndNext(
151         long phoneId, long companyId,
152         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
153         throws com.liferay.portal.NoSuchPhoneException,
154             com.liferay.portal.kernel.exception.SystemException {
155         return getPersistence()
156                    .findByCompanyId_PrevAndNext(phoneId, companyId,
157             orderByComparator);
158     }
159 
160     public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
161         long userId) throws com.liferay.portal.kernel.exception.SystemException {
162         return getPersistence().findByUserId(userId);
163     }
164 
165     public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
166         long userId, int start, int end)
167         throws com.liferay.portal.kernel.exception.SystemException {
168         return getPersistence().findByUserId(userId, start, end);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.Phone> findByUserId(
172         long userId, int start, int end,
173         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
174         throws com.liferay.portal.kernel.exception.SystemException {
175         return getPersistence()
176                    .findByUserId(userId, start, end, orderByComparator);
177     }
178 
179     public static com.liferay.portal.model.Phone findByUserId_First(
180         long userId,
181         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182         throws com.liferay.portal.NoSuchPhoneException,
183             com.liferay.portal.kernel.exception.SystemException {
184         return getPersistence().findByUserId_First(userId, orderByComparator);
185     }
186 
187     public static com.liferay.portal.model.Phone findByUserId_Last(
188         long userId,
189         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
190         throws com.liferay.portal.NoSuchPhoneException,
191             com.liferay.portal.kernel.exception.SystemException {
192         return getPersistence().findByUserId_Last(userId, orderByComparator);
193     }
194 
195     public static com.liferay.portal.model.Phone[] findByUserId_PrevAndNext(
196         long phoneId, long userId,
197         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
198         throws com.liferay.portal.NoSuchPhoneException,
199             com.liferay.portal.kernel.exception.SystemException {
200         return getPersistence()
201                    .findByUserId_PrevAndNext(phoneId, userId, orderByComparator);
202     }
203 
204     public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
205         long companyId, long classNameId)
206         throws com.liferay.portal.kernel.exception.SystemException {
207         return getPersistence().findByC_C(companyId, classNameId);
208     }
209 
210     public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
211         long companyId, long classNameId, int start, int end)
212         throws com.liferay.portal.kernel.exception.SystemException {
213         return getPersistence().findByC_C(companyId, classNameId, start, end);
214     }
215 
216     public static java.util.List<com.liferay.portal.model.Phone> findByC_C(
217         long companyId, long classNameId, int start, int end,
218         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219         throws com.liferay.portal.kernel.exception.SystemException {
220         return getPersistence()
221                    .findByC_C(companyId, classNameId, start, end,
222             orderByComparator);
223     }
224 
225     public static com.liferay.portal.model.Phone findByC_C_First(
226         long companyId, long classNameId,
227         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228         throws com.liferay.portal.NoSuchPhoneException,
229             com.liferay.portal.kernel.exception.SystemException {
230         return getPersistence()
231                    .findByC_C_First(companyId, classNameId, orderByComparator);
232     }
233 
234     public static com.liferay.portal.model.Phone findByC_C_Last(
235         long companyId, long classNameId,
236         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
237         throws com.liferay.portal.NoSuchPhoneException,
238             com.liferay.portal.kernel.exception.SystemException {
239         return getPersistence()
240                    .findByC_C_Last(companyId, classNameId, orderByComparator);
241     }
242 
243     public static com.liferay.portal.model.Phone[] findByC_C_PrevAndNext(
244         long phoneId, long companyId, long classNameId,
245         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
246         throws com.liferay.portal.NoSuchPhoneException,
247             com.liferay.portal.kernel.exception.SystemException {
248         return getPersistence()
249                    .findByC_C_PrevAndNext(phoneId, companyId, classNameId,
250             orderByComparator);
251     }
252 
253     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
254         long companyId, long classNameId, long classPK)
255         throws com.liferay.portal.kernel.exception.SystemException {
256         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
257     }
258 
259     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
260         long companyId, long classNameId, long classPK, int start, int end)
261         throws com.liferay.portal.kernel.exception.SystemException {
262         return getPersistence()
263                    .findByC_C_C(companyId, classNameId, classPK, start, end);
264     }
265 
266     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C(
267         long companyId, long classNameId, long classPK, int start, int end,
268         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
269         throws com.liferay.portal.kernel.exception.SystemException {
270         return getPersistence()
271                    .findByC_C_C(companyId, classNameId, classPK, start, end,
272             orderByComparator);
273     }
274 
275     public static com.liferay.portal.model.Phone findByC_C_C_First(
276         long companyId, long classNameId, long classPK,
277         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
278         throws com.liferay.portal.NoSuchPhoneException,
279             com.liferay.portal.kernel.exception.SystemException {
280         return getPersistence()
281                    .findByC_C_C_First(companyId, classNameId, classPK,
282             orderByComparator);
283     }
284 
285     public static com.liferay.portal.model.Phone findByC_C_C_Last(
286         long companyId, long classNameId, long classPK,
287         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
288         throws com.liferay.portal.NoSuchPhoneException,
289             com.liferay.portal.kernel.exception.SystemException {
290         return getPersistence()
291                    .findByC_C_C_Last(companyId, classNameId, classPK,
292             orderByComparator);
293     }
294 
295     public static com.liferay.portal.model.Phone[] findByC_C_C_PrevAndNext(
296         long phoneId, long companyId, long classNameId, long classPK,
297         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
298         throws com.liferay.portal.NoSuchPhoneException,
299             com.liferay.portal.kernel.exception.SystemException {
300         return getPersistence()
301                    .findByC_C_C_PrevAndNext(phoneId, companyId, classNameId,
302             classPK, orderByComparator);
303     }
304 
305     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
306         long companyId, long classNameId, long classPK, boolean primary)
307         throws com.liferay.portal.kernel.exception.SystemException {
308         return getPersistence()
309                    .findByC_C_C_P(companyId, classNameId, classPK, primary);
310     }
311 
312     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
313         long companyId, long classNameId, long classPK, boolean primary,
314         int start, int end)
315         throws com.liferay.portal.kernel.exception.SystemException {
316         return getPersistence()
317                    .findByC_C_C_P(companyId, classNameId, classPK, primary,
318             start, end);
319     }
320 
321     public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P(
322         long companyId, long classNameId, long classPK, boolean primary,
323         int start, int end,
324         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
325         throws com.liferay.portal.kernel.exception.SystemException {
326         return getPersistence()
327                    .findByC_C_C_P(companyId, classNameId, classPK, primary,
328             start, end, orderByComparator);
329     }
330 
331     public static com.liferay.portal.model.Phone findByC_C_C_P_First(
332         long companyId, long classNameId, long classPK, boolean primary,
333         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
334         throws com.liferay.portal.NoSuchPhoneException,
335             com.liferay.portal.kernel.exception.SystemException {
336         return getPersistence()
337                    .findByC_C_C_P_First(companyId, classNameId, classPK,
338             primary, orderByComparator);
339     }
340 
341     public static com.liferay.portal.model.Phone findByC_C_C_P_Last(
342         long companyId, long classNameId, long classPK, boolean primary,
343         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
344         throws com.liferay.portal.NoSuchPhoneException,
345             com.liferay.portal.kernel.exception.SystemException {
346         return getPersistence()
347                    .findByC_C_C_P_Last(companyId, classNameId, classPK,
348             primary, orderByComparator);
349     }
350 
351     public static com.liferay.portal.model.Phone[] findByC_C_C_P_PrevAndNext(
352         long phoneId, long companyId, long classNameId, long classPK,
353         boolean primary,
354         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
355         throws com.liferay.portal.NoSuchPhoneException,
356             com.liferay.portal.kernel.exception.SystemException {
357         return getPersistence()
358                    .findByC_C_C_P_PrevAndNext(phoneId, companyId, classNameId,
359             classPK, primary, orderByComparator);
360     }
361 
362     public static java.util.List<com.liferay.portal.model.Phone> findAll()
363         throws com.liferay.portal.kernel.exception.SystemException {
364         return getPersistence().findAll();
365     }
366 
367     public static java.util.List<com.liferay.portal.model.Phone> findAll(
368         int start, int end)
369         throws com.liferay.portal.kernel.exception.SystemException {
370         return getPersistence().findAll(start, end);
371     }
372 
373     public static java.util.List<com.liferay.portal.model.Phone> findAll(
374         int start, int end,
375         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
376         throws com.liferay.portal.kernel.exception.SystemException {
377         return getPersistence().findAll(start, end, orderByComparator);
378     }
379 
380     public static void removeByCompanyId(long companyId)
381         throws com.liferay.portal.kernel.exception.SystemException {
382         getPersistence().removeByCompanyId(companyId);
383     }
384 
385     public static void removeByUserId(long userId)
386         throws com.liferay.portal.kernel.exception.SystemException {
387         getPersistence().removeByUserId(userId);
388     }
389 
390     public static void removeByC_C(long companyId, long classNameId)
391         throws com.liferay.portal.kernel.exception.SystemException {
392         getPersistence().removeByC_C(companyId, classNameId);
393     }
394 
395     public static void removeByC_C_C(long companyId, long classNameId,
396         long classPK)
397         throws com.liferay.portal.kernel.exception.SystemException {
398         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
399     }
400 
401     public static void removeByC_C_C_P(long companyId, long classNameId,
402         long classPK, boolean primary)
403         throws com.liferay.portal.kernel.exception.SystemException {
404         getPersistence()
405             .removeByC_C_C_P(companyId, classNameId, classPK, primary);
406     }
407 
408     public static void removeAll()
409         throws com.liferay.portal.kernel.exception.SystemException {
410         getPersistence().removeAll();
411     }
412 
413     public static int countByCompanyId(long companyId)
414         throws com.liferay.portal.kernel.exception.SystemException {
415         return getPersistence().countByCompanyId(companyId);
416     }
417 
418     public static int countByUserId(long userId)
419         throws com.liferay.portal.kernel.exception.SystemException {
420         return getPersistence().countByUserId(userId);
421     }
422 
423     public static int countByC_C(long companyId, long classNameId)
424         throws com.liferay.portal.kernel.exception.SystemException {
425         return getPersistence().countByC_C(companyId, classNameId);
426     }
427 
428     public static int countByC_C_C(long companyId, long classNameId,
429         long classPK)
430         throws com.liferay.portal.kernel.exception.SystemException {
431         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
432     }
433 
434     public static int countByC_C_C_P(long companyId, long classNameId,
435         long classPK, boolean primary)
436         throws com.liferay.portal.kernel.exception.SystemException {
437         return getPersistence()
438                    .countByC_C_C_P(companyId, classNameId, classPK, primary);
439     }
440 
441     public static int countAll()
442         throws com.liferay.portal.kernel.exception.SystemException {
443         return getPersistence().countAll();
444     }
445 
446     public static PhonePersistence getPersistence() {
447         if (_persistence == null) {
448             _persistence = (PhonePersistence)PortalBeanLocatorUtil.locate(PhonePersistence.class.getName());
449         }
450 
451         return _persistence;
452     }
453 
454     public void setPersistence(PhonePersistence persistence) {
455         _persistence = persistence;
456     }
457 
458     private static PhonePersistence _persistence;
459 }