From 1e39c988604c9ffb8efc38ef3cf4d635b202c7b9 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 29 May 2020 11:59:53 -0400 Subject: 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 --- .../guard/src/main/java/org/onap/policy/guard/GuardContext.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'controlloop/m2/guard/src/main/java/org/onap') 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); -- cgit 1.2.3-korg