001
014
015 package com.liferay.portal.model;
016
017 import java.util.Date;
018 import java.util.HashMap;
019 import java.util.Map;
020
021
030 public class AddressWrapper implements Address, ModelWrapper<Address> {
031 public AddressWrapper(Address address) {
032 _address = address;
033 }
034
035 public Class<?> getModelClass() {
036 return Address.class;
037 }
038
039 public String getModelClassName() {
040 return Address.class.getName();
041 }
042
043 public Map<String, Object> getModelAttributes() {
044 Map<String, Object> attributes = new HashMap<String, Object>();
045
046 attributes.put("addressId", getAddressId());
047 attributes.put("companyId", getCompanyId());
048 attributes.put("userId", getUserId());
049 attributes.put("userName", getUserName());
050 attributes.put("createDate", getCreateDate());
051 attributes.put("modifiedDate", getModifiedDate());
052 attributes.put("classNameId", getClassNameId());
053 attributes.put("classPK", getClassPK());
054 attributes.put("street1", getStreet1());
055 attributes.put("street2", getStreet2());
056 attributes.put("street3", getStreet3());
057 attributes.put("city", getCity());
058 attributes.put("zip", getZip());
059 attributes.put("regionId", getRegionId());
060 attributes.put("countryId", getCountryId());
061 attributes.put("typeId", getTypeId());
062 attributes.put("mailing", getMailing());
063 attributes.put("primary", getPrimary());
064
065 return attributes;
066 }
067
068 public void setModelAttributes(Map<String, Object> attributes) {
069 Long addressId = (Long)attributes.get("addressId");
070
071 if (addressId != null) {
072 setAddressId(addressId);
073 }
074
075 Long companyId = (Long)attributes.get("companyId");
076
077 if (companyId != null) {
078 setCompanyId(companyId);
079 }
080
081 Long userId = (Long)attributes.get("userId");
082
083 if (userId != null) {
084 setUserId(userId);
085 }
086
087 String userName = (String)attributes.get("userName");
088
089 if (userName != null) {
090 setUserName(userName);
091 }
092
093 Date createDate = (Date)attributes.get("createDate");
094
095 if (createDate != null) {
096 setCreateDate(createDate);
097 }
098
099 Date modifiedDate = (Date)attributes.get("modifiedDate");
100
101 if (modifiedDate != null) {
102 setModifiedDate(modifiedDate);
103 }
104
105 Long classNameId = (Long)attributes.get("classNameId");
106
107 if (classNameId != null) {
108 setClassNameId(classNameId);
109 }
110
111 Long classPK = (Long)attributes.get("classPK");
112
113 if (classPK != null) {
114 setClassPK(classPK);
115 }
116
117 String street1 = (String)attributes.get("street1");
118
119 if (street1 != null) {
120 setStreet1(street1);
121 }
122
123 String street2 = (String)attributes.get("street2");
124
125 if (street2 != null) {
126 setStreet2(street2);
127 }
128
129 String street3 = (String)attributes.get("street3");
130
131 if (street3 != null) {
132 setStreet3(street3);
133 }
134
135 String city = (String)attributes.get("city");
136
137 if (city != null) {
138 setCity(city);
139 }
140
141 String zip = (String)attributes.get("zip");
142
143 if (zip != null) {
144 setZip(zip);
145 }
146
147 Long regionId = (Long)attributes.get("regionId");
148
149 if (regionId != null) {
150 setRegionId(regionId);
151 }
152
153 Long countryId = (Long)attributes.get("countryId");
154
155 if (countryId != null) {
156 setCountryId(countryId);
157 }
158
159 Integer typeId = (Integer)attributes.get("typeId");
160
161 if (typeId != null) {
162 setTypeId(typeId);
163 }
164
165 Boolean mailing = (Boolean)attributes.get("mailing");
166
167 if (mailing != null) {
168 setMailing(mailing);
169 }
170
171 Boolean primary = (Boolean)attributes.get("primary");
172
173 if (primary != null) {
174 setPrimary(primary);
175 }
176 }
177
178
183 public long getPrimaryKey() {
184 return _address.getPrimaryKey();
185 }
186
187
192 public void setPrimaryKey(long primaryKey) {
193 _address.setPrimaryKey(primaryKey);
194 }
195
196
201 public long getAddressId() {
202 return _address.getAddressId();
203 }
204
205
210 public void setAddressId(long addressId) {
211 _address.setAddressId(addressId);
212 }
213
214
219 public long getCompanyId() {
220 return _address.getCompanyId();
221 }
222
223
228 public void setCompanyId(long companyId) {
229 _address.setCompanyId(companyId);
230 }
231
232
237 public long getUserId() {
238 return _address.getUserId();
239 }
240
241
246 public void setUserId(long userId) {
247 _address.setUserId(userId);
248 }
249
250
256 public java.lang.String getUserUuid()
257 throws com.liferay.portal.kernel.exception.SystemException {
258 return _address.getUserUuid();
259 }
260
261
266 public void setUserUuid(java.lang.String userUuid) {
267 _address.setUserUuid(userUuid);
268 }
269
270
275 public java.lang.String getUserName() {
276 return _address.getUserName();
277 }
278
279
284 public void setUserName(java.lang.String userName) {
285 _address.setUserName(userName);
286 }
287
288
293 public java.util.Date getCreateDate() {
294 return _address.getCreateDate();
295 }
296
297
302 public void setCreateDate(java.util.Date createDate) {
303 _address.setCreateDate(createDate);
304 }
305
306
311 public java.util.Date getModifiedDate() {
312 return _address.getModifiedDate();
313 }
314
315
320 public void setModifiedDate(java.util.Date modifiedDate) {
321 _address.setModifiedDate(modifiedDate);
322 }
323
324
329 public java.lang.String getClassName() {
330 return _address.getClassName();
331 }
332
333 public void setClassName(java.lang.String className) {
334 _address.setClassName(className);
335 }
336
337
342 public long getClassNameId() {
343 return _address.getClassNameId();
344 }
345
346
351 public void setClassNameId(long classNameId) {
352 _address.setClassNameId(classNameId);
353 }
354
355
360 public long getClassPK() {
361 return _address.getClassPK();
362 }
363
364
369 public void setClassPK(long classPK) {
370 _address.setClassPK(classPK);
371 }
372
373
378 public java.lang.String getStreet1() {
379 return _address.getStreet1();
380 }
381
382
387 public void setStreet1(java.lang.String street1) {
388 _address.setStreet1(street1);
389 }
390
391
396 public java.lang.String getStreet2() {
397 return _address.getStreet2();
398 }
399
400
405 public void setStreet2(java.lang.String street2) {
406 _address.setStreet2(street2);
407 }
408
409
414 public java.lang.String getStreet3() {
415 return _address.getStreet3();
416 }
417
418
423 public void setStreet3(java.lang.String street3) {
424 _address.setStreet3(street3);
425 }
426
427
432 public java.lang.String getCity() {
433 return _address.getCity();
434 }
435
436
441 public void setCity(java.lang.String city) {
442 _address.setCity(city);
443 }
444
445
450 public java.lang.String getZip() {
451 return _address.getZip();
452 }
453
454
459 public void setZip(java.lang.String zip) {
460 _address.setZip(zip);
461 }
462
463
468 public long getRegionId() {
469 return _address.getRegionId();
470 }
471
472
477 public void setRegionId(long regionId) {
478 _address.setRegionId(regionId);
479 }
480
481
486 public long getCountryId() {
487 return _address.getCountryId();
488 }
489
490
495 public void setCountryId(long countryId) {
496 _address.setCountryId(countryId);
497 }
498
499
504 public int getTypeId() {
505 return _address.getTypeId();
506 }
507
508
513 public void setTypeId(int typeId) {
514 _address.setTypeId(typeId);
515 }
516
517
522 public boolean getMailing() {
523 return _address.getMailing();
524 }
525
526
531 public boolean isMailing() {
532 return _address.isMailing();
533 }
534
535
540 public void setMailing(boolean mailing) {
541 _address.setMailing(mailing);
542 }
543
544
549 public boolean getPrimary() {
550 return _address.getPrimary();
551 }
552
553
558 public boolean isPrimary() {
559 return _address.isPrimary();
560 }
561
562
567 public void setPrimary(boolean primary) {
568 _address.setPrimary(primary);
569 }
570
571 public boolean isNew() {
572 return _address.isNew();
573 }
574
575 public void setNew(boolean n) {
576 _address.setNew(n);
577 }
578
579 public boolean isCachedModel() {
580 return _address.isCachedModel();
581 }
582
583 public void setCachedModel(boolean cachedModel) {
584 _address.setCachedModel(cachedModel);
585 }
586
587 public boolean isEscapedModel() {
588 return _address.isEscapedModel();
589 }
590
591 public java.io.Serializable getPrimaryKeyObj() {
592 return _address.getPrimaryKeyObj();
593 }
594
595 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
596 _address.setPrimaryKeyObj(primaryKeyObj);
597 }
598
599 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
600 return _address.getExpandoBridge();
601 }
602
603 public void setExpandoBridgeAttributes(
604 com.liferay.portal.service.ServiceContext serviceContext) {
605 _address.setExpandoBridgeAttributes(serviceContext);
606 }
607
608 @Override
609 public java.lang.Object clone() {
610 return new AddressWrapper((Address)_address.clone());
611 }
612
613 public int compareTo(com.liferay.portal.model.Address address) {
614 return _address.compareTo(address);
615 }
616
617 @Override
618 public int hashCode() {
619 return _address.hashCode();
620 }
621
622 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Address> toCacheModel() {
623 return _address.toCacheModel();
624 }
625
626 public com.liferay.portal.model.Address toEscapedModel() {
627 return new AddressWrapper(_address.toEscapedModel());
628 }
629
630 public com.liferay.portal.model.Address toUnescapedModel() {
631 return new AddressWrapper(_address.toUnescapedModel());
632 }
633
634 @Override
635 public java.lang.String toString() {
636 return _address.toString();
637 }
638
639 public java.lang.String toXmlString() {
640 return _address.toXmlString();
641 }
642
643 public void persist()
644 throws com.liferay.portal.kernel.exception.SystemException {
645 _address.persist();
646 }
647
648 public com.liferay.portal.model.Country getCountry() {
649 return _address.getCountry();
650 }
651
652 public com.liferay.portal.model.Region getRegion() {
653 return _address.getRegion();
654 }
655
656 public com.liferay.portal.model.ListType getType() {
657 return _address.getType();
658 }
659
660
663 public Address getWrappedAddress() {
664 return _address;
665 }
666
667 public Address getWrappedModel() {
668 return _address;
669 }
670
671 public void resetOriginalValues() {
672 _address.resetOriginalValues();
673 }
674
675 private Address _address;
676 }