summaryrefslogtreecommitdiffstats
path: root/catalog-dao/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-dao/src/main/java/org')
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/BatchBuilder.java31
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/Neo4jEdge.java4
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/NodeRelation.java5
3 files changed, 10 insertions, 30 deletions
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/BatchBuilder.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/BatchBuilder.java
index 9d30c20683..a13c23140e 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/BatchBuilder.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/BatchBuilder.java
@@ -26,16 +26,10 @@ import java.util.ArrayList;
import java.util.List;
public class BatchBuilder {
- // private Map<String, List<Neo4jNode>> nodes;
- // private List<Neo4jRelation> relations;
- //
- private List<GraphElement> elements;
- // TODO add filter
+ private List<GraphElement> elements;
protected BatchBuilder() {
- // nodes = new HashMap<String, List<Neo4jNode>>();
- // relations = new ArrayList<Neo4jRelation>();
elements = new ArrayList<>();
}
@@ -52,28 +46,5 @@ public class BatchBuilder {
return elements;
}
- // public BatchBuilder add( Neo4jNode element ){
- // String label = element.getLabel();
- // List<Neo4jNode> list = nodes.get(label);
- // if ( list == null ){
- // list = new ArrayList<Neo4jNode>();
- // }
- // list.add(element);
- // nodes.put(label, list);
-
- // return this;
- // }
- // public BatchBuilder add( Neo4jRelation relation ){
- // relations.add(relation);
- // return this;
- // }
- //
- // public Map<String, List<Neo4jNode>> getNodes() {
- // return nodes;
- // }
- //
- // public List<Neo4jRelation> getRelations() {
- // return relations;
- // }
}
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/Neo4jEdge.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/Neo4jEdge.java
index bdd17b6512..3e2cf9c8d4 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/Neo4jEdge.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/Neo4jEdge.java
@@ -20,6 +20,7 @@
package org.openecomp.sdc.be.dao.neo4j;
+import com.google.common.annotations.VisibleForTesting;
import org.openecomp.sdc.be.dao.graph.datatype.ActionEnum;
import java.util.Map;
@@ -30,6 +31,9 @@ public class Neo4jEdge {
private Map<String, Object> properties;
private ActionEnum action;
+ @VisibleForTesting
+ Neo4jEdge() {}
+
public Neo4jEdge(GraphEdgeLabels edgeType, Map<String, Object> properties, ActionEnum actionEnum) {
super();
this.edgeType = edgeType;
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/NodeRelation.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/NodeRelation.java
index c1402f402f..089bbdbba3 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/NodeRelation.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/NodeRelation.java
@@ -20,12 +20,17 @@
package org.openecomp.sdc.be.dao.neo4j;
+import com.google.common.annotations.VisibleForTesting;
+
public class NodeRelation {
private int fromIndex;
private int toIndex;
private Neo4jEdge edge;
+ @VisibleForTesting
+ NodeRelation() {}
+
public NodeRelation(int fromIndex, int toIndex, Neo4jEdge edge) {
super();
this.fromIndex = fromIndex;