diff options
Diffstat (limited to 'src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntityProperty.java')
-rw-r--r-- | src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntityProperty.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntityProperty.java b/src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntityProperty.java new file mode 100644 index 0000000..9ee2fbb --- /dev/null +++ b/src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntityProperty.java @@ -0,0 +1,33 @@ +package org.onap.aai.graphgraph.velocity; + +import org.onap.aai.graphgraph.dto.Property; + +public class VelocityEntityProperty extends Property { + + private final VelocityEntity entity; + + public VelocityEntityProperty(String propertyName, String propertyValue, VelocityEntity entity) { + super(propertyName, propertyValue); + this.entity = entity; + } + + public String getEntityId() { + return entity.getId(); + } + + public String getEntityName() { + return entity.getName(); + } + + public boolean hasEntity(){ + return entity != null; + } + + @Override + public String toString() { + return "VelocityEntityProperty{" + + " name=" + getPropertyName() + + " type=" + getPropertyValue() + + '}'; + } +} |