001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.Date;
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class EmailAddressWrapper implements EmailAddress,
033 ModelWrapper<EmailAddress> {
034 public EmailAddressWrapper(EmailAddress emailAddress) {
035 _emailAddress = emailAddress;
036 }
037
038 public Class<?> getModelClass() {
039 return EmailAddress.class;
040 }
041
042 public String getModelClassName() {
043 return EmailAddress.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("emailAddressId", getEmailAddressId());
050 attributes.put("companyId", getCompanyId());
051 attributes.put("userId", getUserId());
052 attributes.put("userName", getUserName());
053 attributes.put("createDate", getCreateDate());
054 attributes.put("modifiedDate", getModifiedDate());
055 attributes.put("classNameId", getClassNameId());
056 attributes.put("classPK", getClassPK());
057 attributes.put("address", getAddress());
058 attributes.put("typeId", getTypeId());
059 attributes.put("primary", getPrimary());
060
061 return attributes;
062 }
063
064 public void setModelAttributes(Map<String, Object> attributes) {
065 Long emailAddressId = (Long)attributes.get("emailAddressId");
066
067 if (emailAddressId != null) {
068 setEmailAddressId(emailAddressId);
069 }
070
071 Long companyId = (Long)attributes.get("companyId");
072
073 if (companyId != null) {
074 setCompanyId(companyId);
075 }
076
077 Long userId = (Long)attributes.get("userId");
078
079 if (userId != null) {
080 setUserId(userId);
081 }
082
083 String userName = (String)attributes.get("userName");
084
085 if (userName != null) {
086 setUserName(userName);
087 }
088
089 Date createDate = (Date)attributes.get("createDate");
090
091 if (createDate != null) {
092 setCreateDate(createDate);
093 }
094
095 Date modifiedDate = (Date)attributes.get("modifiedDate");
096
097 if (modifiedDate != null) {
098 setModifiedDate(modifiedDate);
099 }
100
101 Long classNameId = (Long)attributes.get("classNameId");
102
103 if (classNameId != null) {
104 setClassNameId(classNameId);
105 }
106
107 Long classPK = (Long)attributes.get("classPK");
108
109 if (classPK != null) {
110 setClassPK(classPK);
111 }
112
113 String address = (String)attributes.get("address");
114
115 if (address != null) {
116 setAddress(address);
117 }
118
119 Integer typeId = (Integer)attributes.get("typeId");
120
121 if (typeId != null) {
122 setTypeId(typeId);
123 }
124
125 Boolean primary = (Boolean)attributes.get("primary");
126
127 if (primary != null) {
128 setPrimary(primary);
129 }
130 }
131
132
137 public long getPrimaryKey() {
138 return _emailAddress.getPrimaryKey();
139 }
140
141
146 public void setPrimaryKey(long primaryKey) {
147 _emailAddress.setPrimaryKey(primaryKey);
148 }
149
150
155 public long getEmailAddressId() {
156 return _emailAddress.getEmailAddressId();
157 }
158
159
164 public void setEmailAddressId(long emailAddressId) {
165 _emailAddress.setEmailAddressId(emailAddressId);
166 }
167
168
173 public long getCompanyId() {
174 return _emailAddress.getCompanyId();
175 }
176
177
182 public void setCompanyId(long companyId) {
183 _emailAddress.setCompanyId(companyId);
184 }
185
186
191 public long getUserId() {
192 return _emailAddress.getUserId();
193 }
194
195
200 public void setUserId(long userId) {
201 _emailAddress.setUserId(userId);
202 }
203
204
210 public java.lang.String getUserUuid()
211 throws com.liferay.portal.kernel.exception.SystemException {
212 return _emailAddress.getUserUuid();
213 }
214
215
220 public void setUserUuid(java.lang.String userUuid) {
221 _emailAddress.setUserUuid(userUuid);
222 }
223
224
229 public java.lang.String getUserName() {
230 return _emailAddress.getUserName();
231 }
232
233
238 public void setUserName(java.lang.String userName) {
239 _emailAddress.setUserName(userName);
240 }
241
242
247 public java.util.Date getCreateDate() {
248 return _emailAddress.getCreateDate();
249 }
250
251
256 public void setCreateDate(java.util.Date createDate) {
257 _emailAddress.setCreateDate(createDate);
258 }
259
260
265 public java.util.Date getModifiedDate() {
266 return _emailAddress.getModifiedDate();
267 }
268
269
274 public void setModifiedDate(java.util.Date modifiedDate) {
275 _emailAddress.setModifiedDate(modifiedDate);
276 }
277
278
283 public java.lang.String getClassName() {
284 return _emailAddress.getClassName();
285 }
286
287 public void setClassName(java.lang.String className) {
288 _emailAddress.setClassName(className);
289 }
290
291
296 public long getClassNameId() {
297 return _emailAddress.getClassNameId();
298 }
299
300
305 public void setClassNameId(long classNameId) {
306 _emailAddress.setClassNameId(classNameId);
307 }
308
309
314 public long getClassPK() {
315 return _emailAddress.getClassPK();
316 }
317
318
323 public void setClassPK(long classPK) {
324 _emailAddress.setClassPK(classPK);
325 }
326
327
332 public java.lang.String getAddress() {
333 return _emailAddress.getAddress();
334 }
335
336
341 public void setAddress(java.lang.String address) {
342 _emailAddress.setAddress(address);
343 }
344
345
350 public int getTypeId() {
351 return _emailAddress.getTypeId();
352 }
353
354
359 public void setTypeId(int typeId) {
360 _emailAddress.setTypeId(typeId);
361 }
362
363
368 public boolean getPrimary() {
369 return _emailAddress.getPrimary();
370 }
371
372
377 public boolean isPrimary() {
378 return _emailAddress.isPrimary();
379 }
380
381
386 public void setPrimary(boolean primary) {
387 _emailAddress.setPrimary(primary);
388 }
389
390 public boolean isNew() {
391 return _emailAddress.isNew();
392 }
393
394 public void setNew(boolean n) {
395 _emailAddress.setNew(n);
396 }
397
398 public boolean isCachedModel() {
399 return _emailAddress.isCachedModel();
400 }
401
402 public void setCachedModel(boolean cachedModel) {
403 _emailAddress.setCachedModel(cachedModel);
404 }
405
406 public boolean isEscapedModel() {
407 return _emailAddress.isEscapedModel();
408 }
409
410 public java.io.Serializable getPrimaryKeyObj() {
411 return _emailAddress.getPrimaryKeyObj();
412 }
413
414 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
415 _emailAddress.setPrimaryKeyObj(primaryKeyObj);
416 }
417
418 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
419 return _emailAddress.getExpandoBridge();
420 }
421
422 public void setExpandoBridgeAttributes(
423 com.liferay.portal.service.ServiceContext serviceContext) {
424 _emailAddress.setExpandoBridgeAttributes(serviceContext);
425 }
426
427 @Override
428 public java.lang.Object clone() {
429 return new EmailAddressWrapper((EmailAddress)_emailAddress.clone());
430 }
431
432 public int compareTo(com.liferay.portal.model.EmailAddress emailAddress) {
433 return _emailAddress.compareTo(emailAddress);
434 }
435
436 @Override
437 public int hashCode() {
438 return _emailAddress.hashCode();
439 }
440
441 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.EmailAddress> toCacheModel() {
442 return _emailAddress.toCacheModel();
443 }
444
445 public com.liferay.portal.model.EmailAddress toEscapedModel() {
446 return new EmailAddressWrapper(_emailAddress.toEscapedModel());
447 }
448
449 public com.liferay.portal.model.EmailAddress toUnescapedModel() {
450 return new EmailAddressWrapper(_emailAddress.toUnescapedModel());
451 }
452
453 @Override
454 public java.lang.String toString() {
455 return _emailAddress.toString();
456 }
457
458 public java.lang.String toXmlString() {
459 return _emailAddress.toXmlString();
460 }
461
462 public void persist()
463 throws com.liferay.portal.kernel.exception.SystemException {
464 _emailAddress.persist();
465 }
466
467 public com.liferay.portal.model.ListType getType()
468 throws com.liferay.portal.kernel.exception.PortalException,
469 com.liferay.portal.kernel.exception.SystemException {
470 return _emailAddress.getType();
471 }
472
473 @Override
474 public boolean equals(Object obj) {
475 if (this == obj) {
476 return true;
477 }
478
479 if (!(obj instanceof EmailAddressWrapper)) {
480 return false;
481 }
482
483 EmailAddressWrapper emailAddressWrapper = (EmailAddressWrapper)obj;
484
485 if (Validator.equals(_emailAddress, emailAddressWrapper._emailAddress)) {
486 return true;
487 }
488
489 return false;
490 }
491
492
495 public EmailAddress getWrappedEmailAddress() {
496 return _emailAddress;
497 }
498
499 public EmailAddress getWrappedModel() {
500 return _emailAddress;
501 }
502
503 public void resetOriginalValues() {
504 _emailAddress.resetOriginalValues();
505 }
506
507 private EmailAddress _emailAddress;
508 }