1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  /**
26   * <a href="PhoneUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class PhoneUtil {
32      public static com.liferay.portal.model.Phone create(long phoneId) {
33          return getPersistence().create(phoneId);
34      }
35  
36      public static com.liferay.portal.model.Phone remove(long phoneId)
37          throws com.liferay.portal.SystemException, 
38              com.liferay.portal.NoSuchPhoneException {
39          return getPersistence().remove(phoneId);
40      }
41  
42      public static com.liferay.portal.model.Phone remove(
43          com.liferay.portal.model.Phone phone)
44          throws com.liferay.portal.SystemException {
45          return getPersistence().remove(phone);
46      }
47  
48      public static com.liferay.portal.model.Phone update(
49          com.liferay.portal.model.Phone phone)
50          throws com.liferay.portal.SystemException {
51          return getPersistence().update(phone);
52      }
53  
54      public static com.liferay.portal.model.Phone update(
55          com.liferay.portal.model.Phone phone, boolean merge)
56          throws com.liferay.portal.SystemException {
57          return getPersistence().update(phone, merge);
58      }
59  
60      public static com.liferay.portal.model.Phone updateImpl(
61          com.liferay.portal.model.Phone phone, boolean merge)
62          throws com.liferay.portal.SystemException {
63          return getPersistence().updateImpl(phone, merge);
64      }
65  
66      public static com.liferay.portal.model.Phone findByPrimaryKey(long phoneId)
67          throws com.liferay.portal.SystemException, 
68              com.liferay.portal.NoSuchPhoneException {
69          return getPersistence().findByPrimaryKey(phoneId);
70      }
71  
72      public static com.liferay.portal.model.Phone fetchByPrimaryKey(long phoneId)
73          throws com.liferay.portal.SystemException {
74          return getPersistence().fetchByPrimaryKey(phoneId);
75      }
76  
77      public static java.util.List findByCompanyId(long companyId)
78          throws com.liferay.portal.SystemException {
79          return getPersistence().findByCompanyId(companyId);
80      }
81  
82      public static java.util.List findByCompanyId(long companyId, int begin,
83          int end) throws com.liferay.portal.SystemException {
84          return getPersistence().findByCompanyId(companyId, begin, end);
85      }
86  
87      public static java.util.List findByCompanyId(long companyId, int begin,
88          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
89          throws com.liferay.portal.SystemException {
90          return getPersistence().findByCompanyId(companyId, begin, end, obc);
91      }
92  
93      public static com.liferay.portal.model.Phone findByCompanyId_First(
94          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException, 
96              com.liferay.portal.NoSuchPhoneException {
97          return getPersistence().findByCompanyId_First(companyId, obc);
98      }
99  
100     public static com.liferay.portal.model.Phone findByCompanyId_Last(
101         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException, 
103             com.liferay.portal.NoSuchPhoneException {
104         return getPersistence().findByCompanyId_Last(companyId, obc);
105     }
106 
107     public static com.liferay.portal.model.Phone[] findByCompanyId_PrevAndNext(
108         long phoneId, long companyId,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException, 
111             com.liferay.portal.NoSuchPhoneException {
112         return getPersistence().findByCompanyId_PrevAndNext(phoneId, companyId,
113             obc);
114     }
115 
116     public static java.util.List findByUserId(long userId)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().findByUserId(userId);
119     }
120 
121     public static java.util.List findByUserId(long userId, int begin, int end)
122         throws com.liferay.portal.SystemException {
123         return getPersistence().findByUserId(userId, begin, end);
124     }
125 
126     public static java.util.List findByUserId(long userId, int begin, int end,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException {
129         return getPersistence().findByUserId(userId, begin, end, obc);
130     }
131 
132     public static com.liferay.portal.model.Phone findByUserId_First(
133         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException, 
135             com.liferay.portal.NoSuchPhoneException {
136         return getPersistence().findByUserId_First(userId, obc);
137     }
138 
139     public static com.liferay.portal.model.Phone findByUserId_Last(
140         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.SystemException, 
142             com.liferay.portal.NoSuchPhoneException {
143         return getPersistence().findByUserId_Last(userId, obc);
144     }
145 
146     public static com.liferay.portal.model.Phone[] findByUserId_PrevAndNext(
147         long phoneId, long userId,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException, 
150             com.liferay.portal.NoSuchPhoneException {
151         return getPersistence().findByUserId_PrevAndNext(phoneId, userId, obc);
152     }
153 
154     public static java.util.List findByC_C(long companyId, long classNameId)
155         throws com.liferay.portal.SystemException {
156         return getPersistence().findByC_C(companyId, classNameId);
157     }
158 
159     public static java.util.List findByC_C(long companyId, long classNameId,
160         int begin, int end) throws com.liferay.portal.SystemException {
161         return getPersistence().findByC_C(companyId, classNameId, begin, end);
162     }
163 
164     public static java.util.List findByC_C(long companyId, long classNameId,
165         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findByC_C(companyId, classNameId, begin, end,
168             obc);
169     }
170 
171     public static com.liferay.portal.model.Phone findByC_C_First(
172         long companyId, long classNameId,
173         com.liferay.portal.kernel.util.OrderByComparator obc)
174         throws com.liferay.portal.SystemException, 
175             com.liferay.portal.NoSuchPhoneException {
176         return getPersistence().findByC_C_First(companyId, classNameId, obc);
177     }
178 
179     public static com.liferay.portal.model.Phone findByC_C_Last(
180         long companyId, long classNameId,
181         com.liferay.portal.kernel.util.OrderByComparator obc)
182         throws com.liferay.portal.SystemException, 
183             com.liferay.portal.NoSuchPhoneException {
184         return getPersistence().findByC_C_Last(companyId, classNameId, obc);
185     }
186 
187     public static com.liferay.portal.model.Phone[] findByC_C_PrevAndNext(
188         long phoneId, long companyId, long classNameId,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException, 
191             com.liferay.portal.NoSuchPhoneException {
192         return getPersistence().findByC_C_PrevAndNext(phoneId, companyId,
193             classNameId, obc);
194     }
195 
196     public static java.util.List findByC_C_C(long companyId, long classNameId,
197         long classPK) throws com.liferay.portal.SystemException {
198         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
199     }
200 
201     public static java.util.List findByC_C_C(long companyId, long classNameId,
202         long classPK, int begin, int end)
203         throws com.liferay.portal.SystemException {
204         return getPersistence().findByC_C_C(companyId, classNameId, classPK,
205             begin, end);
206     }
207 
208     public static java.util.List findByC_C_C(long companyId, long classNameId,
209         long classPK, int begin, int end,
210         com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.SystemException {
212         return getPersistence().findByC_C_C(companyId, classNameId, classPK,
213             begin, end, obc);
214     }
215 
216     public static com.liferay.portal.model.Phone findByC_C_C_First(
217         long companyId, long classNameId, long classPK,
218         com.liferay.portal.kernel.util.OrderByComparator obc)
219         throws com.liferay.portal.SystemException, 
220             com.liferay.portal.NoSuchPhoneException {
221         return getPersistence().findByC_C_C_First(companyId, classNameId,
222             classPK, obc);
223     }
224 
225     public static com.liferay.portal.model.Phone findByC_C_C_Last(
226         long companyId, long classNameId, long classPK,
227         com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException, 
229             com.liferay.portal.NoSuchPhoneException {
230         return getPersistence().findByC_C_C_Last(companyId, classNameId,
231             classPK, obc);
232     }
233 
234     public static com.liferay.portal.model.Phone[] findByC_C_C_PrevAndNext(
235         long phoneId, long companyId, long classNameId, long classPK,
236         com.liferay.portal.kernel.util.OrderByComparator obc)
237         throws com.liferay.portal.SystemException, 
238             com.liferay.portal.NoSuchPhoneException {
239         return getPersistence().findByC_C_C_PrevAndNext(phoneId, companyId,
240             classNameId, classPK, obc);
241     }
242 
243     public static java.util.List findByC_C_C_P(long companyId,
244         long classNameId, long classPK, boolean primary)
245         throws com.liferay.portal.SystemException {
246         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
247             primary);
248     }
249 
250     public static java.util.List findByC_C_C_P(long companyId,
251         long classNameId, long classPK, boolean primary, int begin, int end)
252         throws com.liferay.portal.SystemException {
253         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
254             primary, begin, end);
255     }
256 
257     public static java.util.List findByC_C_C_P(long companyId,
258         long classNameId, long classPK, boolean primary, int begin, int end,
259         com.liferay.portal.kernel.util.OrderByComparator obc)
260         throws com.liferay.portal.SystemException {
261         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
262             primary, begin, end, obc);
263     }
264 
265     public static com.liferay.portal.model.Phone findByC_C_C_P_First(
266         long companyId, long classNameId, long classPK, boolean primary,
267         com.liferay.portal.kernel.util.OrderByComparator obc)
268         throws com.liferay.portal.SystemException, 
269             com.liferay.portal.NoSuchPhoneException {
270         return getPersistence().findByC_C_C_P_First(companyId, classNameId,
271             classPK, primary, obc);
272     }
273 
274     public static com.liferay.portal.model.Phone findByC_C_C_P_Last(
275         long companyId, long classNameId, long classPK, boolean primary,
276         com.liferay.portal.kernel.util.OrderByComparator obc)
277         throws com.liferay.portal.SystemException, 
278             com.liferay.portal.NoSuchPhoneException {
279         return getPersistence().findByC_C_C_P_Last(companyId, classNameId,
280             classPK, primary, obc);
281     }
282 
283     public static com.liferay.portal.model.Phone[] findByC_C_C_P_PrevAndNext(
284         long phoneId, long companyId, long classNameId, long classPK,
285         boolean primary, com.liferay.portal.kernel.util.OrderByComparator obc)
286         throws com.liferay.portal.SystemException, 
287             com.liferay.portal.NoSuchPhoneException {
288         return getPersistence().findByC_C_C_P_PrevAndNext(phoneId, companyId,
289             classNameId, classPK, primary, obc);
290     }
291 
292     public static java.util.List findWithDynamicQuery(
293         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
294         throws com.liferay.portal.SystemException {
295         return getPersistence().findWithDynamicQuery(queryInitializer);
296     }
297 
298     public static java.util.List findWithDynamicQuery(
299         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
300         int begin, int end) throws com.liferay.portal.SystemException {
301         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
302             end);
303     }
304 
305     public static java.util.List findAll()
306         throws com.liferay.portal.SystemException {
307         return getPersistence().findAll();
308     }
309 
310     public static java.util.List findAll(int begin, int end)
311         throws com.liferay.portal.SystemException {
312         return getPersistence().findAll(begin, end);
313     }
314 
315     public static java.util.List findAll(int begin, int end,
316         com.liferay.portal.kernel.util.OrderByComparator obc)
317         throws com.liferay.portal.SystemException {
318         return getPersistence().findAll(begin, end, obc);
319     }
320 
321     public static void removeByCompanyId(long companyId)
322         throws com.liferay.portal.SystemException {
323         getPersistence().removeByCompanyId(companyId);
324     }
325 
326     public static void removeByUserId(long userId)
327         throws com.liferay.portal.SystemException {
328         getPersistence().removeByUserId(userId);
329     }
330 
331     public static void removeByC_C(long companyId, long classNameId)
332         throws com.liferay.portal.SystemException {
333         getPersistence().removeByC_C(companyId, classNameId);
334     }
335 
336     public static void removeByC_C_C(long companyId, long classNameId,
337         long classPK) throws com.liferay.portal.SystemException {
338         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
339     }
340 
341     public static void removeByC_C_C_P(long companyId, long classNameId,
342         long classPK, boolean primary)
343         throws com.liferay.portal.SystemException {
344         getPersistence().removeByC_C_C_P(companyId, classNameId, classPK,
345             primary);
346     }
347 
348     public static void removeAll() throws com.liferay.portal.SystemException {
349         getPersistence().removeAll();
350     }
351 
352     public static int countByCompanyId(long companyId)
353         throws com.liferay.portal.SystemException {
354         return getPersistence().countByCompanyId(companyId);
355     }
356 
357     public static int countByUserId(long userId)
358         throws com.liferay.portal.SystemException {
359         return getPersistence().countByUserId(userId);
360     }
361 
362     public static int countByC_C(long companyId, long classNameId)
363         throws com.liferay.portal.SystemException {
364         return getPersistence().countByC_C(companyId, classNameId);
365     }
366 
367     public static int countByC_C_C(long companyId, long classNameId,
368         long classPK) throws com.liferay.portal.SystemException {
369         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
370     }
371 
372     public static int countByC_C_C_P(long companyId, long classNameId,
373         long classPK, boolean primary)
374         throws com.liferay.portal.SystemException {
375         return getPersistence().countByC_C_C_P(companyId, classNameId, classPK,
376             primary);
377     }
378 
379     public static int countAll() throws com.liferay.portal.SystemException {
380         return getPersistence().countAll();
381     }
382 
383     public static PhonePersistence getPersistence() {
384         return _getUtil()._persistence;
385     }
386 
387     public void setPersistence(PhonePersistence persistence) {
388         _persistence = persistence;
389     }
390 
391     private static PhoneUtil _getUtil() {
392         if (_util == null) {
393             _util = (PhoneUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
394         }
395 
396         return _util;
397     }
398 
399     private static final String _UTIL = PhoneUtil.class.getName();
400     private static PhoneUtil _util;
401     private PhonePersistence _persistence;
402 }