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