Merge "Query Optimization"
[cps.git] / cps-service / src / main / java / org / onap / cps / spi / CpsDataPersistenceService.java
index 686f0f3..28b18b3 100644 (file)
@@ -22,6 +22,7 @@
 
 package org.onap.cps.spi;
 
+import java.io.Serializable;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -65,6 +66,17 @@ public interface CpsDataPersistenceService {
     void addListElements(String dataspaceName, String anchorName, String parentNodeXpath,
         Collection<DataNode> listElementsCollection);
 
+    /**
+     * Add multiple lists of data nodes to a parent node at the same time.
+     *
+     * @param dataspaceName           dataspace name
+     * @param anchorName              anchor name
+     * @param parentNodeXpath         parent node xpath
+     * @param newLists collections of lists of data nodes representing list elements
+     */
+    void addMultipleLists(String dataspaceName, String anchorName, String parentNodeXpath,
+            Collection<Collection<DataNode>> newLists);
+
     /**
      * Retrieves datanode by XPath for given dataspace and anchor.
      *
@@ -78,7 +90,6 @@ public interface CpsDataPersistenceService {
     DataNode getDataNode(String dataspaceName, String anchorName, String xpath,
         FetchDescendantsOption fetchDescendantsOption);
 
-
     /**
      * Updates leaves for existing data node.
      *
@@ -87,7 +98,7 @@ public interface CpsDataPersistenceService {
      * @param xpath         xpath
      * @param leaves        the leaves as a map where key is a leaf name and a value is a leaf value
      */
-    void updateDataLeaves(String dataspaceName, String anchorName, String xpath, Map<String, Object> leaves);
+    void updateDataLeaves(String dataspaceName, String anchorName, String xpath, Map<String, Serializable> leaves);
 
     /**
      * Replaces an existing data node's content including descendants.