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