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