001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.Address;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       AddressPersistence
029     * @see       AddressPersistenceImpl
030     * @generated
031     */
032    public class AddressUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(Address address) {
044                    getPersistence().clearCache(address);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<Address> findWithDynamicQuery(DynamicQuery dynamicQuery)
059                    throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<Address> findWithDynamicQuery(
067                    DynamicQuery dynamicQuery, int start, int end)
068                    throws SystemException {
069                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
074             */
075            public static List<Address> findWithDynamicQuery(
076                    DynamicQuery dynamicQuery, int start, int end,
077                    OrderByComparator orderByComparator) throws SystemException {
078                    return getPersistence()
079                                       .findWithDynamicQuery(dynamicQuery, start, end,
080                            orderByComparator);
081            }
082    
083            /**
084             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
085             */
086            public static Address remove(Address address) throws SystemException {
087                    return getPersistence().remove(address);
088            }
089    
090            /**
091             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
092             */
093            public static Address update(Address address, boolean merge)
094                    throws SystemException {
095                    return getPersistence().update(address, merge);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
100             */
101            public static Address update(Address address, boolean merge,
102                    ServiceContext serviceContext) throws SystemException {
103                    return getPersistence().update(address, merge, serviceContext);
104            }
105    
106            public static void cacheResult(com.liferay.portal.model.Address address) {
107                    getPersistence().cacheResult(address);
108            }
109    
110            public static void cacheResult(
111                    java.util.List<com.liferay.portal.model.Address> addresses) {
112                    getPersistence().cacheResult(addresses);
113            }
114    
115            public static com.liferay.portal.model.Address create(long addressId) {
116                    return getPersistence().create(addressId);
117            }
118    
119            public static com.liferay.portal.model.Address remove(long addressId)
120                    throws com.liferay.portal.NoSuchAddressException,
121                            com.liferay.portal.kernel.exception.SystemException {
122                    return getPersistence().remove(addressId);
123            }
124    
125            public static com.liferay.portal.model.Address updateImpl(
126                    com.liferay.portal.model.Address address, boolean merge)
127                    throws com.liferay.portal.kernel.exception.SystemException {
128                    return getPersistence().updateImpl(address, merge);
129            }
130    
131            public static com.liferay.portal.model.Address findByPrimaryKey(
132                    long addressId)
133                    throws com.liferay.portal.NoSuchAddressException,
134                            com.liferay.portal.kernel.exception.SystemException {
135                    return getPersistence().findByPrimaryKey(addressId);
136            }
137    
138            public static com.liferay.portal.model.Address fetchByPrimaryKey(
139                    long addressId)
140                    throws com.liferay.portal.kernel.exception.SystemException {
141                    return getPersistence().fetchByPrimaryKey(addressId);
142            }
143    
144            public static java.util.List<com.liferay.portal.model.Address> findByCompanyId(
145                    long companyId)
146                    throws com.liferay.portal.kernel.exception.SystemException {
147                    return getPersistence().findByCompanyId(companyId);
148            }
149    
150            public static java.util.List<com.liferay.portal.model.Address> findByCompanyId(
151                    long companyId, int start, int end)
152                    throws com.liferay.portal.kernel.exception.SystemException {
153                    return getPersistence().findByCompanyId(companyId, start, end);
154            }
155    
156            public static java.util.List<com.liferay.portal.model.Address> findByCompanyId(
157                    long companyId, int start, int end,
158                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159                    throws com.liferay.portal.kernel.exception.SystemException {
160                    return getPersistence()
161                                       .findByCompanyId(companyId, start, end, orderByComparator);
162            }
163    
164            public static com.liferay.portal.model.Address findByCompanyId_First(
165                    long companyId,
166                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167                    throws com.liferay.portal.NoSuchAddressException,
168                            com.liferay.portal.kernel.exception.SystemException {
169                    return getPersistence()
170                                       .findByCompanyId_First(companyId, orderByComparator);
171            }
172    
173            public static com.liferay.portal.model.Address findByCompanyId_Last(
174                    long companyId,
175                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176                    throws com.liferay.portal.NoSuchAddressException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    return getPersistence()
179                                       .findByCompanyId_Last(companyId, orderByComparator);
180            }
181    
182            public static com.liferay.portal.model.Address[] findByCompanyId_PrevAndNext(
183                    long addressId, long companyId,
184                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
185                    throws com.liferay.portal.NoSuchAddressException,
186                            com.liferay.portal.kernel.exception.SystemException {
187                    return getPersistence()
188                                       .findByCompanyId_PrevAndNext(addressId, companyId,
189                            orderByComparator);
190            }
191    
192            public static java.util.List<com.liferay.portal.model.Address> findByUserId(
193                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
194                    return getPersistence().findByUserId(userId);
195            }
196    
197            public static java.util.List<com.liferay.portal.model.Address> findByUserId(
198                    long userId, int start, int end)
199                    throws com.liferay.portal.kernel.exception.SystemException {
200                    return getPersistence().findByUserId(userId, start, end);
201            }
202    
203            public static java.util.List<com.liferay.portal.model.Address> findByUserId(
204                    long userId, int start, int end,
205                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
206                    throws com.liferay.portal.kernel.exception.SystemException {
207                    return getPersistence()
208                                       .findByUserId(userId, start, end, orderByComparator);
209            }
210    
211            public static com.liferay.portal.model.Address findByUserId_First(
212                    long userId,
213                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214                    throws com.liferay.portal.NoSuchAddressException,
215                            com.liferay.portal.kernel.exception.SystemException {
216                    return getPersistence().findByUserId_First(userId, orderByComparator);
217            }
218    
219            public static com.liferay.portal.model.Address findByUserId_Last(
220                    long userId,
221                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222                    throws com.liferay.portal.NoSuchAddressException,
223                            com.liferay.portal.kernel.exception.SystemException {
224                    return getPersistence().findByUserId_Last(userId, orderByComparator);
225            }
226    
227            public static com.liferay.portal.model.Address[] findByUserId_PrevAndNext(
228                    long addressId, long userId,
229                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230                    throws com.liferay.portal.NoSuchAddressException,
231                            com.liferay.portal.kernel.exception.SystemException {
232                    return getPersistence()
233                                       .findByUserId_PrevAndNext(addressId, userId,
234                            orderByComparator);
235            }
236    
237            public static java.util.List<com.liferay.portal.model.Address> findByC_C(
238                    long companyId, long classNameId)
239                    throws com.liferay.portal.kernel.exception.SystemException {
240                    return getPersistence().findByC_C(companyId, classNameId);
241            }
242    
243            public static java.util.List<com.liferay.portal.model.Address> findByC_C(
244                    long companyId, long classNameId, int start, int end)
245                    throws com.liferay.portal.kernel.exception.SystemException {
246                    return getPersistence().findByC_C(companyId, classNameId, start, end);
247            }
248    
249            public static java.util.List<com.liferay.portal.model.Address> findByC_C(
250                    long companyId, long classNameId, int start, int end,
251                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252                    throws com.liferay.portal.kernel.exception.SystemException {
253                    return getPersistence()
254                                       .findByC_C(companyId, classNameId, start, end,
255                            orderByComparator);
256            }
257    
258            public static com.liferay.portal.model.Address findByC_C_First(
259                    long companyId, long classNameId,
260                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261                    throws com.liferay.portal.NoSuchAddressException,
262                            com.liferay.portal.kernel.exception.SystemException {
263                    return getPersistence()
264                                       .findByC_C_First(companyId, classNameId, orderByComparator);
265            }
266    
267            public static com.liferay.portal.model.Address findByC_C_Last(
268                    long companyId, long classNameId,
269                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
270                    throws com.liferay.portal.NoSuchAddressException,
271                            com.liferay.portal.kernel.exception.SystemException {
272                    return getPersistence()
273                                       .findByC_C_Last(companyId, classNameId, orderByComparator);
274            }
275    
276            public static com.liferay.portal.model.Address[] findByC_C_PrevAndNext(
277                    long addressId, long companyId, long classNameId,
278                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
279                    throws com.liferay.portal.NoSuchAddressException,
280                            com.liferay.portal.kernel.exception.SystemException {
281                    return getPersistence()
282                                       .findByC_C_PrevAndNext(addressId, companyId, classNameId,
283                            orderByComparator);
284            }
285    
286            public static java.util.List<com.liferay.portal.model.Address> findByC_C_C(
287                    long companyId, long classNameId, long classPK)
288                    throws com.liferay.portal.kernel.exception.SystemException {
289                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
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                    throws com.liferay.portal.kernel.exception.SystemException {
295                    return getPersistence()
296                                       .findByC_C_C(companyId, classNameId, classPK, start, end);
297            }
298    
299            public static java.util.List<com.liferay.portal.model.Address> findByC_C_C(
300                    long companyId, long classNameId, long classPK, int start, int end,
301                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
302                    throws com.liferay.portal.kernel.exception.SystemException {
303                    return getPersistence()
304                                       .findByC_C_C(companyId, classNameId, classPK, start, end,
305                            orderByComparator);
306            }
307    
308            public static com.liferay.portal.model.Address findByC_C_C_First(
309                    long companyId, long classNameId, long classPK,
310                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
311                    throws com.liferay.portal.NoSuchAddressException,
312                            com.liferay.portal.kernel.exception.SystemException {
313                    return getPersistence()
314                                       .findByC_C_C_First(companyId, classNameId, classPK,
315                            orderByComparator);
316            }
317    
318            public static com.liferay.portal.model.Address findByC_C_C_Last(
319                    long companyId, long classNameId, long classPK,
320                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
321                    throws com.liferay.portal.NoSuchAddressException,
322                            com.liferay.portal.kernel.exception.SystemException {
323                    return getPersistence()
324                                       .findByC_C_C_Last(companyId, classNameId, classPK,
325                            orderByComparator);
326            }
327    
328            public static com.liferay.portal.model.Address[] findByC_C_C_PrevAndNext(
329                    long addressId, long companyId, long classNameId, long classPK,
330                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
331                    throws com.liferay.portal.NoSuchAddressException,
332                            com.liferay.portal.kernel.exception.SystemException {
333                    return getPersistence()
334                                       .findByC_C_C_PrevAndNext(addressId, companyId, classNameId,
335                            classPK, orderByComparator);
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                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence()
342                                       .findByC_C_C_M(companyId, classNameId, classPK, mailing);
343            }
344    
345            public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
346                    long companyId, long classNameId, long classPK, boolean mailing,
347                    int start, int end)
348                    throws com.liferay.portal.kernel.exception.SystemException {
349                    return getPersistence()
350                                       .findByC_C_C_M(companyId, classNameId, classPK, mailing,
351                            start, end);
352            }
353    
354            public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_M(
355                    long companyId, long classNameId, long classPK, boolean mailing,
356                    int start, int end,
357                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
358                    throws com.liferay.portal.kernel.exception.SystemException {
359                    return getPersistence()
360                                       .findByC_C_C_M(companyId, classNameId, classPK, mailing,
361                            start, end, orderByComparator);
362            }
363    
364            public static com.liferay.portal.model.Address findByC_C_C_M_First(
365                    long companyId, long classNameId, long classPK, boolean mailing,
366                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
367                    throws com.liferay.portal.NoSuchAddressException,
368                            com.liferay.portal.kernel.exception.SystemException {
369                    return getPersistence()
370                                       .findByC_C_C_M_First(companyId, classNameId, classPK,
371                            mailing, orderByComparator);
372            }
373    
374            public static com.liferay.portal.model.Address findByC_C_C_M_Last(
375                    long companyId, long classNameId, long classPK, boolean mailing,
376                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
377                    throws com.liferay.portal.NoSuchAddressException,
378                            com.liferay.portal.kernel.exception.SystemException {
379                    return getPersistence()
380                                       .findByC_C_C_M_Last(companyId, classNameId, classPK,
381                            mailing, orderByComparator);
382            }
383    
384            public static com.liferay.portal.model.Address[] findByC_C_C_M_PrevAndNext(
385                    long addressId, long companyId, long classNameId, long classPK,
386                    boolean mailing,
387                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
388                    throws com.liferay.portal.NoSuchAddressException,
389                            com.liferay.portal.kernel.exception.SystemException {
390                    return getPersistence()
391                                       .findByC_C_C_M_PrevAndNext(addressId, companyId,
392                            classNameId, classPK, mailing, orderByComparator);
393            }
394    
395            public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
396                    long companyId, long classNameId, long classPK, boolean primary)
397                    throws com.liferay.portal.kernel.exception.SystemException {
398                    return getPersistence()
399                                       .findByC_C_C_P(companyId, classNameId, classPK, primary);
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                    throws com.liferay.portal.kernel.exception.SystemException {
406                    return getPersistence()
407                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
408                            start, end);
409            }
410    
411            public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
412                    long companyId, long classNameId, long classPK, boolean primary,
413                    int start, int end,
414                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415                    throws com.liferay.portal.kernel.exception.SystemException {
416                    return getPersistence()
417                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
418                            start, end, orderByComparator);
419            }
420    
421            public static com.liferay.portal.model.Address findByC_C_C_P_First(
422                    long companyId, long classNameId, long classPK, boolean primary,
423                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
424                    throws com.liferay.portal.NoSuchAddressException,
425                            com.liferay.portal.kernel.exception.SystemException {
426                    return getPersistence()
427                                       .findByC_C_C_P_First(companyId, classNameId, classPK,
428                            primary, orderByComparator);
429            }
430    
431            public static com.liferay.portal.model.Address findByC_C_C_P_Last(
432                    long companyId, long classNameId, long classPK, boolean primary,
433                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
434                    throws com.liferay.portal.NoSuchAddressException,
435                            com.liferay.portal.kernel.exception.SystemException {
436                    return getPersistence()
437                                       .findByC_C_C_P_Last(companyId, classNameId, classPK,
438                            primary, orderByComparator);
439            }
440    
441            public static com.liferay.portal.model.Address[] findByC_C_C_P_PrevAndNext(
442                    long addressId, long companyId, long classNameId, long classPK,
443                    boolean primary,
444                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
445                    throws com.liferay.portal.NoSuchAddressException,
446                            com.liferay.portal.kernel.exception.SystemException {
447                    return getPersistence()
448                                       .findByC_C_C_P_PrevAndNext(addressId, companyId,
449                            classNameId, classPK, primary, orderByComparator);
450            }
451    
452            public static java.util.List<com.liferay.portal.model.Address> findAll()
453                    throws com.liferay.portal.kernel.exception.SystemException {
454                    return getPersistence().findAll();
455            }
456    
457            public static java.util.List<com.liferay.portal.model.Address> findAll(
458                    int start, int end)
459                    throws com.liferay.portal.kernel.exception.SystemException {
460                    return getPersistence().findAll(start, end);
461            }
462    
463            public static java.util.List<com.liferay.portal.model.Address> findAll(
464                    int start, int end,
465                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
466                    throws com.liferay.portal.kernel.exception.SystemException {
467                    return getPersistence().findAll(start, end, orderByComparator);
468            }
469    
470            public static void removeByCompanyId(long companyId)
471                    throws com.liferay.portal.kernel.exception.SystemException {
472                    getPersistence().removeByCompanyId(companyId);
473            }
474    
475            public static void removeByUserId(long userId)
476                    throws com.liferay.portal.kernel.exception.SystemException {
477                    getPersistence().removeByUserId(userId);
478            }
479    
480            public static void removeByC_C(long companyId, long classNameId)
481                    throws com.liferay.portal.kernel.exception.SystemException {
482                    getPersistence().removeByC_C(companyId, classNameId);
483            }
484    
485            public static void removeByC_C_C(long companyId, long classNameId,
486                    long classPK)
487                    throws com.liferay.portal.kernel.exception.SystemException {
488                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
489            }
490    
491            public static void removeByC_C_C_M(long companyId, long classNameId,
492                    long classPK, boolean mailing)
493                    throws com.liferay.portal.kernel.exception.SystemException {
494                    getPersistence()
495                            .removeByC_C_C_M(companyId, classNameId, classPK, mailing);
496            }
497    
498            public static void removeByC_C_C_P(long companyId, long classNameId,
499                    long classPK, boolean primary)
500                    throws com.liferay.portal.kernel.exception.SystemException {
501                    getPersistence()
502                            .removeByC_C_C_P(companyId, classNameId, classPK, primary);
503            }
504    
505            public static void removeAll()
506                    throws com.liferay.portal.kernel.exception.SystemException {
507                    getPersistence().removeAll();
508            }
509    
510            public static int countByCompanyId(long companyId)
511                    throws com.liferay.portal.kernel.exception.SystemException {
512                    return getPersistence().countByCompanyId(companyId);
513            }
514    
515            public static int countByUserId(long userId)
516                    throws com.liferay.portal.kernel.exception.SystemException {
517                    return getPersistence().countByUserId(userId);
518            }
519    
520            public static int countByC_C(long companyId, long classNameId)
521                    throws com.liferay.portal.kernel.exception.SystemException {
522                    return getPersistence().countByC_C(companyId, classNameId);
523            }
524    
525            public static int countByC_C_C(long companyId, long classNameId,
526                    long classPK)
527                    throws com.liferay.portal.kernel.exception.SystemException {
528                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
529            }
530    
531            public static int countByC_C_C_M(long companyId, long classNameId,
532                    long classPK, boolean mailing)
533                    throws com.liferay.portal.kernel.exception.SystemException {
534                    return getPersistence()
535                                       .countByC_C_C_M(companyId, classNameId, classPK, mailing);
536            }
537    
538            public static int countByC_C_C_P(long companyId, long classNameId,
539                    long classPK, boolean primary)
540                    throws com.liferay.portal.kernel.exception.SystemException {
541                    return getPersistence()
542                                       .countByC_C_C_P(companyId, classNameId, classPK, primary);
543            }
544    
545            public static int countAll()
546                    throws com.liferay.portal.kernel.exception.SystemException {
547                    return getPersistence().countAll();
548            }
549    
550            public static AddressPersistence getPersistence() {
551                    if (_persistence == null) {
552                            _persistence = (AddressPersistence)PortalBeanLocatorUtil.locate(AddressPersistence.class.getName());
553                    }
554    
555                    return _persistence;
556            }
557    
558            public void setPersistence(AddressPersistence persistence) {
559                    _persistence = persistence;
560            }
561    
562            private static AddressPersistence _persistence;
563    }