1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  /**
26   * <a href="AddressUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class AddressUtil {
32      public static com.liferay.portal.model.Address create(long addressId) {
33          return getPersistence().create(addressId);
34      }
35  
36      public static com.liferay.portal.model.Address remove(long addressId)
37          throws com.liferay.portal.SystemException, 
38              com.liferay.portal.NoSuchAddressException {
39          return getPersistence().remove(addressId);
40      }
41  
42      public static com.liferay.portal.model.Address remove(
43          com.liferay.portal.model.Address address)
44          throws com.liferay.portal.SystemException {
45          return getPersistence().remove(address);
46      }
47  
48      public static com.liferay.portal.model.Address update(
49          com.liferay.portal.model.Address address)
50          throws com.liferay.portal.SystemException {
51          return getPersistence().update(address);
52      }
53  
54      public static com.liferay.portal.model.Address update(
55          com.liferay.portal.model.Address address, boolean merge)
56          throws com.liferay.portal.SystemException {
57          return getPersistence().update(address, merge);
58      }
59  
60      public static com.liferay.portal.model.Address updateImpl(
61          com.liferay.portal.model.Address address, boolean merge)
62          throws com.liferay.portal.SystemException {
63          return getPersistence().updateImpl(address, merge);
64      }
65  
66      public static com.liferay.portal.model.Address findByPrimaryKey(
67          long addressId)
68          throws com.liferay.portal.SystemException, 
69              com.liferay.portal.NoSuchAddressException {
70          return getPersistence().findByPrimaryKey(addressId);
71      }
72  
73      public static com.liferay.portal.model.Address fetchByPrimaryKey(
74          long addressId) throws com.liferay.portal.SystemException {
75          return getPersistence().fetchByPrimaryKey(addressId);
76      }
77  
78      public static java.util.List findByCompanyId(long companyId)
79          throws com.liferay.portal.SystemException {
80          return getPersistence().findByCompanyId(companyId);
81      }
82  
83      public static java.util.List findByCompanyId(long companyId, int begin,
84          int end) throws com.liferay.portal.SystemException {
85          return getPersistence().findByCompanyId(companyId, begin, end);
86      }
87  
88      public static java.util.List findByCompanyId(long companyId, int begin,
89          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
90          throws com.liferay.portal.SystemException {
91          return getPersistence().findByCompanyId(companyId, begin, end, obc);
92      }
93  
94      public static com.liferay.portal.model.Address findByCompanyId_First(
95          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
96          throws com.liferay.portal.SystemException, 
97              com.liferay.portal.NoSuchAddressException {
98          return getPersistence().findByCompanyId_First(companyId, obc);
99      }
100 
101     public static com.liferay.portal.model.Address findByCompanyId_Last(
102         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException, 
104             com.liferay.portal.NoSuchAddressException {
105         return getPersistence().findByCompanyId_Last(companyId, obc);
106     }
107 
108     public static com.liferay.portal.model.Address[] findByCompanyId_PrevAndNext(
109         long addressId, long companyId,
110         com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.SystemException, 
112             com.liferay.portal.NoSuchAddressException {
113         return getPersistence().findByCompanyId_PrevAndNext(addressId,
114             companyId, obc);
115     }
116 
117     public static java.util.List findByUserId(long userId)
118         throws com.liferay.portal.SystemException {
119         return getPersistence().findByUserId(userId);
120     }
121 
122     public static java.util.List findByUserId(long userId, int begin, int end)
123         throws com.liferay.portal.SystemException {
124         return getPersistence().findByUserId(userId, begin, end);
125     }
126 
127     public static java.util.List findByUserId(long userId, int begin, int end,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException {
130         return getPersistence().findByUserId(userId, begin, end, obc);
131     }
132 
133     public static com.liferay.portal.model.Address findByUserId_First(
134         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.SystemException, 
136             com.liferay.portal.NoSuchAddressException {
137         return getPersistence().findByUserId_First(userId, obc);
138     }
139 
140     public static com.liferay.portal.model.Address findByUserId_Last(
141         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException, 
143             com.liferay.portal.NoSuchAddressException {
144         return getPersistence().findByUserId_Last(userId, obc);
145     }
146 
147     public static com.liferay.portal.model.Address[] findByUserId_PrevAndNext(
148         long addressId, long userId,
149         com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.SystemException, 
151             com.liferay.portal.NoSuchAddressException {
152         return getPersistence().findByUserId_PrevAndNext(addressId, userId, obc);
153     }
154 
155     public static java.util.List findByC_C(long companyId, long classNameId)
156         throws com.liferay.portal.SystemException {
157         return getPersistence().findByC_C(companyId, classNameId);
158     }
159 
160     public static java.util.List findByC_C(long companyId, long classNameId,
161         int begin, int end) throws com.liferay.portal.SystemException {
162         return getPersistence().findByC_C(companyId, classNameId, begin, end);
163     }
164 
165     public static java.util.List findByC_C(long companyId, long classNameId,
166         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
167         throws com.liferay.portal.SystemException {
168         return getPersistence().findByC_C(companyId, classNameId, begin, end,
169             obc);
170     }
171 
172     public static com.liferay.portal.model.Address findByC_C_First(
173         long companyId, long classNameId,
174         com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.SystemException, 
176             com.liferay.portal.NoSuchAddressException {
177         return getPersistence().findByC_C_First(companyId, classNameId, obc);
178     }
179 
180     public static com.liferay.portal.model.Address findByC_C_Last(
181         long companyId, long classNameId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException, 
184             com.liferay.portal.NoSuchAddressException {
185         return getPersistence().findByC_C_Last(companyId, classNameId, obc);
186     }
187 
188     public static com.liferay.portal.model.Address[] findByC_C_PrevAndNext(
189         long addressId, long companyId, long classNameId,
190         com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException, 
192             com.liferay.portal.NoSuchAddressException {
193         return getPersistence().findByC_C_PrevAndNext(addressId, companyId,
194             classNameId, obc);
195     }
196 
197     public static java.util.List findByC_C_C(long companyId, long classNameId,
198         long classPK) throws com.liferay.portal.SystemException {
199         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
200     }
201 
202     public static java.util.List findByC_C_C(long companyId, long classNameId,
203         long classPK, int begin, int end)
204         throws com.liferay.portal.SystemException {
205         return getPersistence().findByC_C_C(companyId, classNameId, classPK,
206             begin, end);
207     }
208 
209     public static java.util.List findByC_C_C(long companyId, long classNameId,
210         long classPK, int begin, int end,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.SystemException {
213         return getPersistence().findByC_C_C(companyId, classNameId, classPK,
214             begin, end, obc);
215     }
216 
217     public static com.liferay.portal.model.Address findByC_C_C_First(
218         long companyId, long classNameId, long classPK,
219         com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException, 
221             com.liferay.portal.NoSuchAddressException {
222         return getPersistence().findByC_C_C_First(companyId, classNameId,
223             classPK, obc);
224     }
225 
226     public static com.liferay.portal.model.Address findByC_C_C_Last(
227         long companyId, long classNameId, long classPK,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.SystemException, 
230             com.liferay.portal.NoSuchAddressException {
231         return getPersistence().findByC_C_C_Last(companyId, classNameId,
232             classPK, obc);
233     }
234 
235     public static com.liferay.portal.model.Address[] findByC_C_C_PrevAndNext(
236         long addressId, long companyId, long classNameId, long classPK,
237         com.liferay.portal.kernel.util.OrderByComparator obc)
238         throws com.liferay.portal.SystemException, 
239             com.liferay.portal.NoSuchAddressException {
240         return getPersistence().findByC_C_C_PrevAndNext(addressId, companyId,
241             classNameId, classPK, obc);
242     }
243 
244     public static java.util.List findByC_C_C_M(long companyId,
245         long classNameId, long classPK, boolean mailing)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().findByC_C_C_M(companyId, classNameId, classPK,
248             mailing);
249     }
250 
251     public static java.util.List findByC_C_C_M(long companyId,
252         long classNameId, long classPK, boolean mailing, int begin, int end)
253         throws com.liferay.portal.SystemException {
254         return getPersistence().findByC_C_C_M(companyId, classNameId, classPK,
255             mailing, begin, end);
256     }
257 
258     public static java.util.List findByC_C_C_M(long companyId,
259         long classNameId, long classPK, boolean mailing, int begin, int end,
260         com.liferay.portal.kernel.util.OrderByComparator obc)
261         throws com.liferay.portal.SystemException {
262         return getPersistence().findByC_C_C_M(companyId, classNameId, classPK,
263             mailing, begin, end, obc);
264     }
265 
266     public static com.liferay.portal.model.Address findByC_C_C_M_First(
267         long companyId, long classNameId, long classPK, boolean mailing,
268         com.liferay.portal.kernel.util.OrderByComparator obc)
269         throws com.liferay.portal.SystemException, 
270             com.liferay.portal.NoSuchAddressException {
271         return getPersistence().findByC_C_C_M_First(companyId, classNameId,
272             classPK, mailing, obc);
273     }
274 
275     public static com.liferay.portal.model.Address findByC_C_C_M_Last(
276         long companyId, long classNameId, long classPK, boolean mailing,
277         com.liferay.portal.kernel.util.OrderByComparator obc)
278         throws com.liferay.portal.SystemException, 
279             com.liferay.portal.NoSuchAddressException {
280         return getPersistence().findByC_C_C_M_Last(companyId, classNameId,
281             classPK, mailing, obc);
282     }
283 
284     public static com.liferay.portal.model.Address[] findByC_C_C_M_PrevAndNext(
285         long addressId, long companyId, long classNameId, long classPK,
286         boolean mailing, com.liferay.portal.kernel.util.OrderByComparator obc)
287         throws com.liferay.portal.SystemException, 
288             com.liferay.portal.NoSuchAddressException {
289         return getPersistence().findByC_C_C_M_PrevAndNext(addressId, companyId,
290             classNameId, classPK, mailing, obc);
291     }
292 
293     public static java.util.List findByC_C_C_P(long companyId,
294         long classNameId, long classPK, boolean primary)
295         throws com.liferay.portal.SystemException {
296         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
297             primary);
298     }
299 
300     public static java.util.List findByC_C_C_P(long companyId,
301         long classNameId, long classPK, boolean primary, int begin, int end)
302         throws com.liferay.portal.SystemException {
303         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
304             primary, begin, end);
305     }
306 
307     public static java.util.List findByC_C_C_P(long companyId,
308         long classNameId, long classPK, boolean primary, int begin, int end,
309         com.liferay.portal.kernel.util.OrderByComparator obc)
310         throws com.liferay.portal.SystemException {
311         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
312             primary, begin, end, obc);
313     }
314 
315     public static com.liferay.portal.model.Address findByC_C_C_P_First(
316         long companyId, long classNameId, long classPK, boolean primary,
317         com.liferay.portal.kernel.util.OrderByComparator obc)
318         throws com.liferay.portal.SystemException, 
319             com.liferay.portal.NoSuchAddressException {
320         return getPersistence().findByC_C_C_P_First(companyId, classNameId,
321             classPK, primary, obc);
322     }
323 
324     public static com.liferay.portal.model.Address findByC_C_C_P_Last(
325         long companyId, long classNameId, long classPK, boolean primary,
326         com.liferay.portal.kernel.util.OrderByComparator obc)
327         throws com.liferay.portal.SystemException, 
328             com.liferay.portal.NoSuchAddressException {
329         return getPersistence().findByC_C_C_P_Last(companyId, classNameId,
330             classPK, primary, obc);
331     }
332 
333     public static com.liferay.portal.model.Address[] findByC_C_C_P_PrevAndNext(
334         long addressId, long companyId, long classNameId, long classPK,
335         boolean primary, com.liferay.portal.kernel.util.OrderByComparator obc)
336         throws com.liferay.portal.SystemException, 
337             com.liferay.portal.NoSuchAddressException {
338         return getPersistence().findByC_C_C_P_PrevAndNext(addressId, companyId,
339             classNameId, classPK, primary, obc);
340     }
341 
342     public static java.util.List findWithDynamicQuery(
343         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
344         throws com.liferay.portal.SystemException {
345         return getPersistence().findWithDynamicQuery(queryInitializer);
346     }
347 
348     public static java.util.List findWithDynamicQuery(
349         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
350         int begin, int end) throws com.liferay.portal.SystemException {
351         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
352             end);
353     }
354 
355     public static java.util.List findAll()
356         throws com.liferay.portal.SystemException {
357         return getPersistence().findAll();
358     }
359 
360     public static java.util.List findAll(int begin, int end)
361         throws com.liferay.portal.SystemException {
362         return getPersistence().findAll(begin, end);
363     }
364 
365     public static java.util.List findAll(int begin, int end,
366         com.liferay.portal.kernel.util.OrderByComparator obc)
367         throws com.liferay.portal.SystemException {
368         return getPersistence().findAll(begin, end, obc);
369     }
370 
371     public static void removeByCompanyId(long companyId)
372         throws com.liferay.portal.SystemException {
373         getPersistence().removeByCompanyId(companyId);
374     }
375 
376     public static void removeByUserId(long userId)
377         throws com.liferay.portal.SystemException {
378         getPersistence().removeByUserId(userId);
379     }
380 
381     public static void removeByC_C(long companyId, long classNameId)
382         throws com.liferay.portal.SystemException {
383         getPersistence().removeByC_C(companyId, classNameId);
384     }
385 
386     public static void removeByC_C_C(long companyId, long classNameId,
387         long classPK) throws com.liferay.portal.SystemException {
388         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
389     }
390 
391     public static void removeByC_C_C_M(long companyId, long classNameId,
392         long classPK, boolean mailing)
393         throws com.liferay.portal.SystemException {
394         getPersistence().removeByC_C_C_M(companyId, classNameId, classPK,
395             mailing);
396     }
397 
398     public static void removeByC_C_C_P(long companyId, long classNameId,
399         long classPK, boolean primary)
400         throws com.liferay.portal.SystemException {
401         getPersistence().removeByC_C_C_P(companyId, classNameId, classPK,
402             primary);
403     }
404 
405     public static void removeAll() throws com.liferay.portal.SystemException {
406         getPersistence().removeAll();
407     }
408 
409     public static int countByCompanyId(long companyId)
410         throws com.liferay.portal.SystemException {
411         return getPersistence().countByCompanyId(companyId);
412     }
413 
414     public static int countByUserId(long userId)
415         throws com.liferay.portal.SystemException {
416         return getPersistence().countByUserId(userId);
417     }
418 
419     public static int countByC_C(long companyId, long classNameId)
420         throws com.liferay.portal.SystemException {
421         return getPersistence().countByC_C(companyId, classNameId);
422     }
423 
424     public static int countByC_C_C(long companyId, long classNameId,
425         long classPK) throws com.liferay.portal.SystemException {
426         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
427     }
428 
429     public static int countByC_C_C_M(long companyId, long classNameId,
430         long classPK, boolean mailing)
431         throws com.liferay.portal.SystemException {
432         return getPersistence().countByC_C_C_M(companyId, classNameId, classPK,
433             mailing);
434     }
435 
436     public static int countByC_C_C_P(long companyId, long classNameId,
437         long classPK, boolean primary)
438         throws com.liferay.portal.SystemException {
439         return getPersistence().countByC_C_C_P(companyId, classNameId, classPK,
440             primary);
441     }
442 
443     public static int countAll() throws com.liferay.portal.SystemException {
444         return getPersistence().countAll();
445     }
446 
447     public static AddressPersistence getPersistence() {
448         return _getUtil()._persistence;
449     }
450 
451     public void setPersistence(AddressPersistence persistence) {
452         _persistence = persistence;
453     }
454 
455     private static AddressUtil _getUtil() {
456         if (_util == null) {
457             _util = (AddressUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
458         }
459 
460         return _util;
461     }
462 
463     private static final String _UTIL = AddressUtil.class.getName();
464     private static AddressUtil _util;
465     private AddressPersistence _persistence;
466 }