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