aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntity.java')
-rw-r--r--src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntity.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntity.java b/src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntity.java
index 111f67c..39b92d4 100644
--- a/src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntity.java
+++ b/src/main/java/org/onap/aai/graphgraph/velocity/VelocityEntity.java
@@ -19,19 +19,20 @@
*/
package org.onap.aai.graphgraph.velocity;
+import java.util.LinkedList;
import java.util.List;
import java.util.Set;
public class VelocityEntity extends VelocityId {
private String name;
- private List<VelocityAssociation> neighbours;
- private Set<String> properties;
+ private List<VelocityAssociation> neighbours = new LinkedList<>();
+ private Set<VelocityEntityProperty> properties;
- public Set<String> getProperties() {
+ public Set<VelocityEntityProperty> getProperties() {
return properties;
}
- public void setProperties(Set<String> properties) {
+ public void setProperties(Set<VelocityEntityProperty> properties) {
this.properties = properties;
}
@@ -55,6 +56,11 @@ public class VelocityEntity extends VelocityId {
this.neighbours = neighbours;
}
+ public void addNeighbours(VelocityAssociation neighbour) {
+ neighbours.add(neighbour);
+ }
+
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -73,4 +79,11 @@ public class VelocityEntity extends VelocityId {
public int hashCode() {
return name.hashCode();
}
+
+ @Override
+ public String toString() {
+ return "VelocityEntity{" +
+ "name='" + name + '\'' +
+ '}';
+ }
}