2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.be.dao.neo4j;
23 import org.openecomp.sdc.be.dao.graph.datatype.GraphElement;
25 import java.util.ArrayList;
26 import java.util.List;
28 public class BatchBuilder {
29 // private Map<String, List<Neo4jNode>> nodes;
30 // private List<Neo4jRelation> relations;
32 private List<GraphElement> elements;
36 protected BatchBuilder() {
37 // nodes = new HashMap<String, List<Neo4jNode>>();
38 // relations = new ArrayList<Neo4jRelation>();
39 elements = new ArrayList<>();
42 public static BatchBuilder getBuilder() {
43 return new BatchBuilder();
46 public BatchBuilder add(GraphElement element) {
47 elements.add(element);
51 public List<GraphElement> getElements() {
55 // public BatchBuilder add( Neo4jNode element ){
56 // String label = element.getLabel();
57 // List<Neo4jNode> list = nodes.get(label);
58 // if ( list == null ){
59 // list = new ArrayList<Neo4jNode>();
62 // nodes.put(label, list);
66 // public BatchBuilder add( Neo4jRelation relation ){
67 // relations.add(relation);
71 // public Map<String, List<Neo4jNode>> getNodes() {
75 // public List<Neo4jRelation> getRelations() {