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="EmailAddressUtil.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       EmailAddressPersistence
36   * @see       EmailAddressPersistenceImpl
37   * @generated
38   */
39  public class EmailAddressUtil {
40      public static void cacheResult(
41          com.liferay.portal.model.EmailAddress emailAddress) {
42          getPersistence().cacheResult(emailAddress);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses) {
47          getPersistence().cacheResult(emailAddresses);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portal.model.EmailAddress create(
55          long emailAddressId) {
56          return getPersistence().create(emailAddressId);
57      }
58  
59      public static com.liferay.portal.model.EmailAddress remove(
60          long emailAddressId)
61          throws com.liferay.portal.NoSuchEmailAddressException,
62              com.liferay.portal.SystemException {
63          return getPersistence().remove(emailAddressId);
64      }
65  
66      public static com.liferay.portal.model.EmailAddress remove(
67          com.liferay.portal.model.EmailAddress emailAddress)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(emailAddress);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(EmailAddress, boolean merge)}.
74       */
75      public static com.liferay.portal.model.EmailAddress update(
76          com.liferay.portal.model.EmailAddress emailAddress)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(emailAddress);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  emailAddress the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when emailAddress is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portal.model.EmailAddress update(
94          com.liferay.portal.model.EmailAddress emailAddress, boolean merge)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().update(emailAddress, merge);
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.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.SystemException {
109         return getPersistence().findByPrimaryKey(emailAddressId);
110     }
111 
112     public static com.liferay.portal.model.EmailAddress fetchByPrimaryKey(
113         long emailAddressId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(emailAddressId);
115     }
116 
117     public static java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
118         long companyId) throws com.liferay.portal.SystemException {
119         return getPersistence().findByCompanyId(companyId);
120     }
121 
122     public static java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
123         long companyId, int start, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByCompanyId(companyId, start, end);
126     }
127 
128     public static java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
129         long companyId, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByCompanyId(companyId, start, end, obc);
133     }
134 
135     public static com.liferay.portal.model.EmailAddress findByCompanyId_First(
136         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.NoSuchEmailAddressException,
138             com.liferay.portal.SystemException {
139         return getPersistence().findByCompanyId_First(companyId, obc);
140     }
141 
142     public static com.liferay.portal.model.EmailAddress findByCompanyId_Last(
143         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.NoSuchEmailAddressException,
145             com.liferay.portal.SystemException {
146         return getPersistence().findByCompanyId_Last(companyId, obc);
147     }
148 
149     public static com.liferay.portal.model.EmailAddress[] findByCompanyId_PrevAndNext(
150         long emailAddressId, long companyId,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.NoSuchEmailAddressException,
153             com.liferay.portal.SystemException {
154         return getPersistence()
155                    .findByCompanyId_PrevAndNext(emailAddressId, companyId, obc);
156     }
157 
158     public static java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
159         long userId) throws com.liferay.portal.SystemException {
160         return getPersistence().findByUserId(userId);
161     }
162 
163     public static java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
164         long userId, int start, int end)
165         throws com.liferay.portal.SystemException {
166         return getPersistence().findByUserId(userId, start, end);
167     }
168 
169     public static java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
170         long userId, int start, int end,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException {
173         return getPersistence().findByUserId(userId, start, end, obc);
174     }
175 
176     public static com.liferay.portal.model.EmailAddress findByUserId_First(
177         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.NoSuchEmailAddressException,
179             com.liferay.portal.SystemException {
180         return getPersistence().findByUserId_First(userId, obc);
181     }
182 
183     public static com.liferay.portal.model.EmailAddress findByUserId_Last(
184         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.NoSuchEmailAddressException,
186             com.liferay.portal.SystemException {
187         return getPersistence().findByUserId_Last(userId, obc);
188     }
189 
190     public static com.liferay.portal.model.EmailAddress[] findByUserId_PrevAndNext(
191         long emailAddressId, long userId,
192         com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.NoSuchEmailAddressException,
194             com.liferay.portal.SystemException {
195         return getPersistence()
196                    .findByUserId_PrevAndNext(emailAddressId, userId, obc);
197     }
198 
199     public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
200         long companyId, long classNameId)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().findByC_C(companyId, classNameId);
203     }
204 
205     public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
206         long companyId, long classNameId, int start, int end)
207         throws com.liferay.portal.SystemException {
208         return getPersistence().findByC_C(companyId, classNameId, start, end);
209     }
210 
211     public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
212         long companyId, long classNameId, int start, int end,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException {
215         return getPersistence()
216                    .findByC_C(companyId, classNameId, start, end, obc);
217     }
218 
219     public static com.liferay.portal.model.EmailAddress findByC_C_First(
220         long companyId, long classNameId,
221         com.liferay.portal.kernel.util.OrderByComparator obc)
222         throws com.liferay.portal.NoSuchEmailAddressException,
223             com.liferay.portal.SystemException {
224         return getPersistence().findByC_C_First(companyId, classNameId, obc);
225     }
226 
227     public static com.liferay.portal.model.EmailAddress findByC_C_Last(
228         long companyId, long classNameId,
229         com.liferay.portal.kernel.util.OrderByComparator obc)
230         throws com.liferay.portal.NoSuchEmailAddressException,
231             com.liferay.portal.SystemException {
232         return getPersistence().findByC_C_Last(companyId, classNameId, obc);
233     }
234 
235     public static com.liferay.portal.model.EmailAddress[] findByC_C_PrevAndNext(
236         long emailAddressId, long companyId, long classNameId,
237         com.liferay.portal.kernel.util.OrderByComparator obc)
238         throws com.liferay.portal.NoSuchEmailAddressException,
239             com.liferay.portal.SystemException {
240         return getPersistence()
241                    .findByC_C_PrevAndNext(emailAddressId, companyId,
242             classNameId, obc);
243     }
244 
245     public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
246         long companyId, long classNameId, long classPK)
247         throws com.liferay.portal.SystemException {
248         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
249     }
250 
251     public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
252         long companyId, long classNameId, long classPK, int start, int end)
253         throws com.liferay.portal.SystemException {
254         return getPersistence()
255                    .findByC_C_C(companyId, classNameId, classPK, start, end);
256     }
257 
258     public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
259         long companyId, long classNameId, long classPK, int start, int end,
260         com.liferay.portal.kernel.util.OrderByComparator obc)
261         throws com.liferay.portal.SystemException {
262         return getPersistence()
263                    .findByC_C_C(companyId, classNameId, classPK, start, end, obc);
264     }
265 
266     public static com.liferay.portal.model.EmailAddress findByC_C_C_First(
267         long companyId, long classNameId, long classPK,
268         com.liferay.portal.kernel.util.OrderByComparator obc)
269         throws com.liferay.portal.NoSuchEmailAddressException,
270             com.liferay.portal.SystemException {
271         return getPersistence()
272                    .findByC_C_C_First(companyId, classNameId, classPK, obc);
273     }
274 
275     public static com.liferay.portal.model.EmailAddress findByC_C_C_Last(
276         long companyId, long classNameId, long classPK,
277         com.liferay.portal.kernel.util.OrderByComparator obc)
278         throws com.liferay.portal.NoSuchEmailAddressException,
279             com.liferay.portal.SystemException {
280         return getPersistence()
281                    .findByC_C_C_Last(companyId, classNameId, classPK, obc);
282     }
283 
284     public static com.liferay.portal.model.EmailAddress[] findByC_C_C_PrevAndNext(
285         long emailAddressId, long companyId, long classNameId, long classPK,
286         com.liferay.portal.kernel.util.OrderByComparator obc)
287         throws com.liferay.portal.NoSuchEmailAddressException,
288             com.liferay.portal.SystemException {
289         return getPersistence()
290                    .findByC_C_C_PrevAndNext(emailAddressId, companyId,
291             classNameId, classPK, obc);
292     }
293 
294     public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
295         long companyId, long classNameId, long classPK, boolean primary)
296         throws com.liferay.portal.SystemException {
297         return getPersistence()
298                    .findByC_C_C_P(companyId, classNameId, classPK, primary);
299     }
300 
301     public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
302         long companyId, long classNameId, long classPK, boolean primary,
303         int start, int end) throws com.liferay.portal.SystemException {
304         return getPersistence()
305                    .findByC_C_C_P(companyId, classNameId, classPK, primary,
306             start, end);
307     }
308 
309     public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
310         long companyId, long classNameId, long classPK, boolean primary,
311         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
312         throws com.liferay.portal.SystemException {
313         return getPersistence()
314                    .findByC_C_C_P(companyId, classNameId, classPK, primary,
315             start, end, obc);
316     }
317 
318     public static com.liferay.portal.model.EmailAddress findByC_C_C_P_First(
319         long companyId, long classNameId, long classPK, boolean primary,
320         com.liferay.portal.kernel.util.OrderByComparator obc)
321         throws com.liferay.portal.NoSuchEmailAddressException,
322             com.liferay.portal.SystemException {
323         return getPersistence()
324                    .findByC_C_C_P_First(companyId, classNameId, classPK,
325             primary, obc);
326     }
327 
328     public static com.liferay.portal.model.EmailAddress findByC_C_C_P_Last(
329         long companyId, long classNameId, long classPK, boolean primary,
330         com.liferay.portal.kernel.util.OrderByComparator obc)
331         throws com.liferay.portal.NoSuchEmailAddressException,
332             com.liferay.portal.SystemException {
333         return getPersistence()
334                    .findByC_C_C_P_Last(companyId, classNameId, classPK,
335             primary, obc);
336     }
337 
338     public static com.liferay.portal.model.EmailAddress[] findByC_C_C_P_PrevAndNext(
339         long emailAddressId, long companyId, long classNameId, long classPK,
340         boolean primary, com.liferay.portal.kernel.util.OrderByComparator obc)
341         throws com.liferay.portal.NoSuchEmailAddressException,
342             com.liferay.portal.SystemException {
343         return getPersistence()
344                    .findByC_C_C_P_PrevAndNext(emailAddressId, companyId,
345             classNameId, classPK, primary, obc);
346     }
347 
348     public static java.util.List<Object> findWithDynamicQuery(
349         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
350         throws com.liferay.portal.SystemException {
351         return getPersistence().findWithDynamicQuery(dynamicQuery);
352     }
353 
354     public static java.util.List<Object> findWithDynamicQuery(
355         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
356         int end) throws com.liferay.portal.SystemException {
357         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
358     }
359 
360     public static java.util.List<com.liferay.portal.model.EmailAddress> findAll()
361         throws com.liferay.portal.SystemException {
362         return getPersistence().findAll();
363     }
364 
365     public static java.util.List<com.liferay.portal.model.EmailAddress> findAll(
366         int start, int end) throws com.liferay.portal.SystemException {
367         return getPersistence().findAll(start, end);
368     }
369 
370     public static java.util.List<com.liferay.portal.model.EmailAddress> findAll(
371         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
372         throws com.liferay.portal.SystemException {
373         return getPersistence().findAll(start, end, obc);
374     }
375 
376     public static void removeByCompanyId(long companyId)
377         throws com.liferay.portal.SystemException {
378         getPersistence().removeByCompanyId(companyId);
379     }
380 
381     public static void removeByUserId(long userId)
382         throws com.liferay.portal.SystemException {
383         getPersistence().removeByUserId(userId);
384     }
385 
386     public static void removeByC_C(long companyId, long classNameId)
387         throws com.liferay.portal.SystemException {
388         getPersistence().removeByC_C(companyId, classNameId);
389     }
390 
391     public static void removeByC_C_C(long companyId, long classNameId,
392         long classPK) throws com.liferay.portal.SystemException {
393         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
394     }
395 
396     public static void removeByC_C_C_P(long companyId, long classNameId,
397         long classPK, boolean primary)
398         throws com.liferay.portal.SystemException {
399         getPersistence()
400             .removeByC_C_C_P(companyId, classNameId, classPK, primary);
401     }
402 
403     public static void removeAll() throws com.liferay.portal.SystemException {
404         getPersistence().removeAll();
405     }
406 
407     public static int countByCompanyId(long companyId)
408         throws com.liferay.portal.SystemException {
409         return getPersistence().countByCompanyId(companyId);
410     }
411 
412     public static int countByUserId(long userId)
413         throws com.liferay.portal.SystemException {
414         return getPersistence().countByUserId(userId);
415     }
416 
417     public static int countByC_C(long companyId, long classNameId)
418         throws com.liferay.portal.SystemException {
419         return getPersistence().countByC_C(companyId, classNameId);
420     }
421 
422     public static int countByC_C_C(long companyId, long classNameId,
423         long classPK) throws com.liferay.portal.SystemException {
424         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
425     }
426 
427     public static int countByC_C_C_P(long companyId, long classNameId,
428         long classPK, boolean primary)
429         throws com.liferay.portal.SystemException {
430         return getPersistence()
431                    .countByC_C_C_P(companyId, classNameId, classPK, primary);
432     }
433 
434     public static int countAll() throws com.liferay.portal.SystemException {
435         return getPersistence().countAll();
436     }
437 
438     public static EmailAddressPersistence getPersistence() {
439         return _persistence;
440     }
441 
442     public void setPersistence(EmailAddressPersistence persistence) {
443         _persistence = persistence;
444     }
445 
446     private static EmailAddressPersistence _persistence;
447 }