1
14
15 package com.liferay.portal.service.persistence;
16
17 import com.liferay.portal.SystemException;
18 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
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.SystemException {
92 return getPersistence().remove(addressId);
93 }
94
95
98 public static com.liferay.portal.model.Address update(
99 com.liferay.portal.model.Address address)
100 throws com.liferay.portal.SystemException {
101 return getPersistence().update(address);
102 }
103
104 public static com.liferay.portal.model.Address updateImpl(
105 com.liferay.portal.model.Address address, boolean merge)
106 throws com.liferay.portal.SystemException {
107 return getPersistence().updateImpl(address, merge);
108 }
109
110 public static com.liferay.portal.model.Address findByPrimaryKey(
111 long addressId)
112 throws com.liferay.portal.NoSuchAddressException,
113 com.liferay.portal.SystemException {
114 return getPersistence().findByPrimaryKey(addressId);
115 }
116
117 public static com.liferay.portal.model.Address fetchByPrimaryKey(
118 long addressId) throws com.liferay.portal.SystemException {
119 return getPersistence().fetchByPrimaryKey(addressId);
120 }
121
122 public static java.util.List<com.liferay.portal.model.Address> findByCompanyId(
123 long companyId) throws com.liferay.portal.SystemException {
124 return getPersistence().findByCompanyId(companyId);
125 }
126
127 public static java.util.List<com.liferay.portal.model.Address> findByCompanyId(
128 long companyId, int start, int end)
129 throws com.liferay.portal.SystemException {
130 return getPersistence().findByCompanyId(companyId, start, end);
131 }
132
133 public static java.util.List<com.liferay.portal.model.Address> findByCompanyId(
134 long companyId, int start, int end,
135 com.liferay.portal.kernel.util.OrderByComparator obc)
136 throws com.liferay.portal.SystemException {
137 return getPersistence().findByCompanyId(companyId, start, end, obc);
138 }
139
140 public static com.liferay.portal.model.Address findByCompanyId_First(
141 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
142 throws com.liferay.portal.NoSuchAddressException,
143 com.liferay.portal.SystemException {
144 return getPersistence().findByCompanyId_First(companyId, obc);
145 }
146
147 public static com.liferay.portal.model.Address findByCompanyId_Last(
148 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
149 throws com.liferay.portal.NoSuchAddressException,
150 com.liferay.portal.SystemException {
151 return getPersistence().findByCompanyId_Last(companyId, obc);
152 }
153
154 public static com.liferay.portal.model.Address[] findByCompanyId_PrevAndNext(
155 long addressId, long companyId,
156 com.liferay.portal.kernel.util.OrderByComparator obc)
157 throws com.liferay.portal.NoSuchAddressException,
158 com.liferay.portal.SystemException {
159 return getPersistence()
160 .findByCompanyId_PrevAndNext(addressId, companyId, obc);
161 }
162
163 public static java.util.List<com.liferay.portal.model.Address> findByUserId(
164 long userId) throws com.liferay.portal.SystemException {
165 return getPersistence().findByUserId(userId);
166 }
167
168 public static java.util.List<com.liferay.portal.model.Address> findByUserId(
169 long userId, int start, int end)
170 throws com.liferay.portal.SystemException {
171 return getPersistence().findByUserId(userId, start, end);
172 }
173
174 public static java.util.List<com.liferay.portal.model.Address> findByUserId(
175 long userId, int start, int end,
176 com.liferay.portal.kernel.util.OrderByComparator obc)
177 throws com.liferay.portal.SystemException {
178 return getPersistence().findByUserId(userId, start, end, obc);
179 }
180
181 public static com.liferay.portal.model.Address findByUserId_First(
182 long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
183 throws com.liferay.portal.NoSuchAddressException,
184 com.liferay.portal.SystemException {
185 return getPersistence().findByUserId_First(userId, obc);
186 }
187
188 public static com.liferay.portal.model.Address findByUserId_Last(
189 long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
190 throws com.liferay.portal.NoSuchAddressException,
191 com.liferay.portal.SystemException {
192 return getPersistence().findByUserId_Last(userId, obc);
193 }
194
195 public static com.liferay.portal.model.Address[] findByUserId_PrevAndNext(
196 long addressId, long userId,
197 com.liferay.portal.kernel.util.OrderByComparator obc)
198 throws com.liferay.portal.NoSuchAddressException,
199 com.liferay.portal.SystemException {
200 return getPersistence().findByUserId_PrevAndNext(addressId, userId, obc);
201 }
202
203 public static java.util.List<com.liferay.portal.model.Address> findByC_C(
204 long companyId, long classNameId)
205 throws com.liferay.portal.SystemException {
206 return getPersistence().findByC_C(companyId, classNameId);
207 }
208
209 public static java.util.List<com.liferay.portal.model.Address> findByC_C(
210 long companyId, long classNameId, int start, int end)
211 throws com.liferay.portal.SystemException {
212 return getPersistence().findByC_C(companyId, classNameId, start, end);
213 }
214
215 public static java.util.List<com.liferay.portal.model.Address> findByC_C(
216 long companyId, long classNameId, int start, int end,
217 com.liferay.portal.kernel.util.OrderByComparator obc)
218 throws com.liferay.portal.SystemException {
219 return getPersistence()
220 .findByC_C(companyId, classNameId, start, end, obc);
221 }
222
223 public static com.liferay.portal.model.Address findByC_C_First(
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_First(companyId, classNameId, obc);
229 }
230
231 public static com.liferay.portal.model.Address findByC_C_Last(
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_Last(companyId, classNameId, obc);
237 }
238
239 public static com.liferay.portal.model.Address[] findByC_C_PrevAndNext(
240 long addressId, 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()
245 .findByC_C_PrevAndNext(addressId, companyId, classNameId, obc);
246 }
247
248 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C(
249 long companyId, long classNameId, long classPK)
250 throws com.liferay.portal.SystemException {
251 return getPersistence().findByC_C_C(companyId, classNameId, classPK);
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 throws com.liferay.portal.SystemException {
257 return getPersistence()
258 .findByC_C_C(companyId, classNameId, classPK, start, end);
259 }
260
261 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C(
262 long companyId, long classNameId, long classPK, int start, int end,
263 com.liferay.portal.kernel.util.OrderByComparator obc)
264 throws com.liferay.portal.SystemException {
265 return getPersistence()
266 .findByC_C_C(companyId, classNameId, classPK, start, end, obc);
267 }
268
269 public static com.liferay.portal.model.Address findByC_C_C_First(
270 long companyId, long classNameId, long classPK,
271 com.liferay.portal.kernel.util.OrderByComparator obc)
272 throws com.liferay.portal.NoSuchAddressException,
273 com.liferay.portal.SystemException {
274 return getPersistence()
275 .findByC_C_C_First(companyId, classNameId, classPK, obc);
276 }
277
278 public static com.liferay.portal.model.Address findByC_C_C_Last(
279 long companyId, long classNameId, long classPK,
280 com.liferay.portal.kernel.util.OrderByComparator obc)
281 throws com.liferay.portal.NoSuchAddressException,
282 com.liferay.portal.SystemException {
283 return getPersistence()
284 .findByC_C_C_Last(companyId, classNameId, classPK, obc);
285 }
286
287 public static com.liferay.portal.model.Address[] findByC_C_C_PrevAndNext(
288 long addressId, long companyId, long classNameId, long classPK,
289 com.liferay.portal.kernel.util.OrderByComparator obc)
290 throws com.liferay.portal.NoSuchAddressException,
291 com.liferay.portal.SystemException {
292 return getPersistence()
293 .findByC_C_C_PrevAndNext(addressId, companyId, classNameId,
294 classPK, obc);
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 throws com.liferay.portal.SystemException {
300 return getPersistence()
301 .findByC_C_C_M(companyId, classNameId, classPK, mailing);
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) throws com.liferay.portal.SystemException {
307 return getPersistence()
308 .findByC_C_C_M(companyId, classNameId, classPK, mailing,
309 start, end);
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, com.liferay.portal.kernel.util.OrderByComparator obc)
315 throws com.liferay.portal.SystemException {
316 return getPersistence()
317 .findByC_C_C_M(companyId, classNameId, classPK, mailing,
318 start, end, obc);
319 }
320
321 public static com.liferay.portal.model.Address findByC_C_C_M_First(
322 long companyId, long classNameId, long classPK, boolean mailing,
323 com.liferay.portal.kernel.util.OrderByComparator obc)
324 throws com.liferay.portal.NoSuchAddressException,
325 com.liferay.portal.SystemException {
326 return getPersistence()
327 .findByC_C_C_M_First(companyId, classNameId, classPK,
328 mailing, obc);
329 }
330
331 public static com.liferay.portal.model.Address findByC_C_C_M_Last(
332 long companyId, long classNameId, long classPK, boolean mailing,
333 com.liferay.portal.kernel.util.OrderByComparator obc)
334 throws com.liferay.portal.NoSuchAddressException,
335 com.liferay.portal.SystemException {
336 return getPersistence()
337 .findByC_C_C_M_Last(companyId, classNameId, classPK,
338 mailing, obc);
339 }
340
341 public static com.liferay.portal.model.Address[] findByC_C_C_M_PrevAndNext(
342 long addressId, long companyId, long classNameId, long classPK,
343 boolean mailing, com.liferay.portal.kernel.util.OrderByComparator obc)
344 throws com.liferay.portal.NoSuchAddressException,
345 com.liferay.portal.SystemException {
346 return getPersistence()
347 .findByC_C_C_M_PrevAndNext(addressId, companyId,
348 classNameId, classPK, mailing, obc);
349 }
350
351 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_P(
352 long companyId, long classNameId, long classPK, boolean primary)
353 throws com.liferay.portal.SystemException {
354 return getPersistence()
355 .findByC_C_C_P(companyId, classNameId, classPK, primary);
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) throws com.liferay.portal.SystemException {
361 return getPersistence()
362 .findByC_C_C_P(companyId, classNameId, classPK, primary,
363 start, end);
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, com.liferay.portal.kernel.util.OrderByComparator obc)
369 throws com.liferay.portal.SystemException {
370 return getPersistence()
371 .findByC_C_C_P(companyId, classNameId, classPK, primary,
372 start, end, obc);
373 }
374
375 public static com.liferay.portal.model.Address findByC_C_C_P_First(
376 long companyId, long classNameId, long classPK, boolean primary,
377 com.liferay.portal.kernel.util.OrderByComparator obc)
378 throws com.liferay.portal.NoSuchAddressException,
379 com.liferay.portal.SystemException {
380 return getPersistence()
381 .findByC_C_C_P_First(companyId, classNameId, classPK,
382 primary, obc);
383 }
384
385 public static com.liferay.portal.model.Address findByC_C_C_P_Last(
386 long companyId, long classNameId, long classPK, boolean primary,
387 com.liferay.portal.kernel.util.OrderByComparator obc)
388 throws com.liferay.portal.NoSuchAddressException,
389 com.liferay.portal.SystemException {
390 return getPersistence()
391 .findByC_C_C_P_Last(companyId, classNameId, classPK,
392 primary, obc);
393 }
394
395 public static com.liferay.portal.model.Address[] findByC_C_C_P_PrevAndNext(
396 long addressId, long companyId, long classNameId, long classPK,
397 boolean primary, com.liferay.portal.kernel.util.OrderByComparator obc)
398 throws com.liferay.portal.NoSuchAddressException,
399 com.liferay.portal.SystemException {
400 return getPersistence()
401 .findByC_C_C_P_PrevAndNext(addressId, companyId,
402 classNameId, classPK, primary, obc);
403 }
404
405 public static java.util.List<com.liferay.portal.model.Address> findAll()
406 throws com.liferay.portal.SystemException {
407 return getPersistence().findAll();
408 }
409
410 public static java.util.List<com.liferay.portal.model.Address> findAll(
411 int start, int end) throws com.liferay.portal.SystemException {
412 return getPersistence().findAll(start, end);
413 }
414
415 public static java.util.List<com.liferay.portal.model.Address> findAll(
416 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
417 throws com.liferay.portal.SystemException {
418 return getPersistence().findAll(start, end, obc);
419 }
420
421 public static void removeByCompanyId(long companyId)
422 throws com.liferay.portal.SystemException {
423 getPersistence().removeByCompanyId(companyId);
424 }
425
426 public static void removeByUserId(long userId)
427 throws com.liferay.portal.SystemException {
428 getPersistence().removeByUserId(userId);
429 }
430
431 public static void removeByC_C(long companyId, long classNameId)
432 throws com.liferay.portal.SystemException {
433 getPersistence().removeByC_C(companyId, classNameId);
434 }
435
436 public static void removeByC_C_C(long companyId, long classNameId,
437 long classPK) throws com.liferay.portal.SystemException {
438 getPersistence().removeByC_C_C(companyId, classNameId, classPK);
439 }
440
441 public static void removeByC_C_C_M(long companyId, long classNameId,
442 long classPK, boolean mailing)
443 throws com.liferay.portal.SystemException {
444 getPersistence()
445 .removeByC_C_C_M(companyId, classNameId, classPK, mailing);
446 }
447
448 public static void removeByC_C_C_P(long companyId, long classNameId,
449 long classPK, boolean primary)
450 throws com.liferay.portal.SystemException {
451 getPersistence()
452 .removeByC_C_C_P(companyId, classNameId, classPK, primary);
453 }
454
455 public static void removeAll() throws com.liferay.portal.SystemException {
456 getPersistence().removeAll();
457 }
458
459 public static int countByCompanyId(long companyId)
460 throws com.liferay.portal.SystemException {
461 return getPersistence().countByCompanyId(companyId);
462 }
463
464 public static int countByUserId(long userId)
465 throws com.liferay.portal.SystemException {
466 return getPersistence().countByUserId(userId);
467 }
468
469 public static int countByC_C(long companyId, long classNameId)
470 throws com.liferay.portal.SystemException {
471 return getPersistence().countByC_C(companyId, classNameId);
472 }
473
474 public static int countByC_C_C(long companyId, long classNameId,
475 long classPK) throws com.liferay.portal.SystemException {
476 return getPersistence().countByC_C_C(companyId, classNameId, classPK);
477 }
478
479 public static int countByC_C_C_M(long companyId, long classNameId,
480 long classPK, boolean mailing)
481 throws com.liferay.portal.SystemException {
482 return getPersistence()
483 .countByC_C_C_M(companyId, classNameId, classPK, mailing);
484 }
485
486 public static int countByC_C_C_P(long companyId, long classNameId,
487 long classPK, boolean primary)
488 throws com.liferay.portal.SystemException {
489 return getPersistence()
490 .countByC_C_C_P(companyId, classNameId, classPK, primary);
491 }
492
493 public static int countAll() throws com.liferay.portal.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 }