aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/m2/guard/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-05-29 11:59:53 -0400
committerJim Hahn <jrh3@att.com>2020-06-01 11:08:16 -0400
commit1e39c988604c9ffb8efc38ef3cf4d635b202c7b9 (patch)
tree390dc73ef150bb99dcf00577a2838a686baf8c59 /controlloop/m2/guard/src
parentd00b8ebd5b28a64ae988e7424d8feb2314a8d475 (diff)
Use OperationsHistory from models
Deleted Dbao and replaced it with the shared class in policy-models. Also had to update the queries and the persistence.xml accordingly. Note: with this change, the "database" project is no longer needed, so it was deleted. Issue-ID: POLICY-2581 Change-Id: Idfde68b28b3a27f2ee794fa477d15e0f12717373 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/m2/guard/src')
-rw-r--r--controlloop/m2/guard/src/main/java/org/onap/policy/guard/GuardContext.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/controlloop/m2/guard/src/main/java/org/onap/policy/guard/GuardContext.java b/controlloop/m2/guard/src/main/java/org/onap/policy/guard/GuardContext.java
index d0d1b831f..a0d159150 100644
--- a/controlloop/m2/guard/src/main/java/org/onap/policy/guard/GuardContext.java
+++ b/controlloop/m2/guard/src/main/java/org/onap/policy/guard/GuardContext.java
@@ -28,23 +28,19 @@ import java.util.HashMap;
import java.util.Properties;
import java.util.UUID;
import java.util.function.Supplier;
-
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
-
import org.drools.core.WorkingMemory;
-
-import org.onap.policy.database.operationshistory.Dbao;
import org.onap.policy.drools.controller.DroolsController;
import org.onap.policy.drools.core.PolicyContainer;
import org.onap.policy.drools.core.PolicySession;
import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.system.PolicyControllerConstants;
import org.onap.policy.drools.system.PolicyEngineConstants;
+import org.onap.policy.guard.OperationsHistory;
import org.onap.policy.guard.Util;
import org.onap.policy.util.DroolsSessionCommonSerializable;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -317,7 +313,7 @@ public class GuardContext implements Serializable {
em = createEntityManager();
// create the new DB table entry
- Dbao newEntry = new Dbao();
+ OperationsHistory newEntry = new OperationsHistory();
// populate the new DB table entry
newEntry.setClosedLoopName(closedLoopControlName);