diff options
Diffstat (limited to 'src/main/java/org/onap/aai/graphgraph/dto/NodeProperty.java')
-rw-r--r-- | src/main/java/org/onap/aai/graphgraph/dto/NodeProperty.java | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/src/main/java/org/onap/aai/graphgraph/dto/NodeProperty.java b/src/main/java/org/onap/aai/graphgraph/dto/NodeProperty.java new file mode 100644 index 0000000..5f45a05 --- /dev/null +++ b/src/main/java/org/onap/aai/graphgraph/dto/NodeProperty.java @@ -0,0 +1,83 @@ +package org.onap.aai.graphgraph.dto; + +public class NodeProperty extends Property { + private String description; + private String type; + private boolean key; + private boolean index; + private boolean required; + + public NodeProperty(String propertyName, + String description, String type, boolean key, boolean index, boolean required) { + super(propertyName, ""); + this.description = description; + this.type = type; + this.key = key; + this.index = index; + this.required = required; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public boolean getKey() { + return key; + } + + public void setKey(boolean key) { + this.key = key; + } + + public boolean getIndex() { + return index; + } + + public void setIndex(boolean index) { + this.index = index; + } + + public boolean getRequired() { + return required; + } + + public void setRequired(boolean required) { + this.required = required; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + NodeProperty property = (NodeProperty) o; + + return getPropertyName().equals(property.getPropertyName()); + } + + @Override + public int hashCode() { + return getPropertyName().hashCode(); + } + + @Override + public int compareTo(Property o) { + return o.getPropertyName().compareTo(getPropertyName()); + } +} |