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 PhoneWrapper implements Phone, ModelWrapper<Phone> {
033 public PhoneWrapper(Phone phone) {
034 _phone = phone;
035 }
036
037 public Class<?> getModelClass() {
038 return Phone.class;
039 }
040
041 public String getModelClassName() {
042 return Phone.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("phoneId", getPhoneId());
049 attributes.put("companyId", getCompanyId());
050 attributes.put("userId", getUserId());
051 attributes.put("userName", getUserName());
052 attributes.put("createDate", getCreateDate());
053 attributes.put("modifiedDate", getModifiedDate());
054 attributes.put("classNameId", getClassNameId());
055 attributes.put("classPK", getClassPK());
056 attributes.put("number", getNumber());
057 attributes.put("extension", getExtension());
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 phoneId = (Long)attributes.get("phoneId");
066
067 if (phoneId != null) {
068 setPhoneId(phoneId);
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 number = (String)attributes.get("number");
114
115 if (number != null) {
116 setNumber(number);
117 }
118
119 String extension = (String)attributes.get("extension");
120
121 if (extension != null) {
122 setExtension(extension);
123 }
124
125 Integer typeId = (Integer)attributes.get("typeId");
126
127 if (typeId != null) {
128 setTypeId(typeId);
129 }
130
131 Boolean primary = (Boolean)attributes.get("primary");
132
133 if (primary != null) {
134 setPrimary(primary);
135 }
136 }
137
138
143 public long getPrimaryKey() {
144 return _phone.getPrimaryKey();
145 }
146
147
152 public void setPrimaryKey(long primaryKey) {
153 _phone.setPrimaryKey(primaryKey);
154 }
155
156
161 public long getPhoneId() {
162 return _phone.getPhoneId();
163 }
164
165
170 public void setPhoneId(long phoneId) {
171 _phone.setPhoneId(phoneId);
172 }
173
174
179 public long getCompanyId() {
180 return _phone.getCompanyId();
181 }
182
183
188 public void setCompanyId(long companyId) {
189 _phone.setCompanyId(companyId);
190 }
191
192
197 public long getUserId() {
198 return _phone.getUserId();
199 }
200
201
206 public void setUserId(long userId) {
207 _phone.setUserId(userId);
208 }
209
210
216 public java.lang.String getUserUuid()
217 throws com.liferay.portal.kernel.exception.SystemException {
218 return _phone.getUserUuid();
219 }
220
221
226 public void setUserUuid(java.lang.String userUuid) {
227 _phone.setUserUuid(userUuid);
228 }
229
230
235 public java.lang.String getUserName() {
236 return _phone.getUserName();
237 }
238
239
244 public void setUserName(java.lang.String userName) {
245 _phone.setUserName(userName);
246 }
247
248
253 public java.util.Date getCreateDate() {
254 return _phone.getCreateDate();
255 }
256
257
262 public void setCreateDate(java.util.Date createDate) {
263 _phone.setCreateDate(createDate);
264 }
265
266
271 public java.util.Date getModifiedDate() {
272 return _phone.getModifiedDate();
273 }
274
275
280 public void setModifiedDate(java.util.Date modifiedDate) {
281 _phone.setModifiedDate(modifiedDate);
282 }
283
284
289 public java.lang.String getClassName() {
290 return _phone.getClassName();
291 }
292
293 public void setClassName(java.lang.String className) {
294 _phone.setClassName(className);
295 }
296
297
302 public long getClassNameId() {
303 return _phone.getClassNameId();
304 }
305
306
311 public void setClassNameId(long classNameId) {
312 _phone.setClassNameId(classNameId);
313 }
314
315
320 public long getClassPK() {
321 return _phone.getClassPK();
322 }
323
324
329 public void setClassPK(long classPK) {
330 _phone.setClassPK(classPK);
331 }
332
333
338 public java.lang.String getNumber() {
339 return _phone.getNumber();
340 }
341
342
347 public void setNumber(java.lang.String number) {
348 _phone.setNumber(number);
349 }
350
351
356 public java.lang.String getExtension() {
357 return _phone.getExtension();
358 }
359
360
365 public void setExtension(java.lang.String extension) {
366 _phone.setExtension(extension);
367 }
368
369
374 public int getTypeId() {
375 return _phone.getTypeId();
376 }
377
378
383 public void setTypeId(int typeId) {
384 _phone.setTypeId(typeId);
385 }
386
387
392 public boolean getPrimary() {
393 return _phone.getPrimary();
394 }
395
396
401 public boolean isPrimary() {
402 return _phone.isPrimary();
403 }
404
405
410 public void setPrimary(boolean primary) {
411 _phone.setPrimary(primary);
412 }
413
414 public boolean isNew() {
415 return _phone.isNew();
416 }
417
418 public void setNew(boolean n) {
419 _phone.setNew(n);
420 }
421
422 public boolean isCachedModel() {
423 return _phone.isCachedModel();
424 }
425
426 public void setCachedModel(boolean cachedModel) {
427 _phone.setCachedModel(cachedModel);
428 }
429
430 public boolean isEscapedModel() {
431 return _phone.isEscapedModel();
432 }
433
434 public java.io.Serializable getPrimaryKeyObj() {
435 return _phone.getPrimaryKeyObj();
436 }
437
438 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
439 _phone.setPrimaryKeyObj(primaryKeyObj);
440 }
441
442 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
443 return _phone.getExpandoBridge();
444 }
445
446 public void setExpandoBridgeAttributes(
447 com.liferay.portal.service.ServiceContext serviceContext) {
448 _phone.setExpandoBridgeAttributes(serviceContext);
449 }
450
451 @Override
452 public java.lang.Object clone() {
453 return new PhoneWrapper((Phone)_phone.clone());
454 }
455
456 public int compareTo(com.liferay.portal.model.Phone phone) {
457 return _phone.compareTo(phone);
458 }
459
460 @Override
461 public int hashCode() {
462 return _phone.hashCode();
463 }
464
465 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Phone> toCacheModel() {
466 return _phone.toCacheModel();
467 }
468
469 public com.liferay.portal.model.Phone toEscapedModel() {
470 return new PhoneWrapper(_phone.toEscapedModel());
471 }
472
473 public com.liferay.portal.model.Phone toUnescapedModel() {
474 return new PhoneWrapper(_phone.toUnescapedModel());
475 }
476
477 @Override
478 public java.lang.String toString() {
479 return _phone.toString();
480 }
481
482 public java.lang.String toXmlString() {
483 return _phone.toXmlString();
484 }
485
486 public void persist()
487 throws com.liferay.portal.kernel.exception.SystemException {
488 _phone.persist();
489 }
490
491 public com.liferay.portal.model.ListType getType()
492 throws com.liferay.portal.kernel.exception.PortalException,
493 com.liferay.portal.kernel.exception.SystemException {
494 return _phone.getType();
495 }
496
497 @Override
498 public boolean equals(Object obj) {
499 if (this == obj) {
500 return true;
501 }
502
503 if (!(obj instanceof PhoneWrapper)) {
504 return false;
505 }
506
507 PhoneWrapper phoneWrapper = (PhoneWrapper)obj;
508
509 if (Validator.equals(_phone, phoneWrapper._phone)) {
510 return true;
511 }
512
513 return false;
514 }
515
516
519 public Phone getWrappedPhone() {
520 return _phone;
521 }
522
523 public Phone getWrappedModel() {
524 return _phone;
525 }
526
527 public void resetOriginalValues() {
528 _phone.resetOriginalValues();
529 }
530
531 private Phone _phone;
532 }