001
014
015 package com.liferay.portlet.dynamicdatamapping.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.lar.StagedModelType;
020 import com.liferay.portal.kernel.util.Validator;
021 import com.liferay.portal.model.ModelWrapper;
022
023 import java.util.Date;
024 import java.util.HashMap;
025 import java.util.Map;
026
027
036 @ProviderType
037 public class DDMTemplateWrapper implements DDMTemplate,
038 ModelWrapper<DDMTemplate> {
039 public DDMTemplateWrapper(DDMTemplate ddmTemplate) {
040 _ddmTemplate = ddmTemplate;
041 }
042
043 @Override
044 public Class<?> getModelClass() {
045 return DDMTemplate.class;
046 }
047
048 @Override
049 public String getModelClassName() {
050 return DDMTemplate.class.getName();
051 }
052
053 @Override
054 public Map<String, Object> getModelAttributes() {
055 Map<String, Object> attributes = new HashMap<String, Object>();
056
057 attributes.put("uuid", getUuid());
058 attributes.put("templateId", getTemplateId());
059 attributes.put("groupId", getGroupId());
060 attributes.put("companyId", getCompanyId());
061 attributes.put("userId", getUserId());
062 attributes.put("userName", getUserName());
063 attributes.put("createDate", getCreateDate());
064 attributes.put("modifiedDate", getModifiedDate());
065 attributes.put("classNameId", getClassNameId());
066 attributes.put("classPK", getClassPK());
067 attributes.put("templateKey", getTemplateKey());
068 attributes.put("name", getName());
069 attributes.put("description", getDescription());
070 attributes.put("type", getType());
071 attributes.put("mode", getMode());
072 attributes.put("language", getLanguage());
073 attributes.put("script", getScript());
074 attributes.put("cacheable", getCacheable());
075 attributes.put("smallImage", getSmallImage());
076 attributes.put("smallImageId", getSmallImageId());
077 attributes.put("smallImageURL", getSmallImageURL());
078
079 return attributes;
080 }
081
082 @Override
083 public void setModelAttributes(Map<String, Object> attributes) {
084 String uuid = (String)attributes.get("uuid");
085
086 if (uuid != null) {
087 setUuid(uuid);
088 }
089
090 Long templateId = (Long)attributes.get("templateId");
091
092 if (templateId != null) {
093 setTemplateId(templateId);
094 }
095
096 Long groupId = (Long)attributes.get("groupId");
097
098 if (groupId != null) {
099 setGroupId(groupId);
100 }
101
102 Long companyId = (Long)attributes.get("companyId");
103
104 if (companyId != null) {
105 setCompanyId(companyId);
106 }
107
108 Long userId = (Long)attributes.get("userId");
109
110 if (userId != null) {
111 setUserId(userId);
112 }
113
114 String userName = (String)attributes.get("userName");
115
116 if (userName != null) {
117 setUserName(userName);
118 }
119
120 Date createDate = (Date)attributes.get("createDate");
121
122 if (createDate != null) {
123 setCreateDate(createDate);
124 }
125
126 Date modifiedDate = (Date)attributes.get("modifiedDate");
127
128 if (modifiedDate != null) {
129 setModifiedDate(modifiedDate);
130 }
131
132 Long classNameId = (Long)attributes.get("classNameId");
133
134 if (classNameId != null) {
135 setClassNameId(classNameId);
136 }
137
138 Long classPK = (Long)attributes.get("classPK");
139
140 if (classPK != null) {
141 setClassPK(classPK);
142 }
143
144 String templateKey = (String)attributes.get("templateKey");
145
146 if (templateKey != null) {
147 setTemplateKey(templateKey);
148 }
149
150 String name = (String)attributes.get("name");
151
152 if (name != null) {
153 setName(name);
154 }
155
156 String description = (String)attributes.get("description");
157
158 if (description != null) {
159 setDescription(description);
160 }
161
162 String type = (String)attributes.get("type");
163
164 if (type != null) {
165 setType(type);
166 }
167
168 String mode = (String)attributes.get("mode");
169
170 if (mode != null) {
171 setMode(mode);
172 }
173
174 String language = (String)attributes.get("language");
175
176 if (language != null) {
177 setLanguage(language);
178 }
179
180 String script = (String)attributes.get("script");
181
182 if (script != null) {
183 setScript(script);
184 }
185
186 Boolean cacheable = (Boolean)attributes.get("cacheable");
187
188 if (cacheable != null) {
189 setCacheable(cacheable);
190 }
191
192 Boolean smallImage = (Boolean)attributes.get("smallImage");
193
194 if (smallImage != null) {
195 setSmallImage(smallImage);
196 }
197
198 Long smallImageId = (Long)attributes.get("smallImageId");
199
200 if (smallImageId != null) {
201 setSmallImageId(smallImageId);
202 }
203
204 String smallImageURL = (String)attributes.get("smallImageURL");
205
206 if (smallImageURL != null) {
207 setSmallImageURL(smallImageURL);
208 }
209 }
210
211
216 @Override
217 public long getPrimaryKey() {
218 return _ddmTemplate.getPrimaryKey();
219 }
220
221
226 @Override
227 public void setPrimaryKey(long primaryKey) {
228 _ddmTemplate.setPrimaryKey(primaryKey);
229 }
230
231
236 @Override
237 public java.lang.String getUuid() {
238 return _ddmTemplate.getUuid();
239 }
240
241
246 @Override
247 public void setUuid(java.lang.String uuid) {
248 _ddmTemplate.setUuid(uuid);
249 }
250
251
256 @Override
257 public long getTemplateId() {
258 return _ddmTemplate.getTemplateId();
259 }
260
261
266 @Override
267 public void setTemplateId(long templateId) {
268 _ddmTemplate.setTemplateId(templateId);
269 }
270
271
276 @Override
277 public long getGroupId() {
278 return _ddmTemplate.getGroupId();
279 }
280
281
286 @Override
287 public void setGroupId(long groupId) {
288 _ddmTemplate.setGroupId(groupId);
289 }
290
291
296 @Override
297 public long getCompanyId() {
298 return _ddmTemplate.getCompanyId();
299 }
300
301
306 @Override
307 public void setCompanyId(long companyId) {
308 _ddmTemplate.setCompanyId(companyId);
309 }
310
311
316 @Override
317 public long getUserId() {
318 return _ddmTemplate.getUserId();
319 }
320
321
326 @Override
327 public void setUserId(long userId) {
328 _ddmTemplate.setUserId(userId);
329 }
330
331
337 @Override
338 public java.lang.String getUserUuid()
339 throws com.liferay.portal.kernel.exception.SystemException {
340 return _ddmTemplate.getUserUuid();
341 }
342
343
348 @Override
349 public void setUserUuid(java.lang.String userUuid) {
350 _ddmTemplate.setUserUuid(userUuid);
351 }
352
353
358 @Override
359 public java.lang.String getUserName() {
360 return _ddmTemplate.getUserName();
361 }
362
363
368 @Override
369 public void setUserName(java.lang.String userName) {
370 _ddmTemplate.setUserName(userName);
371 }
372
373
378 @Override
379 public java.util.Date getCreateDate() {
380 return _ddmTemplate.getCreateDate();
381 }
382
383
388 @Override
389 public void setCreateDate(java.util.Date createDate) {
390 _ddmTemplate.setCreateDate(createDate);
391 }
392
393
398 @Override
399 public java.util.Date getModifiedDate() {
400 return _ddmTemplate.getModifiedDate();
401 }
402
403
408 @Override
409 public void setModifiedDate(java.util.Date modifiedDate) {
410 _ddmTemplate.setModifiedDate(modifiedDate);
411 }
412
413
418 @Override
419 public java.lang.String getClassName() {
420 return _ddmTemplate.getClassName();
421 }
422
423 @Override
424 public void setClassName(java.lang.String className) {
425 _ddmTemplate.setClassName(className);
426 }
427
428
433 @Override
434 public long getClassNameId() {
435 return _ddmTemplate.getClassNameId();
436 }
437
438
443 @Override
444 public void setClassNameId(long classNameId) {
445 _ddmTemplate.setClassNameId(classNameId);
446 }
447
448
453 @Override
454 public long getClassPK() {
455 return _ddmTemplate.getClassPK();
456 }
457
458
463 @Override
464 public void setClassPK(long classPK) {
465 _ddmTemplate.setClassPK(classPK);
466 }
467
468
473 @Override
474 public java.lang.String getTemplateKey() {
475 return _ddmTemplate.getTemplateKey();
476 }
477
478
483 @Override
484 public void setTemplateKey(java.lang.String templateKey) {
485 _ddmTemplate.setTemplateKey(templateKey);
486 }
487
488
493 @Override
494 public java.lang.String getName() {
495 return _ddmTemplate.getName();
496 }
497
498
504 @Override
505 public java.lang.String getName(java.util.Locale locale) {
506 return _ddmTemplate.getName(locale);
507 }
508
509
516 @Override
517 public java.lang.String getName(java.util.Locale locale, boolean useDefault) {
518 return _ddmTemplate.getName(locale, useDefault);
519 }
520
521
527 @Override
528 public java.lang.String getName(java.lang.String languageId) {
529 return _ddmTemplate.getName(languageId);
530 }
531
532
539 @Override
540 public java.lang.String getName(java.lang.String languageId,
541 boolean useDefault) {
542 return _ddmTemplate.getName(languageId, useDefault);
543 }
544
545 @Override
546 public java.lang.String getNameCurrentLanguageId() {
547 return _ddmTemplate.getNameCurrentLanguageId();
548 }
549
550 @Override
551 public java.lang.String getNameCurrentValue() {
552 return _ddmTemplate.getNameCurrentValue();
553 }
554
555
560 @Override
561 public java.util.Map<java.util.Locale, java.lang.String> getNameMap() {
562 return _ddmTemplate.getNameMap();
563 }
564
565
570 @Override
571 public void setName(java.lang.String name) {
572 _ddmTemplate.setName(name);
573 }
574
575
581 @Override
582 public void setName(java.lang.String name, java.util.Locale locale) {
583 _ddmTemplate.setName(name, locale);
584 }
585
586
593 @Override
594 public void setName(java.lang.String name, java.util.Locale locale,
595 java.util.Locale defaultLocale) {
596 _ddmTemplate.setName(name, locale, defaultLocale);
597 }
598
599 @Override
600 public void setNameCurrentLanguageId(java.lang.String languageId) {
601 _ddmTemplate.setNameCurrentLanguageId(languageId);
602 }
603
604
609 @Override
610 public void setNameMap(
611 java.util.Map<java.util.Locale, java.lang.String> nameMap) {
612 _ddmTemplate.setNameMap(nameMap);
613 }
614
615
621 @Override
622 public void setNameMap(
623 java.util.Map<java.util.Locale, java.lang.String> nameMap,
624 java.util.Locale defaultLocale) {
625 _ddmTemplate.setNameMap(nameMap, defaultLocale);
626 }
627
628
633 @Override
634 public java.lang.String getDescription() {
635 return _ddmTemplate.getDescription();
636 }
637
638
644 @Override
645 public java.lang.String getDescription(java.util.Locale locale) {
646 return _ddmTemplate.getDescription(locale);
647 }
648
649
656 @Override
657 public java.lang.String getDescription(java.util.Locale locale,
658 boolean useDefault) {
659 return _ddmTemplate.getDescription(locale, useDefault);
660 }
661
662
668 @Override
669 public java.lang.String getDescription(java.lang.String languageId) {
670 return _ddmTemplate.getDescription(languageId);
671 }
672
673
680 @Override
681 public java.lang.String getDescription(java.lang.String languageId,
682 boolean useDefault) {
683 return _ddmTemplate.getDescription(languageId, useDefault);
684 }
685
686 @Override
687 public java.lang.String getDescriptionCurrentLanguageId() {
688 return _ddmTemplate.getDescriptionCurrentLanguageId();
689 }
690
691 @Override
692 public java.lang.String getDescriptionCurrentValue() {
693 return _ddmTemplate.getDescriptionCurrentValue();
694 }
695
696
701 @Override
702 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
703 return _ddmTemplate.getDescriptionMap();
704 }
705
706
711 @Override
712 public void setDescription(java.lang.String description) {
713 _ddmTemplate.setDescription(description);
714 }
715
716
722 @Override
723 public void setDescription(java.lang.String description,
724 java.util.Locale locale) {
725 _ddmTemplate.setDescription(description, locale);
726 }
727
728
735 @Override
736 public void setDescription(java.lang.String description,
737 java.util.Locale locale, java.util.Locale defaultLocale) {
738 _ddmTemplate.setDescription(description, locale, defaultLocale);
739 }
740
741 @Override
742 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
743 _ddmTemplate.setDescriptionCurrentLanguageId(languageId);
744 }
745
746
751 @Override
752 public void setDescriptionMap(
753 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
754 _ddmTemplate.setDescriptionMap(descriptionMap);
755 }
756
757
763 @Override
764 public void setDescriptionMap(
765 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
766 java.util.Locale defaultLocale) {
767 _ddmTemplate.setDescriptionMap(descriptionMap, defaultLocale);
768 }
769
770
775 @Override
776 public java.lang.String getType() {
777 return _ddmTemplate.getType();
778 }
779
780
785 @Override
786 public void setType(java.lang.String type) {
787 _ddmTemplate.setType(type);
788 }
789
790
795 @Override
796 public java.lang.String getMode() {
797 return _ddmTemplate.getMode();
798 }
799
800
805 @Override
806 public void setMode(java.lang.String mode) {
807 _ddmTemplate.setMode(mode);
808 }
809
810
815 @Override
816 public java.lang.String getLanguage() {
817 return _ddmTemplate.getLanguage();
818 }
819
820
825 @Override
826 public void setLanguage(java.lang.String language) {
827 _ddmTemplate.setLanguage(language);
828 }
829
830
835 @Override
836 public java.lang.String getScript() {
837 return _ddmTemplate.getScript();
838 }
839
840
845 @Override
846 public void setScript(java.lang.String script) {
847 _ddmTemplate.setScript(script);
848 }
849
850
855 @Override
856 public boolean getCacheable() {
857 return _ddmTemplate.getCacheable();
858 }
859
860
865 @Override
866 public boolean isCacheable() {
867 return _ddmTemplate.isCacheable();
868 }
869
870
875 @Override
876 public void setCacheable(boolean cacheable) {
877 _ddmTemplate.setCacheable(cacheable);
878 }
879
880
885 @Override
886 public boolean getSmallImage() {
887 return _ddmTemplate.getSmallImage();
888 }
889
890
895 @Override
896 public boolean isSmallImage() {
897 return _ddmTemplate.isSmallImage();
898 }
899
900
905 @Override
906 public void setSmallImage(boolean smallImage) {
907 _ddmTemplate.setSmallImage(smallImage);
908 }
909
910
915 @Override
916 public long getSmallImageId() {
917 return _ddmTemplate.getSmallImageId();
918 }
919
920
925 @Override
926 public void setSmallImageId(long smallImageId) {
927 _ddmTemplate.setSmallImageId(smallImageId);
928 }
929
930
935 @Override
936 public java.lang.String getSmallImageURL() {
937 return _ddmTemplate.getSmallImageURL();
938 }
939
940
945 @Override
946 public void setSmallImageURL(java.lang.String smallImageURL) {
947 _ddmTemplate.setSmallImageURL(smallImageURL);
948 }
949
950 @Override
951 public boolean isNew() {
952 return _ddmTemplate.isNew();
953 }
954
955 @Override
956 public void setNew(boolean n) {
957 _ddmTemplate.setNew(n);
958 }
959
960 @Override
961 public boolean isCachedModel() {
962 return _ddmTemplate.isCachedModel();
963 }
964
965 @Override
966 public void setCachedModel(boolean cachedModel) {
967 _ddmTemplate.setCachedModel(cachedModel);
968 }
969
970 @Override
971 public boolean isEscapedModel() {
972 return _ddmTemplate.isEscapedModel();
973 }
974
975 @Override
976 public java.io.Serializable getPrimaryKeyObj() {
977 return _ddmTemplate.getPrimaryKeyObj();
978 }
979
980 @Override
981 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
982 _ddmTemplate.setPrimaryKeyObj(primaryKeyObj);
983 }
984
985 @Override
986 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
987 return _ddmTemplate.getExpandoBridge();
988 }
989
990 @Override
991 public void setExpandoBridgeAttributes(
992 com.liferay.portal.model.BaseModel<?> baseModel) {
993 _ddmTemplate.setExpandoBridgeAttributes(baseModel);
994 }
995
996 @Override
997 public void setExpandoBridgeAttributes(
998 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
999 _ddmTemplate.setExpandoBridgeAttributes(expandoBridge);
1000 }
1001
1002 @Override
1003 public void setExpandoBridgeAttributes(
1004 com.liferay.portal.service.ServiceContext serviceContext) {
1005 _ddmTemplate.setExpandoBridgeAttributes(serviceContext);
1006 }
1007
1008 @Override
1009 public java.lang.String[] getAvailableLanguageIds() {
1010 return _ddmTemplate.getAvailableLanguageIds();
1011 }
1012
1013 @Override
1014 public java.lang.String getDefaultLanguageId() {
1015 return _ddmTemplate.getDefaultLanguageId();
1016 }
1017
1018 @Override
1019 public void prepareLocalizedFieldsForImport()
1020 throws com.liferay.portal.LocaleException {
1021 _ddmTemplate.prepareLocalizedFieldsForImport();
1022 }
1023
1024 @Override
1025 public void prepareLocalizedFieldsForImport(
1026 java.util.Locale defaultImportLocale)
1027 throws com.liferay.portal.LocaleException {
1028 _ddmTemplate.prepareLocalizedFieldsForImport(defaultImportLocale);
1029 }
1030
1031 @Override
1032 public java.lang.Object clone() {
1033 return new DDMTemplateWrapper((DDMTemplate)_ddmTemplate.clone());
1034 }
1035
1036 @Override
1037 public int compareTo(
1038 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate ddmTemplate) {
1039 return _ddmTemplate.compareTo(ddmTemplate);
1040 }
1041
1042 @Override
1043 public int hashCode() {
1044 return _ddmTemplate.hashCode();
1045 }
1046
1047 @Override
1048 public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> toCacheModel() {
1049 return _ddmTemplate.toCacheModel();
1050 }
1051
1052 @Override
1053 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate toEscapedModel() {
1054 return new DDMTemplateWrapper(_ddmTemplate.toEscapedModel());
1055 }
1056
1057 @Override
1058 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate toUnescapedModel() {
1059 return new DDMTemplateWrapper(_ddmTemplate.toUnescapedModel());
1060 }
1061
1062 @Override
1063 public java.lang.String toString() {
1064 return _ddmTemplate.toString();
1065 }
1066
1067 @Override
1068 public java.lang.String toXmlString() {
1069 return _ddmTemplate.toXmlString();
1070 }
1071
1072 @Override
1073 public void persist()
1074 throws com.liferay.portal.kernel.exception.SystemException {
1075 _ddmTemplate.persist();
1076 }
1077
1078 @Override
1079 public java.lang.String getSmallImageType()
1080 throws com.liferay.portal.kernel.exception.PortalException,
1081 com.liferay.portal.kernel.exception.SystemException {
1082 return _ddmTemplate.getSmallImageType();
1083 }
1084
1085
1094 @Override
1095 public java.lang.String getWebDavURL(
1096 com.liferay.portal.theme.ThemeDisplay themeDisplay,
1097 java.lang.String webDAVToken) {
1098 return _ddmTemplate.getWebDavURL(themeDisplay, webDAVToken);
1099 }
1100
1101 @Override
1102 public void setSmallImageType(java.lang.String smallImageType) {
1103 _ddmTemplate.setSmallImageType(smallImageType);
1104 }
1105
1106 @Override
1107 public boolean equals(Object obj) {
1108 if (this == obj) {
1109 return true;
1110 }
1111
1112 if (!(obj instanceof DDMTemplateWrapper)) {
1113 return false;
1114 }
1115
1116 DDMTemplateWrapper ddmTemplateWrapper = (DDMTemplateWrapper)obj;
1117
1118 if (Validator.equals(_ddmTemplate, ddmTemplateWrapper._ddmTemplate)) {
1119 return true;
1120 }
1121
1122 return false;
1123 }
1124
1125 @Override
1126 public StagedModelType getStagedModelType() {
1127 return _ddmTemplate.getStagedModelType();
1128 }
1129
1130
1133 public DDMTemplate getWrappedDDMTemplate() {
1134 return _ddmTemplate;
1135 }
1136
1137 @Override
1138 public DDMTemplate getWrappedModel() {
1139 return _ddmTemplate;
1140 }
1141
1142 @Override
1143 public void resetOriginalValues() {
1144 _ddmTemplate.resetOriginalValues();
1145 }
1146
1147 private DDMTemplate _ddmTemplate;
1148 }