diff options
Diffstat (limited to 'common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java')
-rw-r--r-- | common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java | 96 |
1 files changed, 80 insertions, 16 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java index b619c66ee0..27bd6635fb 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java @@ -19,34 +19,98 @@ */ package org.openecomp.sdc.be.datatypes.elements; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import java.io.Serializable; +import org.onap.sdc.tosca.datatypes.model.EntrySchema; +import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields; import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition; -@Getter -@Setter -@NoArgsConstructor -public class AttributeDataDefinition extends ToscaDataDefinition{ +public class AttributeDataDefinition extends ToscaDataDefinition implements Serializable { - private String uniqueId; - private String name; - private SchemaDefinition schema; - private String value; + public AttributeDataDefinition() { + } public AttributeDataDefinition(final AttributeDataDefinition attributeDataDefinition) { super(); this.setUniqueId(attributeDataDefinition.getUniqueId()); + this.setOwnerId(attributeDataDefinition.getOwnerId()); this.setName(attributeDataDefinition.getName()); + this.setType(attributeDataDefinition.getType()); + this.setDescription(attributeDataDefinition.getDescription()); + this.set_default(attributeDataDefinition.get_default()); + this.setStatus(attributeDataDefinition.getStatus()); + this.setEntry_schema(attributeDataDefinition.getEntry_schema()); this.setSchema(attributeDataDefinition.getSchema()); - this.setValue(attributeDataDefinition.getValue()); } - public String getParentUniqueId() { - return getOwnerId(); + public String getUniqueId() { + return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID); + } + + public void setUniqueId(String uniqueId) { + setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId); + } + + @Override + public String getOwnerId() { + return (String) getToscaPresentationValue(JsonPresentationFields.OWNER_ID); + } + + @Override + public void setOwnerId(String ownerId) { + setToscaPresentationValue(JsonPresentationFields.OWNER_ID, ownerId); + } + + public String getName() { + return (String) getToscaPresentationValue(JsonPresentationFields.NAME); + } + + public void setName(String name) { + setToscaPresentationValue(JsonPresentationFields.NAME, name); + } + + @Override + public String getType() { + return (String) getToscaPresentationValue(JsonPresentationFields.TYPE); + } + + public void setType(String type) { + setToscaPresentationValue(JsonPresentationFields.TYPE, type); + } + + public String getDescription() { + return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION); + } + + public void setDescription(String description) { + setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description); + } + + public Object get_default() { + return getToscaPresentationValue(JsonPresentationFields.DEFAULT); + } + + public void set_default(Object _default) { + setToscaPresentationValue(JsonPresentationFields.DEFAULT, _default); + } + + public String getStatus() { + return (String) getToscaPresentationValue(JsonPresentationFields.STATUS); + } + + public void setStatus(String status) { + setToscaPresentationValue(JsonPresentationFields.STATUS, status); + } + + public EntrySchema getEntry_schema() { + return (EntrySchema) getToscaPresentationValue(JsonPresentationFields.SCHEMA); + } + + public void setEntry_schema(EntrySchema entrySchema) { + setToscaPresentationValue(JsonPresentationFields.SCHEMA, entrySchema); } - public void setParentUniqueId(final String parentUniqueId) { - setOwnerId(parentUniqueId); + public SchemaDefinition getSchema() { + return (SchemaDefinition) getToscaPresentationValue(JsonPresentationFields.SCHEMA); } + } |