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