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