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