001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.EmailAddress;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       EmailAddressPersistence
029     * @see       EmailAddressPersistenceImpl
030     * @generated
031     */
032    public class EmailAddressUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(EmailAddress emailAddress) {
044                    getPersistence().clearCache(emailAddress);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<EmailAddress> findWithDynamicQuery(
059                    DynamicQuery dynamicQuery) throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<EmailAddress> findWithDynamicQuery(
067                    DynamicQuery dynamicQuery, int start, int end)
068                    throws SystemException {
069                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
074             */
075            public static List<EmailAddress> findWithDynamicQuery(
076                    DynamicQuery dynamicQuery, int start, int end,
077                    OrderByComparator orderByComparator) throws SystemException {
078                    return getPersistence()
079                                       .findWithDynamicQuery(dynamicQuery, start, end,
080                            orderByComparator);
081            }
082    
083            /**
084             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
085             */
086            public static EmailAddress remove(EmailAddress emailAddress)
087                    throws SystemException {
088                    return getPersistence().remove(emailAddress);
089            }
090    
091            /**
092             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
093             */
094            public static EmailAddress update(EmailAddress emailAddress, boolean merge)
095                    throws SystemException {
096                    return getPersistence().update(emailAddress, merge);
097            }
098    
099            /**
100             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
101             */
102            public static EmailAddress update(EmailAddress emailAddress, boolean merge,
103                    ServiceContext serviceContext) throws SystemException {
104                    return getPersistence().update(emailAddress, merge, serviceContext);
105            }
106    
107            public static void cacheResult(
108                    com.liferay.portal.model.EmailAddress emailAddress) {
109                    getPersistence().cacheResult(emailAddress);
110            }
111    
112            public static void cacheResult(
113                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses) {
114                    getPersistence().cacheResult(emailAddresses);
115            }
116    
117            public static com.liferay.portal.model.EmailAddress create(
118                    long emailAddressId) {
119                    return getPersistence().create(emailAddressId);
120            }
121    
122            public static com.liferay.portal.model.EmailAddress remove(
123                    long emailAddressId)
124                    throws com.liferay.portal.NoSuchEmailAddressException,
125                            com.liferay.portal.kernel.exception.SystemException {
126                    return getPersistence().remove(emailAddressId);
127            }
128    
129            public static com.liferay.portal.model.EmailAddress updateImpl(
130                    com.liferay.portal.model.EmailAddress emailAddress, boolean merge)
131                    throws com.liferay.portal.kernel.exception.SystemException {
132                    return getPersistence().updateImpl(emailAddress, merge);
133            }
134    
135            public static com.liferay.portal.model.EmailAddress findByPrimaryKey(
136                    long emailAddressId)
137                    throws com.liferay.portal.NoSuchEmailAddressException,
138                            com.liferay.portal.kernel.exception.SystemException {
139                    return getPersistence().findByPrimaryKey(emailAddressId);
140            }
141    
142            public static com.liferay.portal.model.EmailAddress fetchByPrimaryKey(
143                    long emailAddressId)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return getPersistence().fetchByPrimaryKey(emailAddressId);
146            }
147    
148            public static java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
149                    long companyId)
150                    throws com.liferay.portal.kernel.exception.SystemException {
151                    return getPersistence().findByCompanyId(companyId);
152            }
153    
154            public static java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
155                    long companyId, int start, int end)
156                    throws com.liferay.portal.kernel.exception.SystemException {
157                    return getPersistence().findByCompanyId(companyId, start, end);
158            }
159    
160            public static java.util.List<com.liferay.portal.model.EmailAddress> findByCompanyId(
161                    long companyId, int start, int end,
162                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getPersistence()
165                                       .findByCompanyId(companyId, start, end, orderByComparator);
166            }
167    
168            public static com.liferay.portal.model.EmailAddress findByCompanyId_First(
169                    long companyId,
170                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
171                    throws com.liferay.portal.NoSuchEmailAddressException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return getPersistence()
174                                       .findByCompanyId_First(companyId, orderByComparator);
175            }
176    
177            public static com.liferay.portal.model.EmailAddress findByCompanyId_Last(
178                    long companyId,
179                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180                    throws com.liferay.portal.NoSuchEmailAddressException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return getPersistence()
183                                       .findByCompanyId_Last(companyId, orderByComparator);
184            }
185    
186            public static com.liferay.portal.model.EmailAddress[] findByCompanyId_PrevAndNext(
187                    long emailAddressId, long companyId,
188                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
189                    throws com.liferay.portal.NoSuchEmailAddressException,
190                            com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence()
192                                       .findByCompanyId_PrevAndNext(emailAddressId, companyId,
193                            orderByComparator);
194            }
195    
196            public static java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
197                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
198                    return getPersistence().findByUserId(userId);
199            }
200    
201            public static java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
202                    long userId, int start, int end)
203                    throws com.liferay.portal.kernel.exception.SystemException {
204                    return getPersistence().findByUserId(userId, start, end);
205            }
206    
207            public static java.util.List<com.liferay.portal.model.EmailAddress> findByUserId(
208                    long userId, int start, int end,
209                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210                    throws com.liferay.portal.kernel.exception.SystemException {
211                    return getPersistence()
212                                       .findByUserId(userId, start, end, orderByComparator);
213            }
214    
215            public static com.liferay.portal.model.EmailAddress findByUserId_First(
216                    long userId,
217                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
218                    throws com.liferay.portal.NoSuchEmailAddressException,
219                            com.liferay.portal.kernel.exception.SystemException {
220                    return getPersistence().findByUserId_First(userId, orderByComparator);
221            }
222    
223            public static com.liferay.portal.model.EmailAddress findByUserId_Last(
224                    long userId,
225                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
226                    throws com.liferay.portal.NoSuchEmailAddressException,
227                            com.liferay.portal.kernel.exception.SystemException {
228                    return getPersistence().findByUserId_Last(userId, orderByComparator);
229            }
230    
231            public static com.liferay.portal.model.EmailAddress[] findByUserId_PrevAndNext(
232                    long emailAddressId, long userId,
233                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
234                    throws com.liferay.portal.NoSuchEmailAddressException,
235                            com.liferay.portal.kernel.exception.SystemException {
236                    return getPersistence()
237                                       .findByUserId_PrevAndNext(emailAddressId, userId,
238                            orderByComparator);
239            }
240    
241            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
242                    long companyId, long classNameId)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence().findByC_C(companyId, classNameId);
245            }
246    
247            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
248                    long companyId, long classNameId, int start, int end)
249                    throws com.liferay.portal.kernel.exception.SystemException {
250                    return getPersistence().findByC_C(companyId, classNameId, start, end);
251            }
252    
253            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C(
254                    long companyId, long classNameId, int start, int end,
255                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
256                    throws com.liferay.portal.kernel.exception.SystemException {
257                    return getPersistence()
258                                       .findByC_C(companyId, classNameId, start, end,
259                            orderByComparator);
260            }
261    
262            public static com.liferay.portal.model.EmailAddress findByC_C_First(
263                    long companyId, long classNameId,
264                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
265                    throws com.liferay.portal.NoSuchEmailAddressException,
266                            com.liferay.portal.kernel.exception.SystemException {
267                    return getPersistence()
268                                       .findByC_C_First(companyId, classNameId, orderByComparator);
269            }
270    
271            public static com.liferay.portal.model.EmailAddress findByC_C_Last(
272                    long companyId, long classNameId,
273                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
274                    throws com.liferay.portal.NoSuchEmailAddressException,
275                            com.liferay.portal.kernel.exception.SystemException {
276                    return getPersistence()
277                                       .findByC_C_Last(companyId, classNameId, orderByComparator);
278            }
279    
280            public static com.liferay.portal.model.EmailAddress[] findByC_C_PrevAndNext(
281                    long emailAddressId, long companyId, long classNameId,
282                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
283                    throws com.liferay.portal.NoSuchEmailAddressException,
284                            com.liferay.portal.kernel.exception.SystemException {
285                    return getPersistence()
286                                       .findByC_C_PrevAndNext(emailAddressId, companyId,
287                            classNameId, orderByComparator);
288            }
289    
290            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
291                    long companyId, long classNameId, long classPK)
292                    throws com.liferay.portal.kernel.exception.SystemException {
293                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
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                    throws com.liferay.portal.kernel.exception.SystemException {
299                    return getPersistence()
300                                       .findByC_C_C(companyId, classNameId, classPK, start, end);
301            }
302    
303            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C(
304                    long companyId, long classNameId, long classPK, int start, int end,
305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
306                    throws com.liferay.portal.kernel.exception.SystemException {
307                    return getPersistence()
308                                       .findByC_C_C(companyId, classNameId, classPK, start, end,
309                            orderByComparator);
310            }
311    
312            public static com.liferay.portal.model.EmailAddress findByC_C_C_First(
313                    long companyId, long classNameId, long classPK,
314                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
315                    throws com.liferay.portal.NoSuchEmailAddressException,
316                            com.liferay.portal.kernel.exception.SystemException {
317                    return getPersistence()
318                                       .findByC_C_C_First(companyId, classNameId, classPK,
319                            orderByComparator);
320            }
321    
322            public static com.liferay.portal.model.EmailAddress findByC_C_C_Last(
323                    long companyId, long classNameId, long classPK,
324                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
325                    throws com.liferay.portal.NoSuchEmailAddressException,
326                            com.liferay.portal.kernel.exception.SystemException {
327                    return getPersistence()
328                                       .findByC_C_C_Last(companyId, classNameId, classPK,
329                            orderByComparator);
330            }
331    
332            public static com.liferay.portal.model.EmailAddress[] findByC_C_C_PrevAndNext(
333                    long emailAddressId, long companyId, long classNameId, long classPK,
334                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
335                    throws com.liferay.portal.NoSuchEmailAddressException,
336                            com.liferay.portal.kernel.exception.SystemException {
337                    return getPersistence()
338                                       .findByC_C_C_PrevAndNext(emailAddressId, companyId,
339                            classNameId, classPK, orderByComparator);
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                    throws com.liferay.portal.kernel.exception.SystemException {
345                    return getPersistence()
346                                       .findByC_C_C_P(companyId, classNameId, classPK, primary);
347            }
348    
349            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
350                    long companyId, long classNameId, long classPK, boolean primary,
351                    int start, int end)
352                    throws com.liferay.portal.kernel.exception.SystemException {
353                    return getPersistence()
354                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
355                            start, end);
356            }
357    
358            public static java.util.List<com.liferay.portal.model.EmailAddress> findByC_C_C_P(
359                    long companyId, long classNameId, long classPK, boolean primary,
360                    int start, int end,
361                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
362                    throws com.liferay.portal.kernel.exception.SystemException {
363                    return getPersistence()
364                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
365                            start, end, orderByComparator);
366            }
367    
368            public static com.liferay.portal.model.EmailAddress findByC_C_C_P_First(
369                    long companyId, long classNameId, long classPK, boolean primary,
370                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
371                    throws com.liferay.portal.NoSuchEmailAddressException,
372                            com.liferay.portal.kernel.exception.SystemException {
373                    return getPersistence()
374                                       .findByC_C_C_P_First(companyId, classNameId, classPK,
375                            primary, orderByComparator);
376            }
377    
378            public static com.liferay.portal.model.EmailAddress findByC_C_C_P_Last(
379                    long companyId, long classNameId, long classPK, boolean primary,
380                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
381                    throws com.liferay.portal.NoSuchEmailAddressException,
382                            com.liferay.portal.kernel.exception.SystemException {
383                    return getPersistence()
384                                       .findByC_C_C_P_Last(companyId, classNameId, classPK,
385                            primary, orderByComparator);
386            }
387    
388            public static com.liferay.portal.model.EmailAddress[] findByC_C_C_P_PrevAndNext(
389                    long emailAddressId, long companyId, long classNameId, long classPK,
390                    boolean primary,
391                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
392                    throws com.liferay.portal.NoSuchEmailAddressException,
393                            com.liferay.portal.kernel.exception.SystemException {
394                    return getPersistence()
395                                       .findByC_C_C_P_PrevAndNext(emailAddressId, companyId,
396                            classNameId, classPK, primary, orderByComparator);
397            }
398    
399            public static java.util.List<com.liferay.portal.model.EmailAddress> findAll()
400                    throws com.liferay.portal.kernel.exception.SystemException {
401                    return getPersistence().findAll();
402            }
403    
404            public static java.util.List<com.liferay.portal.model.EmailAddress> findAll(
405                    int start, int end)
406                    throws com.liferay.portal.kernel.exception.SystemException {
407                    return getPersistence().findAll(start, end);
408            }
409    
410            public static java.util.List<com.liferay.portal.model.EmailAddress> findAll(
411                    int start, int end,
412                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
413                    throws com.liferay.portal.kernel.exception.SystemException {
414                    return getPersistence().findAll(start, end, orderByComparator);
415            }
416    
417            public static void removeByCompanyId(long companyId)
418                    throws com.liferay.portal.kernel.exception.SystemException {
419                    getPersistence().removeByCompanyId(companyId);
420            }
421    
422            public static void removeByUserId(long userId)
423                    throws com.liferay.portal.kernel.exception.SystemException {
424                    getPersistence().removeByUserId(userId);
425            }
426    
427            public static void removeByC_C(long companyId, long classNameId)
428                    throws com.liferay.portal.kernel.exception.SystemException {
429                    getPersistence().removeByC_C(companyId, classNameId);
430            }
431    
432            public static void removeByC_C_C(long companyId, long classNameId,
433                    long classPK)
434                    throws com.liferay.portal.kernel.exception.SystemException {
435                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
436            }
437    
438            public static void removeByC_C_C_P(long companyId, long classNameId,
439                    long classPK, boolean primary)
440                    throws com.liferay.portal.kernel.exception.SystemException {
441                    getPersistence()
442                            .removeByC_C_C_P(companyId, classNameId, classPK, primary);
443            }
444    
445            public static void removeAll()
446                    throws com.liferay.portal.kernel.exception.SystemException {
447                    getPersistence().removeAll();
448            }
449    
450            public static int countByCompanyId(long companyId)
451                    throws com.liferay.portal.kernel.exception.SystemException {
452                    return getPersistence().countByCompanyId(companyId);
453            }
454    
455            public static int countByUserId(long userId)
456                    throws com.liferay.portal.kernel.exception.SystemException {
457                    return getPersistence().countByUserId(userId);
458            }
459    
460            public static int countByC_C(long companyId, long classNameId)
461                    throws com.liferay.portal.kernel.exception.SystemException {
462                    return getPersistence().countByC_C(companyId, classNameId);
463            }
464    
465            public static int countByC_C_C(long companyId, long classNameId,
466                    long classPK)
467                    throws com.liferay.portal.kernel.exception.SystemException {
468                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
469            }
470    
471            public static int countByC_C_C_P(long companyId, long classNameId,
472                    long classPK, boolean primary)
473                    throws com.liferay.portal.kernel.exception.SystemException {
474                    return getPersistence()
475                                       .countByC_C_C_P(companyId, classNameId, classPK, primary);
476            }
477    
478            public static int countAll()
479                    throws com.liferay.portal.kernel.exception.SystemException {
480                    return getPersistence().countAll();
481            }
482    
483            public static EmailAddressPersistence getPersistence() {
484                    if (_persistence == null) {
485                            _persistence = (EmailAddressPersistence)PortalBeanLocatorUtil.locate(EmailAddressPersistence.class.getName());
486                    }
487    
488                    return _persistence;
489            }
490    
491            public void setPersistence(EmailAddressPersistence persistence) {
492                    _persistence = persistence;
493            }
494    
495            private static EmailAddressPersistence _persistence;
496    }