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