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="EmailAddressUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class EmailAddressUtil {
32      public static com.liferay.portal.model.EmailAddress create(
33          long emailAddressId) {
34          return getPersistence().create(emailAddressId);
35      }
36  
37      public static com.liferay.portal.model.EmailAddress remove(
38          long emailAddressId)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portal.NoSuchEmailAddressException {
41          return getPersistence().remove(emailAddressId);
42      }
43  
44      public static com.liferay.portal.model.EmailAddress remove(
45          com.liferay.portal.model.EmailAddress emailAddress)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(emailAddress);
48      }
49  
50      public static com.liferay.portal.model.EmailAddress update(
51          com.liferay.portal.model.EmailAddress emailAddress)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(emailAddress);
54      }
55  
56      public static com.liferay.portal.model.EmailAddress update(
57          com.liferay.portal.model.EmailAddress emailAddress, boolean merge)
58          throws com.liferay.portal.SystemException {
59          return getPersistence().update(emailAddress, merge);
60      }
61  
62      public static com.liferay.portal.model.EmailAddress updateImpl(
63          com.liferay.portal.model.EmailAddress emailAddress, boolean merge)
64          throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(emailAddress, merge);
66      }
67  
68      public static com.liferay.portal.model.EmailAddress findByPrimaryKey(
69          long emailAddressId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portal.NoSuchEmailAddressException {
72          return getPersistence().findByPrimaryKey(emailAddressId);
73      }
74  
75      public static com.liferay.portal.model.EmailAddress fetchByPrimaryKey(
76          long emailAddressId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(emailAddressId);
78      }
79  
80      public static java.util.List findByCompanyId(long companyId)
81          throws com.liferay.portal.SystemException {
82          return getPersistence().findByCompanyId(companyId);
83      }
84  
85      public static java.util.List findByCompanyId(long companyId, int begin,
86          int end) throws com.liferay.portal.SystemException {
87          return getPersistence().findByCompanyId(companyId, begin, end);
88      }
89  
90      public static java.util.List findByCompanyId(long companyId, int begin,
91          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findByCompanyId(companyId, begin, end, obc);
94      }
95  
96      public static com.liferay.portal.model.EmailAddress findByCompanyId_First(
97          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portal.NoSuchEmailAddressException {
100         return getPersistence().findByCompanyId_First(companyId, obc);
101     }
102 
103     public static com.liferay.portal.model.EmailAddress findByCompanyId_Last(
104         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portal.NoSuchEmailAddressException {
107         return getPersistence().findByCompanyId_Last(companyId, obc);
108     }
109 
110     public static com.liferay.portal.model.EmailAddress[] findByCompanyId_PrevAndNext(
111         long emailAddressId, long companyId,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portal.NoSuchEmailAddressException {
115         return getPersistence().findByCompanyId_PrevAndNext(emailAddressId,
116             companyId, obc);
117     }
118 
119     public static java.util.List findByUserId(long userId)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().findByUserId(userId);
122     }
123 
124     public static java.util.List findByUserId(long userId, int begin, int end)
125         throws com.liferay.portal.SystemException {
126         return getPersistence().findByUserId(userId, begin, end);
127     }
128 
129     public static java.util.List findByUserId(long userId, int begin, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByUserId(userId, begin, end, obc);
133     }
134 
135     public static com.liferay.portal.model.EmailAddress findByUserId_First(
136         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException, 
138             com.liferay.portal.NoSuchEmailAddressException {
139         return getPersistence().findByUserId_First(userId, obc);
140     }
141 
142     public static com.liferay.portal.model.EmailAddress findByUserId_Last(
143         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException, 
145             com.liferay.portal.NoSuchEmailAddressException {
146         return getPersistence().findByUserId_Last(userId, obc);
147     }
148 
149     public static com.liferay.portal.model.EmailAddress[] findByUserId_PrevAndNext(
150         long emailAddressId, long userId,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException, 
153             com.liferay.portal.NoSuchEmailAddressException {
154         return getPersistence().findByUserId_PrevAndNext(emailAddressId,
155             userId, obc);
156     }
157 
158     public static java.util.List findByC_C(long companyId, long classNameId)
159         throws com.liferay.portal.SystemException {
160         return getPersistence().findByC_C(companyId, classNameId);
161     }
162 
163     public static java.util.List findByC_C(long companyId, long classNameId,
164         int begin, int end) throws com.liferay.portal.SystemException {
165         return getPersistence().findByC_C(companyId, classNameId, begin, end);
166     }
167 
168     public static java.util.List findByC_C(long companyId, long classNameId,
169         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException {
171         return getPersistence().findByC_C(companyId, classNameId, begin, end,
172             obc);
173     }
174 
175     public static com.liferay.portal.model.EmailAddress findByC_C_First(
176         long companyId, long classNameId,
177         com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException, 
179             com.liferay.portal.NoSuchEmailAddressException {
180         return getPersistence().findByC_C_First(companyId, classNameId, obc);
181     }
182 
183     public static com.liferay.portal.model.EmailAddress findByC_C_Last(
184         long companyId, long classNameId,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException, 
187             com.liferay.portal.NoSuchEmailAddressException {
188         return getPersistence().findByC_C_Last(companyId, classNameId, obc);
189     }
190 
191     public static com.liferay.portal.model.EmailAddress[] findByC_C_PrevAndNext(
192         long emailAddressId, long companyId, long classNameId,
193         com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.SystemException, 
195             com.liferay.portal.NoSuchEmailAddressException {
196         return getPersistence().findByC_C_PrevAndNext(emailAddressId,
197             companyId, classNameId, obc);
198     }
199 
200     public static java.util.List findByC_C_C(long companyId, long classNameId,
201         long classPK) throws com.liferay.portal.SystemException {
202         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
203     }
204 
205     public static java.util.List findByC_C_C(long companyId, long classNameId,
206         long classPK, int begin, int end)
207         throws com.liferay.portal.SystemException {
208         return getPersistence().findByC_C_C(companyId, classNameId, classPK,
209             begin, end);
210     }
211 
212     public static java.util.List findByC_C_C(long companyId, long classNameId,
213         long classPK, int begin, int end,
214         com.liferay.portal.kernel.util.OrderByComparator obc)
215         throws com.liferay.portal.SystemException {
216         return getPersistence().findByC_C_C(companyId, classNameId, classPK,
217             begin, end, obc);
218     }
219 
220     public static com.liferay.portal.model.EmailAddress findByC_C_C_First(
221         long companyId, long classNameId, long classPK,
222         com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.SystemException, 
224             com.liferay.portal.NoSuchEmailAddressException {
225         return getPersistence().findByC_C_C_First(companyId, classNameId,
226             classPK, obc);
227     }
228 
229     public static com.liferay.portal.model.EmailAddress findByC_C_C_Last(
230         long companyId, long classNameId, long classPK,
231         com.liferay.portal.kernel.util.OrderByComparator obc)
232         throws com.liferay.portal.SystemException, 
233             com.liferay.portal.NoSuchEmailAddressException {
234         return getPersistence().findByC_C_C_Last(companyId, classNameId,
235             classPK, obc);
236     }
237 
238     public static com.liferay.portal.model.EmailAddress[] findByC_C_C_PrevAndNext(
239         long emailAddressId, long companyId, long classNameId, long classPK,
240         com.liferay.portal.kernel.util.OrderByComparator obc)
241         throws com.liferay.portal.SystemException, 
242             com.liferay.portal.NoSuchEmailAddressException {
243         return getPersistence().findByC_C_C_PrevAndNext(emailAddressId,
244             companyId, classNameId, classPK, obc);
245     }
246 
247     public static java.util.List findByC_C_C_P(long companyId,
248         long classNameId, long classPK, boolean primary)
249         throws com.liferay.portal.SystemException {
250         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
251             primary);
252     }
253 
254     public static java.util.List findByC_C_C_P(long companyId,
255         long classNameId, long classPK, boolean primary, int begin, int end)
256         throws com.liferay.portal.SystemException {
257         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
258             primary, begin, end);
259     }
260 
261     public static java.util.List findByC_C_C_P(long companyId,
262         long classNameId, long classPK, boolean primary, int begin, int end,
263         com.liferay.portal.kernel.util.OrderByComparator obc)
264         throws com.liferay.portal.SystemException {
265         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
266             primary, begin, end, obc);
267     }
268 
269     public static com.liferay.portal.model.EmailAddress findByC_C_C_P_First(
270         long companyId, long classNameId, long classPK, boolean primary,
271         com.liferay.portal.kernel.util.OrderByComparator obc)
272         throws com.liferay.portal.SystemException, 
273             com.liferay.portal.NoSuchEmailAddressException {
274         return getPersistence().findByC_C_C_P_First(companyId, classNameId,
275             classPK, primary, obc);
276     }
277 
278     public static com.liferay.portal.model.EmailAddress findByC_C_C_P_Last(
279         long companyId, long classNameId, long classPK, boolean primary,
280         com.liferay.portal.kernel.util.OrderByComparator obc)
281         throws com.liferay.portal.SystemException, 
282             com.liferay.portal.NoSuchEmailAddressException {
283         return getPersistence().findByC_C_C_P_Last(companyId, classNameId,
284             classPK, primary, obc);
285     }
286 
287     public static com.liferay.portal.model.EmailAddress[] findByC_C_C_P_PrevAndNext(
288         long emailAddressId, long companyId, long classNameId, long classPK,
289         boolean primary, com.liferay.portal.kernel.util.OrderByComparator obc)
290         throws com.liferay.portal.SystemException, 
291             com.liferay.portal.NoSuchEmailAddressException {
292         return getPersistence().findByC_C_C_P_PrevAndNext(emailAddressId,
293             companyId, classNameId, classPK, primary, obc);
294     }
295 
296     public static java.util.List findWithDynamicQuery(
297         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
298         throws com.liferay.portal.SystemException {
299         return getPersistence().findWithDynamicQuery(queryInitializer);
300     }
301 
302     public static java.util.List findWithDynamicQuery(
303         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
304         int begin, int end) throws com.liferay.portal.SystemException {
305         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
306             end);
307     }
308 
309     public static java.util.List findAll()
310         throws com.liferay.portal.SystemException {
311         return getPersistence().findAll();
312     }
313 
314     public static java.util.List findAll(int begin, int end)
315         throws com.liferay.portal.SystemException {
316         return getPersistence().findAll(begin, end);
317     }
318 
319     public static java.util.List findAll(int begin, int end,
320         com.liferay.portal.kernel.util.OrderByComparator obc)
321         throws com.liferay.portal.SystemException {
322         return getPersistence().findAll(begin, end, obc);
323     }
324 
325     public static void removeByCompanyId(long companyId)
326         throws com.liferay.portal.SystemException {
327         getPersistence().removeByCompanyId(companyId);
328     }
329 
330     public static void removeByUserId(long userId)
331         throws com.liferay.portal.SystemException {
332         getPersistence().removeByUserId(userId);
333     }
334 
335     public static void removeByC_C(long companyId, long classNameId)
336         throws com.liferay.portal.SystemException {
337         getPersistence().removeByC_C(companyId, classNameId);
338     }
339 
340     public static void removeByC_C_C(long companyId, long classNameId,
341         long classPK) throws com.liferay.portal.SystemException {
342         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
343     }
344 
345     public static void removeByC_C_C_P(long companyId, long classNameId,
346         long classPK, boolean primary)
347         throws com.liferay.portal.SystemException {
348         getPersistence().removeByC_C_C_P(companyId, classNameId, classPK,
349             primary);
350     }
351 
352     public static void removeAll() throws com.liferay.portal.SystemException {
353         getPersistence().removeAll();
354     }
355 
356     public static int countByCompanyId(long companyId)
357         throws com.liferay.portal.SystemException {
358         return getPersistence().countByCompanyId(companyId);
359     }
360 
361     public static int countByUserId(long userId)
362         throws com.liferay.portal.SystemException {
363         return getPersistence().countByUserId(userId);
364     }
365 
366     public static int countByC_C(long companyId, long classNameId)
367         throws com.liferay.portal.SystemException {
368         return getPersistence().countByC_C(companyId, classNameId);
369     }
370 
371     public static int countByC_C_C(long companyId, long classNameId,
372         long classPK) throws com.liferay.portal.SystemException {
373         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
374     }
375 
376     public static int countByC_C_C_P(long companyId, long classNameId,
377         long classPK, boolean primary)
378         throws com.liferay.portal.SystemException {
379         return getPersistence().countByC_C_C_P(companyId, classNameId, classPK,
380             primary);
381     }
382 
383     public static int countAll() throws com.liferay.portal.SystemException {
384         return getPersistence().countAll();
385     }
386 
387     public static EmailAddressPersistence getPersistence() {
388         return _getUtil()._persistence;
389     }
390 
391     public void setPersistence(EmailAddressPersistence persistence) {
392         _persistence = persistence;
393     }
394 
395     private static EmailAddressUtil _getUtil() {
396         if (_util == null) {
397             _util = (EmailAddressUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
398         }
399 
400         return _util;
401     }
402 
403     private static final String _UTIL = EmailAddressUtil.class.getName();
404     private static EmailAddressUtil _util;
405     private EmailAddressPersistence _persistence;
406 }