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