1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  import com.liferay.portal.model.Address;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="AddressUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       AddressPersistence
35   * @see       AddressPersistenceImpl
36   * @generated
37   */
38  public class AddressUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(Address)
48       */
49      public static void clearCache(Address address) {
50          getPersistence().clearCache(address);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static Address remove(Address address) throws SystemException {
81          return getPersistence().remove(address);
82      }
83  
84      /**
85       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
86       */
87      public static Address update(Address address, boolean merge)
88          throws SystemException {
89          return getPersistence().update(address, merge);
90      }
91  
92      public static void cacheResult(com.liferay.portal.model.Address address) {
93          getPersistence().cacheResult(address);
94      }
95  
96      public static void cacheResult(
97          java.util.List<com.liferay.portal.model.Address> addresses) {
98          getPersistence().cacheResult(addresses);
99      }
100 
101     public static com.liferay.portal.model.Address create(long addressId) {
102         return getPersistence().create(addressId);
103     }
104 
105     public static com.liferay.portal.model.Address remove(long addressId)
106         throws com.liferay.portal.NoSuchAddressException,
107             com.liferay.portal.SystemException {
108         return getPersistence().remove(addressId);
109     }
110 
111     /**
112      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
113      */
114     public static com.liferay.portal.model.Address update(
115         com.liferay.portal.model.Address address)
116         throws com.liferay.portal.SystemException {
117         return getPersistence().update(address);
118     }
119 
120     public static com.liferay.portal.model.Address updateImpl(
121         com.liferay.portal.model.Address address, boolean merge)
122         throws com.liferay.portal.SystemException {
123         return getPersistence().updateImpl(address, merge);
124     }
125 
126     public static com.liferay.portal.model.Address findByPrimaryKey(
127         long addressId)
128         throws com.liferay.portal.NoSuchAddressException,
129             com.liferay.portal.SystemException {
130         return getPersistence().findByPrimaryKey(addressId);
131     }
132 
133     public static com.liferay.portal.model.Address fetchByPrimaryKey(
134         long addressId) throws com.liferay.portal.SystemException {
135         return getPersistence().fetchByPrimaryKey(addressId);
136     }
137 
138     public static java.util.List<com.liferay.portal.model.Address> findByCompanyId(
139         long companyId) throws com.liferay.portal.SystemException {
140         return getPersistence().findByCompanyId(companyId);
141     }
142 
143     public static java.util.List<com.liferay.portal.model.Address> findByCompanyId(
144         long companyId, int start, int end)
145         throws com.liferay.portal.SystemException {
146         return getPersistence().findByCompanyId(companyId, start, end);
147     }
148 
149     public static java.util.List<com.liferay.portal.model.Address> findByCompanyId(
150         long companyId, int start, int end,
151         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152         throws com.liferay.portal.SystemException {
153         return getPersistence()
154                    .findByCompanyId(companyId, start, end, orderByComparator);
155     }
156 
157     public static com.liferay.portal.model.Address findByCompanyId_First(
158         long companyId,
159         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160         throws com.liferay.portal.NoSuchAddressException,
161             com.liferay.portal.SystemException {
162         return getPersistence()
163                    .findByCompanyId_First(companyId, orderByComparator);
164     }
165 
166     public static com.liferay.portal.model.Address findByCompanyId_Last(
167         long companyId,
168         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169         throws com.liferay.portal.NoSuchAddressException,
170             com.liferay.portal.SystemException {
171         return getPersistence()
172                    .findByCompanyId_Last(companyId, orderByComparator);
173     }
174 
175     public static com.liferay.portal.model.Address[] findByCompanyId_PrevAndNext(
176         long addressId, long companyId,
177         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178         throws com.liferay.portal.NoSuchAddressException,
179             com.liferay.portal.SystemException {
180         return getPersistence()
181                    .findByCompanyId_PrevAndNext(addressId, companyId,
182             orderByComparator);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.Address> findByUserId(
186         long userId) throws com.liferay.portal.SystemException {
187         return getPersistence().findByUserId(userId);
188     }
189 
190     public static java.util.List<com.liferay.portal.model.Address> findByUserId(
191         long userId, int start, int end)
192         throws com.liferay.portal.SystemException {
193         return getPersistence().findByUserId(userId, start, end);
194     }
195 
196     public static java.util.List<com.liferay.portal.model.Address> findByUserId(
197         long userId, int start, int end,
198         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
199         throws com.liferay.portal.SystemException {
200         return getPersistence()
201                    .findByUserId(userId, start, end, orderByComparator);
202     }
203 
204     public static com.liferay.portal.model.Address findByUserId_First(
205         long userId,
206         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207         throws com.liferay.portal.NoSuchAddressException,
208             com.liferay.portal.SystemException {
209         return getPersistence().findByUserId_First(userId, orderByComparator);
210     }
211 
212     public static com.liferay.portal.model.Address findByUserId_Last(
213         long userId,
214         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
215         throws com.liferay.portal.NoSuchAddressException,
216             com.liferay.portal.SystemException {
217         return getPersistence().findByUserId_Last(userId, orderByComparator);
218     }
219 
220     public static com.liferay.portal.model.Address[] findByUserId_PrevAndNext(
221         long addressId, long userId,
222         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
223         throws com.liferay.portal.NoSuchAddressException,
224             com.liferay.portal.SystemException {
225         return getPersistence()
226                    .findByUserId_PrevAndNext(addressId, userId,
227             orderByComparator);
228     }
229 
230     public static java.util.List<com.liferay.portal.model.Address> findByC_C(
231         long companyId, long classNameId)
232         throws com.liferay.portal.SystemException {
233         return getPersistence().findByC_C(companyId, classNameId);
234     }
235 
236     public static java.util.List<com.liferay.portal.model.Address> findByC_C(
237         long companyId, long classNameId, int start, int end)
238         throws com.liferay.portal.SystemException {
239         return getPersistence().findByC_C(companyId, classNameId, start, end);
240     }
241 
242     public static java.util.List<com.liferay.portal.model.Address> findByC_C(
243         long companyId, long classNameId, int start, int end,
244         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
245         throws com.liferay.portal.SystemException {
246         return getPersistence()
247                    .findByC_C(companyId, classNameId, start, end,
248             orderByComparator);
249     }
250 
251     public static com.liferay.portal.model.Address findByC_C_First(
252         long companyId, long classNameId,
253         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
254         throws com.liferay.portal.NoSuchAddressException,
255             com.liferay.portal.SystemException {
256         return getPersistence()
257                    .findByC_C_First(companyId, classNameId, orderByComparator);
258     }
259 
260     public static com.liferay.portal.model.Address findByC_C_Last(
261         long companyId, long classNameId,
262         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
263         throws com.liferay.portal.NoSuchAddressException,
264             com.liferay.portal.SystemException {
265         return getPersistence()
266                    .findByC_C_Last(companyId, classNameId, orderByComparator);
267     }
268 
269     public static com.liferay.portal.model.Address[] findByC_C_PrevAndNext(
270         long addressId, long companyId, long classNameId,
271         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272         throws com.liferay.portal.NoSuchAddressException,
273             com.liferay.portal.SystemException {
274         return getPersistence()
275                    .findByC_C_PrevAndNext(addressId, companyId, classNameId,
276             orderByComparator);
277     }
278 
279     public static java.util.List<com.liferay.portal.model.Address> findByC_C_C(
280         long companyId, long classNameId, long classPK)
281         throws com.liferay.portal.SystemException {
282         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
283     }
284 
285     public static java.util.List<com.liferay.portal.model.Address> findByC_C_C(
286         long companyId, long classNameId, long classPK, int start, int end)
287         throws com.liferay.portal.SystemException {
288         return getPersistence()
289                    .findByC_C_C(companyId, classNameId, classPK, start, end);
290     }
291 
292     public static java.util.List<com.liferay.portal.model.Address> findByC_C_C(
293         long companyId, long classNameId, long classPK, int start, int end,
294         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
295         throws com.liferay.portal.SystemException {
296         return getPersistence()
297                    .findByC_C_C(companyId, classNameId, classPK, start, end,
298             orderByComparator);
299     }
300 
301     public static com.liferay.portal.model.Address findByC_C_C_First(
302         long companyId, long classNameId, long classPK,
303         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
304         throws com.liferay.portal.NoSuchAddressException,
305             com.liferay.portal.SystemException {
306         return getPersistence()
307                    .findByC_C_C_First(companyId, classNameId, classPK,
308             orderByComparator);
309     }
310 
311     public static com.liferay.portal.model.Address findByC_C_C_Last(
312         long companyId, long classNameId, long classPK,
313         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
314         throws com.liferay.portal.NoSuchAddressException,
315             com.liferay.portal.SystemException {
316         return getPersistence()
317                    .findByC_C_C_Last(companyId, classNameId, classPK,
318             orderByComparator);
319     }
320 
321     public static com.liferay.portal.model.Address[] findByC_C_C_PrevAndNext(
322         long addressId, long companyId, long classNameId, long classPK,
323         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
324         throws com.liferay.portal.NoSuchAddressException,
325             com.liferay.portal.SystemException {
326         return getPersistence()
327                    .findByC_C_C_PrevAndNext(addressId, companyId, classNameId,
328             classPK, orderByComparator);
329     }
330 
331     public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
332         long companyId, long classNameId, long classPK, boolean mailing)
333         throws com.liferay.portal.SystemException {
334         return getPersistence()
335                    .findByC_C_C_M(companyId, classNameId, classPK, mailing);
336     }
337 
338     public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
339         long companyId, long classNameId, long classPK, boolean mailing,
340         int start, int end) throws com.liferay.portal.SystemException {
341         return getPersistence()
342                    .findByC_C_C_M(companyId, classNameId, classPK, mailing,
343             start, end);
344     }
345 
346     public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
347         long companyId, long classNameId, long classPK, boolean mailing,
348         int start, int end,
349         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
350         throws com.liferay.portal.SystemException {
351         return getPersistence()
352                    .findByC_C_C_M(companyId, classNameId, classPK, mailing,
353             start, end, orderByComparator);
354     }
355 
356     public static com.liferay.portal.model.Address findByC_C_C_M_First(
357         long companyId, long classNameId, long classPK, boolean mailing,
358         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
359         throws com.liferay.portal.NoSuchAddressException,
360             com.liferay.portal.SystemException {
361         return getPersistence()
362                    .findByC_C_C_M_First(companyId, classNameId, classPK,
363             mailing, orderByComparator);
364     }
365 
366     public static com.liferay.portal.model.Address findByC_C_C_M_Last(
367         long companyId, long classNameId, long classPK, boolean mailing,
368         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
369         throws com.liferay.portal.NoSuchAddressException,
370             com.liferay.portal.SystemException {
371         return getPersistence()
372                    .findByC_C_C_M_Last(companyId, classNameId, classPK,
373             mailing, orderByComparator);
374     }
375 
376     public static com.liferay.portal.model.Address[] findByC_C_C_M_PrevAndNext(
377         long addressId, long companyId, long classNameId, long classPK,
378         boolean mailing,
379         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
380         throws com.liferay.portal.NoSuchAddressException,
381             com.liferay.portal.SystemException {
382         return getPersistence()
383                    .findByC_C_C_M_PrevAndNext(addressId, companyId,
384             classNameId, classPK, mailing, orderByComparator);
385     }
386 
387     public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
388         long companyId, long classNameId, long classPK, boolean primary)
389         throws com.liferay.portal.SystemException {
390         return getPersistence()
391                    .findByC_C_C_P(companyId, classNameId, classPK, primary);
392     }
393 
394     public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
395         long companyId, long classNameId, long classPK, boolean primary,
396         int start, int end) throws com.liferay.portal.SystemException {
397         return getPersistence()
398                    .findByC_C_C_P(companyId, classNameId, classPK, primary,
399             start, end);
400     }
401 
402     public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
403         long companyId, long classNameId, long classPK, boolean primary,
404         int start, int end,
405         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
406         throws com.liferay.portal.SystemException {
407         return getPersistence()
408                    .findByC_C_C_P(companyId, classNameId, classPK, primary,
409             start, end, orderByComparator);
410     }
411 
412     public static com.liferay.portal.model.Address findByC_C_C_P_First(
413         long companyId, long classNameId, long classPK, boolean primary,
414         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415         throws com.liferay.portal.NoSuchAddressException,
416             com.liferay.portal.SystemException {
417         return getPersistence()
418                    .findByC_C_C_P_First(companyId, classNameId, classPK,
419             primary, orderByComparator);
420     }
421 
422     public static com.liferay.portal.model.Address findByC_C_C_P_Last(
423         long companyId, long classNameId, long classPK, boolean primary,
424         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
425         throws com.liferay.portal.NoSuchAddressException,
426             com.liferay.portal.SystemException {
427         return getPersistence()
428                    .findByC_C_C_P_Last(companyId, classNameId, classPK,
429             primary, orderByComparator);
430     }
431 
432     public static com.liferay.portal.model.Address[] findByC_C_C_P_PrevAndNext(
433         long addressId, long companyId, long classNameId, long classPK,
434         boolean primary,
435         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
436         throws com.liferay.portal.NoSuchAddressException,
437             com.liferay.portal.SystemException {
438         return getPersistence()
439                    .findByC_C_C_P_PrevAndNext(addressId, companyId,
440             classNameId, classPK, primary, orderByComparator);
441     }
442 
443     public static java.util.List<com.liferay.portal.model.Address> findAll()
444         throws com.liferay.portal.SystemException {
445         return getPersistence().findAll();
446     }
447 
448     public static java.util.List<com.liferay.portal.model.Address> findAll(
449         int start, int end) throws com.liferay.portal.SystemException {
450         return getPersistence().findAll(start, end);
451     }
452 
453     public static java.util.List<com.liferay.portal.model.Address> findAll(
454         int start, int end,
455         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
456         throws com.liferay.portal.SystemException {
457         return getPersistence().findAll(start, end, orderByComparator);
458     }
459 
460     public static void removeByCompanyId(long companyId)
461         throws com.liferay.portal.SystemException {
462         getPersistence().removeByCompanyId(companyId);
463     }
464 
465     public static void removeByUserId(long userId)
466         throws com.liferay.portal.SystemException {
467         getPersistence().removeByUserId(userId);
468     }
469 
470     public static void removeByC_C(long companyId, long classNameId)
471         throws com.liferay.portal.SystemException {
472         getPersistence().removeByC_C(companyId, classNameId);
473     }
474 
475     public static void removeByC_C_C(long companyId, long classNameId,
476         long classPK) throws com.liferay.portal.SystemException {
477         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
478     }
479 
480     public static void removeByC_C_C_M(long companyId, long classNameId,
481         long classPK, boolean mailing)
482         throws com.liferay.portal.SystemException {
483         getPersistence()
484             .removeByC_C_C_M(companyId, classNameId, classPK, mailing);
485     }
486 
487     public static void removeByC_C_C_P(long companyId, long classNameId,
488         long classPK, boolean primary)
489         throws com.liferay.portal.SystemException {
490         getPersistence()
491             .removeByC_C_C_P(companyId, classNameId, classPK, primary);
492     }
493 
494     public static void removeAll() throws com.liferay.portal.SystemException {
495         getPersistence().removeAll();
496     }
497 
498     public static int countByCompanyId(long companyId)
499         throws com.liferay.portal.SystemException {
500         return getPersistence().countByCompanyId(companyId);
501     }
502 
503     public static int countByUserId(long userId)
504         throws com.liferay.portal.SystemException {
505         return getPersistence().countByUserId(userId);
506     }
507 
508     public static int countByC_C(long companyId, long classNameId)
509         throws com.liferay.portal.SystemException {
510         return getPersistence().countByC_C(companyId, classNameId);
511     }
512 
513     public static int countByC_C_C(long companyId, long classNameId,
514         long classPK) throws com.liferay.portal.SystemException {
515         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
516     }
517 
518     public static int countByC_C_C_M(long companyId, long classNameId,
519         long classPK, boolean mailing)
520         throws com.liferay.portal.SystemException {
521         return getPersistence()
522                    .countByC_C_C_M(companyId, classNameId, classPK, mailing);
523     }
524 
525     public static int countByC_C_C_P(long companyId, long classNameId,
526         long classPK, boolean primary)
527         throws com.liferay.portal.SystemException {
528         return getPersistence()
529                    .countByC_C_C_P(companyId, classNameId, classPK, primary);
530     }
531 
532     public static int countAll() throws com.liferay.portal.SystemException {
533         return getPersistence().countAll();
534     }
535 
536     public static AddressPersistence getPersistence() {
537         if (_persistence == null) {
538             _persistence = (AddressPersistence)PortalBeanLocatorUtil.locate(AddressPersistence.class.getName());
539 
540             ReferenceRegistry.registerReference(AddressUtil.class,
541                 "_persistence");
542         }
543 
544         return _persistence;
545     }
546 
547     public void setPersistence(AddressPersistence persistence) {
548         _persistence = persistence;
549 
550         ReferenceRegistry.registerReference(AddressUtil.class, "_persistence");
551     }
552 
553     private static AddressPersistence _persistence;
554 }