001
014
015 package com.liferay.portlet.dynamicdatamapping.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class DDMTemplateWrapper implements DDMTemplate,
034 ModelWrapper<DDMTemplate> {
035 public DDMTemplateWrapper(DDMTemplate ddmTemplate) {
036 _ddmTemplate = ddmTemplate;
037 }
038
039 public Class<?> getModelClass() {
040 return DDMTemplate.class;
041 }
042
043 public String getModelClassName() {
044 return DDMTemplate.class.getName();
045 }
046
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("uuid", getUuid());
051 attributes.put("templateId", getTemplateId());
052 attributes.put("groupId", getGroupId());
053 attributes.put("companyId", getCompanyId());
054 attributes.put("userId", getUserId());
055 attributes.put("userName", getUserName());
056 attributes.put("createDate", getCreateDate());
057 attributes.put("modifiedDate", getModifiedDate());
058 attributes.put("structureId", getStructureId());
059 attributes.put("name", getName());
060 attributes.put("description", getDescription());
061 attributes.put("type", getType());
062 attributes.put("mode", getMode());
063 attributes.put("language", getLanguage());
064 attributes.put("script", getScript());
065
066 return attributes;
067 }
068
069 public void setModelAttributes(Map<String, Object> attributes) {
070 String uuid = (String)attributes.get("uuid");
071
072 if (uuid != null) {
073 setUuid(uuid);
074 }
075
076 Long templateId = (Long)attributes.get("templateId");
077
078 if (templateId != null) {
079 setTemplateId(templateId);
080 }
081
082 Long groupId = (Long)attributes.get("groupId");
083
084 if (groupId != null) {
085 setGroupId(groupId);
086 }
087
088 Long companyId = (Long)attributes.get("companyId");
089
090 if (companyId != null) {
091 setCompanyId(companyId);
092 }
093
094 Long userId = (Long)attributes.get("userId");
095
096 if (userId != null) {
097 setUserId(userId);
098 }
099
100 String userName = (String)attributes.get("userName");
101
102 if (userName != null) {
103 setUserName(userName);
104 }
105
106 Date createDate = (Date)attributes.get("createDate");
107
108 if (createDate != null) {
109 setCreateDate(createDate);
110 }
111
112 Date modifiedDate = (Date)attributes.get("modifiedDate");
113
114 if (modifiedDate != null) {
115 setModifiedDate(modifiedDate);
116 }
117
118 Long structureId = (Long)attributes.get("structureId");
119
120 if (structureId != null) {
121 setStructureId(structureId);
122 }
123
124 String name = (String)attributes.get("name");
125
126 if (name != null) {
127 setName(name);
128 }
129
130 String description = (String)attributes.get("description");
131
132 if (description != null) {
133 setDescription(description);
134 }
135
136 String type = (String)attributes.get("type");
137
138 if (type != null) {
139 setType(type);
140 }
141
142 String mode = (String)attributes.get("mode");
143
144 if (mode != null) {
145 setMode(mode);
146 }
147
148 String language = (String)attributes.get("language");
149
150 if (language != null) {
151 setLanguage(language);
152 }
153
154 String script = (String)attributes.get("script");
155
156 if (script != null) {
157 setScript(script);
158 }
159 }
160
161
166 public long getPrimaryKey() {
167 return _ddmTemplate.getPrimaryKey();
168 }
169
170
175 public void setPrimaryKey(long primaryKey) {
176 _ddmTemplate.setPrimaryKey(primaryKey);
177 }
178
179
184 public java.lang.String getUuid() {
185 return _ddmTemplate.getUuid();
186 }
187
188
193 public void setUuid(java.lang.String uuid) {
194 _ddmTemplate.setUuid(uuid);
195 }
196
197
202 public long getTemplateId() {
203 return _ddmTemplate.getTemplateId();
204 }
205
206
211 public void setTemplateId(long templateId) {
212 _ddmTemplate.setTemplateId(templateId);
213 }
214
215
220 public long getGroupId() {
221 return _ddmTemplate.getGroupId();
222 }
223
224
229 public void setGroupId(long groupId) {
230 _ddmTemplate.setGroupId(groupId);
231 }
232
233
238 public long getCompanyId() {
239 return _ddmTemplate.getCompanyId();
240 }
241
242
247 public void setCompanyId(long companyId) {
248 _ddmTemplate.setCompanyId(companyId);
249 }
250
251
256 public long getUserId() {
257 return _ddmTemplate.getUserId();
258 }
259
260
265 public void setUserId(long userId) {
266 _ddmTemplate.setUserId(userId);
267 }
268
269
275 public java.lang.String getUserUuid()
276 throws com.liferay.portal.kernel.exception.SystemException {
277 return _ddmTemplate.getUserUuid();
278 }
279
280
285 public void setUserUuid(java.lang.String userUuid) {
286 _ddmTemplate.setUserUuid(userUuid);
287 }
288
289
294 public java.lang.String getUserName() {
295 return _ddmTemplate.getUserName();
296 }
297
298
303 public void setUserName(java.lang.String userName) {
304 _ddmTemplate.setUserName(userName);
305 }
306
307
312 public java.util.Date getCreateDate() {
313 return _ddmTemplate.getCreateDate();
314 }
315
316
321 public void setCreateDate(java.util.Date createDate) {
322 _ddmTemplate.setCreateDate(createDate);
323 }
324
325
330 public java.util.Date getModifiedDate() {
331 return _ddmTemplate.getModifiedDate();
332 }
333
334
339 public void setModifiedDate(java.util.Date modifiedDate) {
340 _ddmTemplate.setModifiedDate(modifiedDate);
341 }
342
343
348 public long getStructureId() {
349 return _ddmTemplate.getStructureId();
350 }
351
352
357 public void setStructureId(long structureId) {
358 _ddmTemplate.setStructureId(structureId);
359 }
360
361
366 public java.lang.String getName() {
367 return _ddmTemplate.getName();
368 }
369
370
376 public java.lang.String getName(java.util.Locale locale) {
377 return _ddmTemplate.getName(locale);
378 }
379
380
387 public java.lang.String getName(java.util.Locale locale, boolean useDefault) {
388 return _ddmTemplate.getName(locale, useDefault);
389 }
390
391
397 public java.lang.String getName(java.lang.String languageId) {
398 return _ddmTemplate.getName(languageId);
399 }
400
401
408 public java.lang.String getName(java.lang.String languageId,
409 boolean useDefault) {
410 return _ddmTemplate.getName(languageId, useDefault);
411 }
412
413 public java.lang.String getNameCurrentLanguageId() {
414 return _ddmTemplate.getNameCurrentLanguageId();
415 }
416
417 public java.lang.String getNameCurrentValue() {
418 return _ddmTemplate.getNameCurrentValue();
419 }
420
421
426 public java.util.Map<java.util.Locale, java.lang.String> getNameMap() {
427 return _ddmTemplate.getNameMap();
428 }
429
430
435 public void setName(java.lang.String name) {
436 _ddmTemplate.setName(name);
437 }
438
439
445 public void setName(java.lang.String name, java.util.Locale locale) {
446 _ddmTemplate.setName(name, locale);
447 }
448
449
456 public void setName(java.lang.String name, java.util.Locale locale,
457 java.util.Locale defaultLocale) {
458 _ddmTemplate.setName(name, locale, defaultLocale);
459 }
460
461 public void setNameCurrentLanguageId(java.lang.String languageId) {
462 _ddmTemplate.setNameCurrentLanguageId(languageId);
463 }
464
465
470 public void setNameMap(
471 java.util.Map<java.util.Locale, java.lang.String> nameMap) {
472 _ddmTemplate.setNameMap(nameMap);
473 }
474
475
481 public void setNameMap(
482 java.util.Map<java.util.Locale, java.lang.String> nameMap,
483 java.util.Locale defaultLocale) {
484 _ddmTemplate.setNameMap(nameMap, defaultLocale);
485 }
486
487
492 public java.lang.String getDescription() {
493 return _ddmTemplate.getDescription();
494 }
495
496
502 public java.lang.String getDescription(java.util.Locale locale) {
503 return _ddmTemplate.getDescription(locale);
504 }
505
506
513 public java.lang.String getDescription(java.util.Locale locale,
514 boolean useDefault) {
515 return _ddmTemplate.getDescription(locale, useDefault);
516 }
517
518
524 public java.lang.String getDescription(java.lang.String languageId) {
525 return _ddmTemplate.getDescription(languageId);
526 }
527
528
535 public java.lang.String getDescription(java.lang.String languageId,
536 boolean useDefault) {
537 return _ddmTemplate.getDescription(languageId, useDefault);
538 }
539
540 public java.lang.String getDescriptionCurrentLanguageId() {
541 return _ddmTemplate.getDescriptionCurrentLanguageId();
542 }
543
544 public java.lang.String getDescriptionCurrentValue() {
545 return _ddmTemplate.getDescriptionCurrentValue();
546 }
547
548
553 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
554 return _ddmTemplate.getDescriptionMap();
555 }
556
557
562 public void setDescription(java.lang.String description) {
563 _ddmTemplate.setDescription(description);
564 }
565
566
572 public void setDescription(java.lang.String description,
573 java.util.Locale locale) {
574 _ddmTemplate.setDescription(description, locale);
575 }
576
577
584 public void setDescription(java.lang.String description,
585 java.util.Locale locale, java.util.Locale defaultLocale) {
586 _ddmTemplate.setDescription(description, locale, defaultLocale);
587 }
588
589 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
590 _ddmTemplate.setDescriptionCurrentLanguageId(languageId);
591 }
592
593
598 public void setDescriptionMap(
599 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
600 _ddmTemplate.setDescriptionMap(descriptionMap);
601 }
602
603
609 public void setDescriptionMap(
610 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
611 java.util.Locale defaultLocale) {
612 _ddmTemplate.setDescriptionMap(descriptionMap, defaultLocale);
613 }
614
615
620 public java.lang.String getType() {
621 return _ddmTemplate.getType();
622 }
623
624
629 public void setType(java.lang.String type) {
630 _ddmTemplate.setType(type);
631 }
632
633
638 public java.lang.String getMode() {
639 return _ddmTemplate.getMode();
640 }
641
642
647 public void setMode(java.lang.String mode) {
648 _ddmTemplate.setMode(mode);
649 }
650
651
656 public java.lang.String getLanguage() {
657 return _ddmTemplate.getLanguage();
658 }
659
660
665 public void setLanguage(java.lang.String language) {
666 _ddmTemplate.setLanguage(language);
667 }
668
669
674 public java.lang.String getScript() {
675 return _ddmTemplate.getScript();
676 }
677
678
683 public void setScript(java.lang.String script) {
684 _ddmTemplate.setScript(script);
685 }
686
687 public boolean isNew() {
688 return _ddmTemplate.isNew();
689 }
690
691 public void setNew(boolean n) {
692 _ddmTemplate.setNew(n);
693 }
694
695 public boolean isCachedModel() {
696 return _ddmTemplate.isCachedModel();
697 }
698
699 public void setCachedModel(boolean cachedModel) {
700 _ddmTemplate.setCachedModel(cachedModel);
701 }
702
703 public boolean isEscapedModel() {
704 return _ddmTemplate.isEscapedModel();
705 }
706
707 public java.io.Serializable getPrimaryKeyObj() {
708 return _ddmTemplate.getPrimaryKeyObj();
709 }
710
711 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
712 _ddmTemplate.setPrimaryKeyObj(primaryKeyObj);
713 }
714
715 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
716 return _ddmTemplate.getExpandoBridge();
717 }
718
719 public void setExpandoBridgeAttributes(
720 com.liferay.portal.service.ServiceContext serviceContext) {
721 _ddmTemplate.setExpandoBridgeAttributes(serviceContext);
722 }
723
724 public void prepareLocalizedFieldsForImport(
725 java.util.Locale defaultImportLocale)
726 throws com.liferay.portal.LocaleException {
727 _ddmTemplate.prepareLocalizedFieldsForImport(defaultImportLocale);
728 }
729
730 @Override
731 public java.lang.Object clone() {
732 return new DDMTemplateWrapper((DDMTemplate)_ddmTemplate.clone());
733 }
734
735 public int compareTo(
736 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate ddmTemplate) {
737 return _ddmTemplate.compareTo(ddmTemplate);
738 }
739
740 @Override
741 public int hashCode() {
742 return _ddmTemplate.hashCode();
743 }
744
745 public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> toCacheModel() {
746 return _ddmTemplate.toCacheModel();
747 }
748
749 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate toEscapedModel() {
750 return new DDMTemplateWrapper(_ddmTemplate.toEscapedModel());
751 }
752
753 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate toUnescapedModel() {
754 return new DDMTemplateWrapper(_ddmTemplate.toUnescapedModel());
755 }
756
757 @Override
758 public java.lang.String toString() {
759 return _ddmTemplate.toString();
760 }
761
762 public java.lang.String toXmlString() {
763 return _ddmTemplate.toXmlString();
764 }
765
766 public void persist()
767 throws com.liferay.portal.kernel.exception.SystemException {
768 _ddmTemplate.persist();
769 }
770
771 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure()
772 throws com.liferay.portal.kernel.exception.PortalException,
773 com.liferay.portal.kernel.exception.SystemException {
774 return _ddmTemplate.getStructure();
775 }
776
777 @Override
778 public boolean equals(Object obj) {
779 if (this == obj) {
780 return true;
781 }
782
783 if (!(obj instanceof DDMTemplateWrapper)) {
784 return false;
785 }
786
787 DDMTemplateWrapper ddmTemplateWrapper = (DDMTemplateWrapper)obj;
788
789 if (Validator.equals(_ddmTemplate, ddmTemplateWrapper._ddmTemplate)) {
790 return true;
791 }
792
793 return false;
794 }
795
796
799 public DDMTemplate getWrappedDDMTemplate() {
800 return _ddmTemplate;
801 }
802
803 public DDMTemplate getWrappedModel() {
804 return _ddmTemplate;
805 }
806
807 public void resetOriginalValues() {
808 _ddmTemplate.resetOriginalValues();
809 }
810
811 private DDMTemplate _ddmTemplate;
812 }