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