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 ContactWrapper implements Contact, ModelWrapper<Contact> {
033 public ContactWrapper(Contact contact) {
034 _contact = contact;
035 }
036
037 public Class<?> getModelClass() {
038 return Contact.class;
039 }
040
041 public String getModelClassName() {
042 return Contact.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("contactId", getContactId());
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("accountId", getAccountId());
055 attributes.put("parentContactId", getParentContactId());
056 attributes.put("firstName", getFirstName());
057 attributes.put("middleName", getMiddleName());
058 attributes.put("lastName", getLastName());
059 attributes.put("prefixId", getPrefixId());
060 attributes.put("suffixId", getSuffixId());
061 attributes.put("male", getMale());
062 attributes.put("birthday", getBirthday());
063 attributes.put("smsSn", getSmsSn());
064 attributes.put("aimSn", getAimSn());
065 attributes.put("facebookSn", getFacebookSn());
066 attributes.put("icqSn", getIcqSn());
067 attributes.put("jabberSn", getJabberSn());
068 attributes.put("msnSn", getMsnSn());
069 attributes.put("mySpaceSn", getMySpaceSn());
070 attributes.put("skypeSn", getSkypeSn());
071 attributes.put("twitterSn", getTwitterSn());
072 attributes.put("ymSn", getYmSn());
073 attributes.put("employeeStatusId", getEmployeeStatusId());
074 attributes.put("employeeNumber", getEmployeeNumber());
075 attributes.put("jobTitle", getJobTitle());
076 attributes.put("jobClass", getJobClass());
077 attributes.put("hoursOfOperation", getHoursOfOperation());
078
079 return attributes;
080 }
081
082 public void setModelAttributes(Map<String, Object> attributes) {
083 Long contactId = (Long)attributes.get("contactId");
084
085 if (contactId != null) {
086 setContactId(contactId);
087 }
088
089 Long companyId = (Long)attributes.get("companyId");
090
091 if (companyId != null) {
092 setCompanyId(companyId);
093 }
094
095 Long userId = (Long)attributes.get("userId");
096
097 if (userId != null) {
098 setUserId(userId);
099 }
100
101 String userName = (String)attributes.get("userName");
102
103 if (userName != null) {
104 setUserName(userName);
105 }
106
107 Date createDate = (Date)attributes.get("createDate");
108
109 if (createDate != null) {
110 setCreateDate(createDate);
111 }
112
113 Date modifiedDate = (Date)attributes.get("modifiedDate");
114
115 if (modifiedDate != null) {
116 setModifiedDate(modifiedDate);
117 }
118
119 Long accountId = (Long)attributes.get("accountId");
120
121 if (accountId != null) {
122 setAccountId(accountId);
123 }
124
125 Long parentContactId = (Long)attributes.get("parentContactId");
126
127 if (parentContactId != null) {
128 setParentContactId(parentContactId);
129 }
130
131 String firstName = (String)attributes.get("firstName");
132
133 if (firstName != null) {
134 setFirstName(firstName);
135 }
136
137 String middleName = (String)attributes.get("middleName");
138
139 if (middleName != null) {
140 setMiddleName(middleName);
141 }
142
143 String lastName = (String)attributes.get("lastName");
144
145 if (lastName != null) {
146 setLastName(lastName);
147 }
148
149 Integer prefixId = (Integer)attributes.get("prefixId");
150
151 if (prefixId != null) {
152 setPrefixId(prefixId);
153 }
154
155 Integer suffixId = (Integer)attributes.get("suffixId");
156
157 if (suffixId != null) {
158 setSuffixId(suffixId);
159 }
160
161 Boolean male = (Boolean)attributes.get("male");
162
163 if (male != null) {
164 setMale(male);
165 }
166
167 Date birthday = (Date)attributes.get("birthday");
168
169 if (birthday != null) {
170 setBirthday(birthday);
171 }
172
173 String smsSn = (String)attributes.get("smsSn");
174
175 if (smsSn != null) {
176 setSmsSn(smsSn);
177 }
178
179 String aimSn = (String)attributes.get("aimSn");
180
181 if (aimSn != null) {
182 setAimSn(aimSn);
183 }
184
185 String facebookSn = (String)attributes.get("facebookSn");
186
187 if (facebookSn != null) {
188 setFacebookSn(facebookSn);
189 }
190
191 String icqSn = (String)attributes.get("icqSn");
192
193 if (icqSn != null) {
194 setIcqSn(icqSn);
195 }
196
197 String jabberSn = (String)attributes.get("jabberSn");
198
199 if (jabberSn != null) {
200 setJabberSn(jabberSn);
201 }
202
203 String msnSn = (String)attributes.get("msnSn");
204
205 if (msnSn != null) {
206 setMsnSn(msnSn);
207 }
208
209 String mySpaceSn = (String)attributes.get("mySpaceSn");
210
211 if (mySpaceSn != null) {
212 setMySpaceSn(mySpaceSn);
213 }
214
215 String skypeSn = (String)attributes.get("skypeSn");
216
217 if (skypeSn != null) {
218 setSkypeSn(skypeSn);
219 }
220
221 String twitterSn = (String)attributes.get("twitterSn");
222
223 if (twitterSn != null) {
224 setTwitterSn(twitterSn);
225 }
226
227 String ymSn = (String)attributes.get("ymSn");
228
229 if (ymSn != null) {
230 setYmSn(ymSn);
231 }
232
233 String employeeStatusId = (String)attributes.get("employeeStatusId");
234
235 if (employeeStatusId != null) {
236 setEmployeeStatusId(employeeStatusId);
237 }
238
239 String employeeNumber = (String)attributes.get("employeeNumber");
240
241 if (employeeNumber != null) {
242 setEmployeeNumber(employeeNumber);
243 }
244
245 String jobTitle = (String)attributes.get("jobTitle");
246
247 if (jobTitle != null) {
248 setJobTitle(jobTitle);
249 }
250
251 String jobClass = (String)attributes.get("jobClass");
252
253 if (jobClass != null) {
254 setJobClass(jobClass);
255 }
256
257 String hoursOfOperation = (String)attributes.get("hoursOfOperation");
258
259 if (hoursOfOperation != null) {
260 setHoursOfOperation(hoursOfOperation);
261 }
262 }
263
264
269 public long getPrimaryKey() {
270 return _contact.getPrimaryKey();
271 }
272
273
278 public void setPrimaryKey(long primaryKey) {
279 _contact.setPrimaryKey(primaryKey);
280 }
281
282
287 public long getContactId() {
288 return _contact.getContactId();
289 }
290
291
296 public void setContactId(long contactId) {
297 _contact.setContactId(contactId);
298 }
299
300
305 public long getCompanyId() {
306 return _contact.getCompanyId();
307 }
308
309
314 public void setCompanyId(long companyId) {
315 _contact.setCompanyId(companyId);
316 }
317
318
323 public long getUserId() {
324 return _contact.getUserId();
325 }
326
327
332 public void setUserId(long userId) {
333 _contact.setUserId(userId);
334 }
335
336
342 public java.lang.String getUserUuid()
343 throws com.liferay.portal.kernel.exception.SystemException {
344 return _contact.getUserUuid();
345 }
346
347
352 public void setUserUuid(java.lang.String userUuid) {
353 _contact.setUserUuid(userUuid);
354 }
355
356
361 public java.lang.String getUserName() {
362 return _contact.getUserName();
363 }
364
365
370 public void setUserName(java.lang.String userName) {
371 _contact.setUserName(userName);
372 }
373
374
379 public java.util.Date getCreateDate() {
380 return _contact.getCreateDate();
381 }
382
383
388 public void setCreateDate(java.util.Date createDate) {
389 _contact.setCreateDate(createDate);
390 }
391
392
397 public java.util.Date getModifiedDate() {
398 return _contact.getModifiedDate();
399 }
400
401
406 public void setModifiedDate(java.util.Date modifiedDate) {
407 _contact.setModifiedDate(modifiedDate);
408 }
409
410
415 public long getAccountId() {
416 return _contact.getAccountId();
417 }
418
419
424 public void setAccountId(long accountId) {
425 _contact.setAccountId(accountId);
426 }
427
428
433 public long getParentContactId() {
434 return _contact.getParentContactId();
435 }
436
437
442 public void setParentContactId(long parentContactId) {
443 _contact.setParentContactId(parentContactId);
444 }
445
446
451 public java.lang.String getFirstName() {
452 return _contact.getFirstName();
453 }
454
455
460 public void setFirstName(java.lang.String firstName) {
461 _contact.setFirstName(firstName);
462 }
463
464
469 public java.lang.String getMiddleName() {
470 return _contact.getMiddleName();
471 }
472
473
478 public void setMiddleName(java.lang.String middleName) {
479 _contact.setMiddleName(middleName);
480 }
481
482
487 public java.lang.String getLastName() {
488 return _contact.getLastName();
489 }
490
491
496 public void setLastName(java.lang.String lastName) {
497 _contact.setLastName(lastName);
498 }
499
500
505 public int getPrefixId() {
506 return _contact.getPrefixId();
507 }
508
509
514 public void setPrefixId(int prefixId) {
515 _contact.setPrefixId(prefixId);
516 }
517
518
523 public int getSuffixId() {
524 return _contact.getSuffixId();
525 }
526
527
532 public void setSuffixId(int suffixId) {
533 _contact.setSuffixId(suffixId);
534 }
535
536
541 public boolean getMale() {
542 return _contact.getMale();
543 }
544
545
550 public boolean isMale() {
551 return _contact.isMale();
552 }
553
554
559 public void setMale(boolean male) {
560 _contact.setMale(male);
561 }
562
563
568 public java.util.Date getBirthday() {
569 return _contact.getBirthday();
570 }
571
572
577 public void setBirthday(java.util.Date birthday) {
578 _contact.setBirthday(birthday);
579 }
580
581
586 public java.lang.String getSmsSn() {
587 return _contact.getSmsSn();
588 }
589
590
595 public void setSmsSn(java.lang.String smsSn) {
596 _contact.setSmsSn(smsSn);
597 }
598
599
604 public java.lang.String getAimSn() {
605 return _contact.getAimSn();
606 }
607
608
613 public void setAimSn(java.lang.String aimSn) {
614 _contact.setAimSn(aimSn);
615 }
616
617
622 public java.lang.String getFacebookSn() {
623 return _contact.getFacebookSn();
624 }
625
626
631 public void setFacebookSn(java.lang.String facebookSn) {
632 _contact.setFacebookSn(facebookSn);
633 }
634
635
640 public java.lang.String getIcqSn() {
641 return _contact.getIcqSn();
642 }
643
644
649 public void setIcqSn(java.lang.String icqSn) {
650 _contact.setIcqSn(icqSn);
651 }
652
653
658 public java.lang.String getJabberSn() {
659 return _contact.getJabberSn();
660 }
661
662
667 public void setJabberSn(java.lang.String jabberSn) {
668 _contact.setJabberSn(jabberSn);
669 }
670
671
676 public java.lang.String getMsnSn() {
677 return _contact.getMsnSn();
678 }
679
680
685 public void setMsnSn(java.lang.String msnSn) {
686 _contact.setMsnSn(msnSn);
687 }
688
689
694 public java.lang.String getMySpaceSn() {
695 return _contact.getMySpaceSn();
696 }
697
698
703 public void setMySpaceSn(java.lang.String mySpaceSn) {
704 _contact.setMySpaceSn(mySpaceSn);
705 }
706
707
712 public java.lang.String getSkypeSn() {
713 return _contact.getSkypeSn();
714 }
715
716
721 public void setSkypeSn(java.lang.String skypeSn) {
722 _contact.setSkypeSn(skypeSn);
723 }
724
725
730 public java.lang.String getTwitterSn() {
731 return _contact.getTwitterSn();
732 }
733
734
739 public void setTwitterSn(java.lang.String twitterSn) {
740 _contact.setTwitterSn(twitterSn);
741 }
742
743
748 public java.lang.String getYmSn() {
749 return _contact.getYmSn();
750 }
751
752
757 public void setYmSn(java.lang.String ymSn) {
758 _contact.setYmSn(ymSn);
759 }
760
761
766 public java.lang.String getEmployeeStatusId() {
767 return _contact.getEmployeeStatusId();
768 }
769
770
775 public void setEmployeeStatusId(java.lang.String employeeStatusId) {
776 _contact.setEmployeeStatusId(employeeStatusId);
777 }
778
779
784 public java.lang.String getEmployeeNumber() {
785 return _contact.getEmployeeNumber();
786 }
787
788
793 public void setEmployeeNumber(java.lang.String employeeNumber) {
794 _contact.setEmployeeNumber(employeeNumber);
795 }
796
797
802 public java.lang.String getJobTitle() {
803 return _contact.getJobTitle();
804 }
805
806
811 public void setJobTitle(java.lang.String jobTitle) {
812 _contact.setJobTitle(jobTitle);
813 }
814
815
820 public java.lang.String getJobClass() {
821 return _contact.getJobClass();
822 }
823
824
829 public void setJobClass(java.lang.String jobClass) {
830 _contact.setJobClass(jobClass);
831 }
832
833
838 public java.lang.String getHoursOfOperation() {
839 return _contact.getHoursOfOperation();
840 }
841
842
847 public void setHoursOfOperation(java.lang.String hoursOfOperation) {
848 _contact.setHoursOfOperation(hoursOfOperation);
849 }
850
851 public boolean isNew() {
852 return _contact.isNew();
853 }
854
855 public void setNew(boolean n) {
856 _contact.setNew(n);
857 }
858
859 public boolean isCachedModel() {
860 return _contact.isCachedModel();
861 }
862
863 public void setCachedModel(boolean cachedModel) {
864 _contact.setCachedModel(cachedModel);
865 }
866
867 public boolean isEscapedModel() {
868 return _contact.isEscapedModel();
869 }
870
871 public java.io.Serializable getPrimaryKeyObj() {
872 return _contact.getPrimaryKeyObj();
873 }
874
875 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
876 _contact.setPrimaryKeyObj(primaryKeyObj);
877 }
878
879 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
880 return _contact.getExpandoBridge();
881 }
882
883 public void setExpandoBridgeAttributes(
884 com.liferay.portal.service.ServiceContext serviceContext) {
885 _contact.setExpandoBridgeAttributes(serviceContext);
886 }
887
888 @Override
889 public java.lang.Object clone() {
890 return new ContactWrapper((Contact)_contact.clone());
891 }
892
893 public int compareTo(com.liferay.portal.model.Contact contact) {
894 return _contact.compareTo(contact);
895 }
896
897 @Override
898 public int hashCode() {
899 return _contact.hashCode();
900 }
901
902 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Contact> toCacheModel() {
903 return _contact.toCacheModel();
904 }
905
906 public com.liferay.portal.model.Contact toEscapedModel() {
907 return new ContactWrapper(_contact.toEscapedModel());
908 }
909
910 public com.liferay.portal.model.Contact toUnescapedModel() {
911 return new ContactWrapper(_contact.toUnescapedModel());
912 }
913
914 @Override
915 public java.lang.String toString() {
916 return _contact.toString();
917 }
918
919 public java.lang.String toXmlString() {
920 return _contact.toXmlString();
921 }
922
923 public void persist()
924 throws com.liferay.portal.kernel.exception.SystemException {
925 _contact.persist();
926 }
927
928 public java.lang.String getFullName() {
929 return _contact.getFullName();
930 }
931
932 @Override
933 public boolean equals(Object obj) {
934 if (this == obj) {
935 return true;
936 }
937
938 if (!(obj instanceof ContactWrapper)) {
939 return false;
940 }
941
942 ContactWrapper contactWrapper = (ContactWrapper)obj;
943
944 if (Validator.equals(_contact, contactWrapper._contact)) {
945 return true;
946 }
947
948 return false;
949 }
950
951
954 public Contact getWrappedContact() {
955 return _contact;
956 }
957
958 public Contact getWrappedModel() {
959 return _contact;
960 }
961
962 public void resetOriginalValues() {
963 _contact.resetOriginalValues();
964 }
965
966 private Contact _contact;
967 }