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 DDMStructureWrapper implements DDMStructure,
034 ModelWrapper<DDMStructure> {
035 public DDMStructureWrapper(DDMStructure ddmStructure) {
036 _ddmStructure = ddmStructure;
037 }
038
039 public Class<?> getModelClass() {
040 return DDMStructure.class;
041 }
042
043 public String getModelClassName() {
044 return DDMStructure.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("structureId", getStructureId());
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("classNameId", getClassNameId());
059 attributes.put("structureKey", getStructureKey());
060 attributes.put("name", getName());
061 attributes.put("description", getDescription());
062 attributes.put("xsd", getXsd());
063 attributes.put("storageType", getStorageType());
064 attributes.put("type", getType());
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 structureId = (Long)attributes.get("structureId");
077
078 if (structureId != null) {
079 setStructureId(structureId);
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 classNameId = (Long)attributes.get("classNameId");
119
120 if (classNameId != null) {
121 setClassNameId(classNameId);
122 }
123
124 String structureKey = (String)attributes.get("structureKey");
125
126 if (structureKey != null) {
127 setStructureKey(structureKey);
128 }
129
130 String name = (String)attributes.get("name");
131
132 if (name != null) {
133 setName(name);
134 }
135
136 String description = (String)attributes.get("description");
137
138 if (description != null) {
139 setDescription(description);
140 }
141
142 String xsd = (String)attributes.get("xsd");
143
144 if (xsd != null) {
145 setXsd(xsd);
146 }
147
148 String storageType = (String)attributes.get("storageType");
149
150 if (storageType != null) {
151 setStorageType(storageType);
152 }
153
154 Integer type = (Integer)attributes.get("type");
155
156 if (type != null) {
157 setType(type);
158 }
159 }
160
161
166 public long getPrimaryKey() {
167 return _ddmStructure.getPrimaryKey();
168 }
169
170
175 public void setPrimaryKey(long primaryKey) {
176 _ddmStructure.setPrimaryKey(primaryKey);
177 }
178
179
184 public java.lang.String getUuid() {
185 return _ddmStructure.getUuid();
186 }
187
188
193 public void setUuid(java.lang.String uuid) {
194 _ddmStructure.setUuid(uuid);
195 }
196
197
202 public long getStructureId() {
203 return _ddmStructure.getStructureId();
204 }
205
206
211 public void setStructureId(long structureId) {
212 _ddmStructure.setStructureId(structureId);
213 }
214
215
220 public long getGroupId() {
221 return _ddmStructure.getGroupId();
222 }
223
224
229 public void setGroupId(long groupId) {
230 _ddmStructure.setGroupId(groupId);
231 }
232
233
238 public long getCompanyId() {
239 return _ddmStructure.getCompanyId();
240 }
241
242
247 public void setCompanyId(long companyId) {
248 _ddmStructure.setCompanyId(companyId);
249 }
250
251
256 public long getUserId() {
257 return _ddmStructure.getUserId();
258 }
259
260
265 public void setUserId(long userId) {
266 _ddmStructure.setUserId(userId);
267 }
268
269
275 public java.lang.String getUserUuid()
276 throws com.liferay.portal.kernel.exception.SystemException {
277 return _ddmStructure.getUserUuid();
278 }
279
280
285 public void setUserUuid(java.lang.String userUuid) {
286 _ddmStructure.setUserUuid(userUuid);
287 }
288
289
294 public java.lang.String getUserName() {
295 return _ddmStructure.getUserName();
296 }
297
298
303 public void setUserName(java.lang.String userName) {
304 _ddmStructure.setUserName(userName);
305 }
306
307
312 public java.util.Date getCreateDate() {
313 return _ddmStructure.getCreateDate();
314 }
315
316
321 public void setCreateDate(java.util.Date createDate) {
322 _ddmStructure.setCreateDate(createDate);
323 }
324
325
330 public java.util.Date getModifiedDate() {
331 return _ddmStructure.getModifiedDate();
332 }
333
334
339 public void setModifiedDate(java.util.Date modifiedDate) {
340 _ddmStructure.setModifiedDate(modifiedDate);
341 }
342
343
348 public java.lang.String getClassName() {
349 return _ddmStructure.getClassName();
350 }
351
352 public void setClassName(java.lang.String className) {
353 _ddmStructure.setClassName(className);
354 }
355
356
361 public long getClassNameId() {
362 return _ddmStructure.getClassNameId();
363 }
364
365
370 public void setClassNameId(long classNameId) {
371 _ddmStructure.setClassNameId(classNameId);
372 }
373
374
379 public java.lang.String getStructureKey() {
380 return _ddmStructure.getStructureKey();
381 }
382
383
388 public void setStructureKey(java.lang.String structureKey) {
389 _ddmStructure.setStructureKey(structureKey);
390 }
391
392
397 public java.lang.String getName() {
398 return _ddmStructure.getName();
399 }
400
401
407 public java.lang.String getName(java.util.Locale locale) {
408 return _ddmStructure.getName(locale);
409 }
410
411
418 public java.lang.String getName(java.util.Locale locale, boolean useDefault) {
419 return _ddmStructure.getName(locale, useDefault);
420 }
421
422
428 public java.lang.String getName(java.lang.String languageId) {
429 return _ddmStructure.getName(languageId);
430 }
431
432
439 public java.lang.String getName(java.lang.String languageId,
440 boolean useDefault) {
441 return _ddmStructure.getName(languageId, useDefault);
442 }
443
444 public java.lang.String getNameCurrentLanguageId() {
445 return _ddmStructure.getNameCurrentLanguageId();
446 }
447
448 public java.lang.String getNameCurrentValue() {
449 return _ddmStructure.getNameCurrentValue();
450 }
451
452
457 public java.util.Map<java.util.Locale, java.lang.String> getNameMap() {
458 return _ddmStructure.getNameMap();
459 }
460
461
466 public void setName(java.lang.String name) {
467 _ddmStructure.setName(name);
468 }
469
470
476 public void setName(java.lang.String name, java.util.Locale locale) {
477 _ddmStructure.setName(name, locale);
478 }
479
480
487 public void setName(java.lang.String name, java.util.Locale locale,
488 java.util.Locale defaultLocale) {
489 _ddmStructure.setName(name, locale, defaultLocale);
490 }
491
492 public void setNameCurrentLanguageId(java.lang.String languageId) {
493 _ddmStructure.setNameCurrentLanguageId(languageId);
494 }
495
496
501 public void setNameMap(
502 java.util.Map<java.util.Locale, java.lang.String> nameMap) {
503 _ddmStructure.setNameMap(nameMap);
504 }
505
506
512 public void setNameMap(
513 java.util.Map<java.util.Locale, java.lang.String> nameMap,
514 java.util.Locale defaultLocale) {
515 _ddmStructure.setNameMap(nameMap, defaultLocale);
516 }
517
518
523 public java.lang.String getDescription() {
524 return _ddmStructure.getDescription();
525 }
526
527
533 public java.lang.String getDescription(java.util.Locale locale) {
534 return _ddmStructure.getDescription(locale);
535 }
536
537
544 public java.lang.String getDescription(java.util.Locale locale,
545 boolean useDefault) {
546 return _ddmStructure.getDescription(locale, useDefault);
547 }
548
549
555 public java.lang.String getDescription(java.lang.String languageId) {
556 return _ddmStructure.getDescription(languageId);
557 }
558
559
566 public java.lang.String getDescription(java.lang.String languageId,
567 boolean useDefault) {
568 return _ddmStructure.getDescription(languageId, useDefault);
569 }
570
571 public java.lang.String getDescriptionCurrentLanguageId() {
572 return _ddmStructure.getDescriptionCurrentLanguageId();
573 }
574
575 public java.lang.String getDescriptionCurrentValue() {
576 return _ddmStructure.getDescriptionCurrentValue();
577 }
578
579
584 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
585 return _ddmStructure.getDescriptionMap();
586 }
587
588
593 public void setDescription(java.lang.String description) {
594 _ddmStructure.setDescription(description);
595 }
596
597
603 public void setDescription(java.lang.String description,
604 java.util.Locale locale) {
605 _ddmStructure.setDescription(description, locale);
606 }
607
608
615 public void setDescription(java.lang.String description,
616 java.util.Locale locale, java.util.Locale defaultLocale) {
617 _ddmStructure.setDescription(description, locale, defaultLocale);
618 }
619
620 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
621 _ddmStructure.setDescriptionCurrentLanguageId(languageId);
622 }
623
624
629 public void setDescriptionMap(
630 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
631 _ddmStructure.setDescriptionMap(descriptionMap);
632 }
633
634
640 public void setDescriptionMap(
641 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
642 java.util.Locale defaultLocale) {
643 _ddmStructure.setDescriptionMap(descriptionMap, defaultLocale);
644 }
645
646
651 public java.lang.String getXsd() {
652 return _ddmStructure.getXsd();
653 }
654
655
660 public void setXsd(java.lang.String xsd) {
661 _ddmStructure.setXsd(xsd);
662 }
663
664
669 public java.lang.String getStorageType() {
670 return _ddmStructure.getStorageType();
671 }
672
673
678 public void setStorageType(java.lang.String storageType) {
679 _ddmStructure.setStorageType(storageType);
680 }
681
682
687 public int getType() {
688 return _ddmStructure.getType();
689 }
690
691
696 public void setType(int type) {
697 _ddmStructure.setType(type);
698 }
699
700 public boolean isNew() {
701 return _ddmStructure.isNew();
702 }
703
704 public void setNew(boolean n) {
705 _ddmStructure.setNew(n);
706 }
707
708 public boolean isCachedModel() {
709 return _ddmStructure.isCachedModel();
710 }
711
712 public void setCachedModel(boolean cachedModel) {
713 _ddmStructure.setCachedModel(cachedModel);
714 }
715
716 public boolean isEscapedModel() {
717 return _ddmStructure.isEscapedModel();
718 }
719
720 public java.io.Serializable getPrimaryKeyObj() {
721 return _ddmStructure.getPrimaryKeyObj();
722 }
723
724 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
725 _ddmStructure.setPrimaryKeyObj(primaryKeyObj);
726 }
727
728 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
729 return _ddmStructure.getExpandoBridge();
730 }
731
732 public void setExpandoBridgeAttributes(
733 com.liferay.portal.service.ServiceContext serviceContext) {
734 _ddmStructure.setExpandoBridgeAttributes(serviceContext);
735 }
736
737 public void prepareLocalizedFieldsForImport(
738 java.util.Locale defaultImportLocale)
739 throws com.liferay.portal.LocaleException {
740 _ddmStructure.prepareLocalizedFieldsForImport(defaultImportLocale);
741 }
742
743 @Override
744 public java.lang.Object clone() {
745 return new DDMStructureWrapper((DDMStructure)_ddmStructure.clone());
746 }
747
748 public int compareTo(
749 com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) {
750 return _ddmStructure.compareTo(ddmStructure);
751 }
752
753 @Override
754 public int hashCode() {
755 return _ddmStructure.hashCode();
756 }
757
758 public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> toCacheModel() {
759 return _ddmStructure.toCacheModel();
760 }
761
762 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure toEscapedModel() {
763 return new DDMStructureWrapper(_ddmStructure.toEscapedModel());
764 }
765
766 public com.liferay.portlet.dynamicdatamapping.model.DDMStructure toUnescapedModel() {
767 return new DDMStructureWrapper(_ddmStructure.toUnescapedModel());
768 }
769
770 @Override
771 public java.lang.String toString() {
772 return _ddmStructure.toString();
773 }
774
775 public java.lang.String toXmlString() {
776 return _ddmStructure.toXmlString();
777 }
778
779 public void persist()
780 throws com.liferay.portal.kernel.exception.SystemException {
781 _ddmStructure.persist();
782 }
783
784 public java.util.List<java.lang.String> getAvailableLocales() {
785 return _ddmStructure.getAvailableLocales();
786 }
787
788 public java.lang.String getDefaultLocale() {
789 return _ddmStructure.getDefaultLocale();
790 }
791
792 public com.liferay.portal.kernel.xml.Document getDocument() {
793 return _ddmStructure.getDocument();
794 }
795
796 public java.lang.String getFieldDataType(java.lang.String fieldName)
797 throws com.liferay.portlet.dynamicdatamapping.StructureFieldException {
798 return _ddmStructure.getFieldDataType(fieldName);
799 }
800
801 public java.lang.String getFieldLabel(java.lang.String fieldName,
802 java.util.Locale locale)
803 throws com.liferay.portlet.dynamicdatamapping.StructureFieldException {
804 return _ddmStructure.getFieldLabel(fieldName, locale);
805 }
806
807 public java.lang.String getFieldLabel(java.lang.String fieldName,
808 java.lang.String locale)
809 throws com.liferay.portlet.dynamicdatamapping.StructureFieldException {
810 return _ddmStructure.getFieldLabel(fieldName, locale);
811 }
812
813 public java.util.Set<java.lang.String> getFieldNames() {
814 return _ddmStructure.getFieldNames();
815 }
816
817 public java.lang.String getFieldProperty(java.lang.String fieldName,
818 java.lang.String property)
819 throws com.liferay.portlet.dynamicdatamapping.StructureFieldException {
820 return _ddmStructure.getFieldProperty(fieldName, property);
821 }
822
823 public java.lang.String getFieldProperty(java.lang.String fieldName,
824 java.lang.String property, java.lang.String locale)
825 throws com.liferay.portlet.dynamicdatamapping.StructureFieldException {
826 return _ddmStructure.getFieldProperty(fieldName, property, locale);
827 }
828
829 public boolean getFieldRequired(java.lang.String fieldName)
830 throws com.liferay.portlet.dynamicdatamapping.StructureFieldException {
831 return _ddmStructure.getFieldRequired(fieldName);
832 }
833
834 public java.util.Map<java.lang.String, java.lang.String> getFields(
835 java.lang.String fieldName, java.lang.String attributeName,
836 java.lang.String attributeValue) {
837 return _ddmStructure.getFields(fieldName, attributeName, attributeValue);
838 }
839
840 public java.util.Map<java.lang.String, java.lang.String> getFields(
841 java.lang.String fieldName, java.lang.String attributeName,
842 java.lang.String attributeValue, java.lang.String locale) {
843 return _ddmStructure.getFields(fieldName, attributeName,
844 attributeValue, locale);
845 }
846
847 public java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>> getFieldsMap() {
848 return _ddmStructure.getFieldsMap();
849 }
850
851 public java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>> getFieldsMap(
852 java.lang.String locale) {
853 return _ddmStructure.getFieldsMap(locale);
854 }
855
856 public java.lang.String getFieldType(java.lang.String fieldName)
857 throws com.liferay.portlet.dynamicdatamapping.StructureFieldException {
858 return _ddmStructure.getFieldType(fieldName);
859 }
860
861 public java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>> getLocalizedFieldsMap() {
862 return _ddmStructure.getLocalizedFieldsMap();
863 }
864
865 public java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>> getLocalizedTransientFieldsMap() {
866 return _ddmStructure.getLocalizedTransientFieldsMap();
867 }
868
869 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates()
870 throws com.liferay.portal.kernel.exception.SystemException {
871 return _ddmStructure.getTemplates();
872 }
873
874 public java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>> getTransientFieldsMap(
875 java.lang.String locale) {
876 return _ddmStructure.getTransientFieldsMap(locale);
877 }
878
879 public boolean hasField(java.lang.String fieldName) {
880 return _ddmStructure.hasField(fieldName);
881 }
882
883 public void setDocument(com.liferay.portal.kernel.xml.Document document) {
884 _ddmStructure.setDocument(document);
885 }
886
887 public void setLocalizedFieldsMap(
888 java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>> localizedFieldsMap) {
889 _ddmStructure.setLocalizedFieldsMap(localizedFieldsMap);
890 }
891
892 public void setLocalizedTransientFieldsMap(
893 java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>> localizedTransientFieldsMap) {
894 _ddmStructure.setLocalizedTransientFieldsMap(localizedTransientFieldsMap);
895 }
896
897 @Override
898 public boolean equals(Object obj) {
899 if (this == obj) {
900 return true;
901 }
902
903 if (!(obj instanceof DDMStructureWrapper)) {
904 return false;
905 }
906
907 DDMStructureWrapper ddmStructureWrapper = (DDMStructureWrapper)obj;
908
909 if (Validator.equals(_ddmStructure, ddmStructureWrapper._ddmStructure)) {
910 return true;
911 }
912
913 return false;
914 }
915
916
919 public DDMStructure getWrappedDDMStructure() {
920 return _ddmStructure;
921 }
922
923 public DDMStructure getWrappedModel() {
924 return _ddmStructure;
925 }
926
927 public void resetOriginalValues() {
928 _ddmStructure.resetOriginalValues();
929 }
930
931 private DDMStructure _ddmStructure;
932 }