From e18a523f4fc8075dc5022871fa96ca8754c2c979 Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Wed, 14 Dec 2022 16:57:00 +0000 Subject: Refactor instanceId as primary key in JpaAutomationComposition Issue-ID: POLICY-4480 Change-Id: I4d3bd44c23378b428beb901d78ea48dcdbbe7f44 Signed-off-by: FrancescoFioraEst --- .../instantiation/AutomationCompositionInstantiationProvider.java | 6 +++--- .../policy/clamp/acm/runtime/main/rest/InstantiationController.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime-acm/src/main/java/org/onap') diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java index 374c94f5d..b723dba7f 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java @@ -201,10 +201,10 @@ public class AutomationCompositionInstantiationProvider { * @return the automation compositions */ @Transactional(readOnly = true) - public AutomationCompositions getAutomationCompositions(String name, String version) { + public AutomationCompositions getAutomationCompositions(UUID compositionId, String name, String version) { var automationCompositions = new AutomationCompositions(); - automationCompositions - .setAutomationCompositionList(automationCompositionProvider.getAutomationCompositions(name, version)); + automationCompositions.setAutomationCompositionList( + automationCompositionProvider.getAutomationCompositions(compositionId, name, version)); return automationCompositions; } diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/InstantiationController.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/InstantiationController.java index 92651bc91..e44fbc5ed 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/InstantiationController.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/InstantiationController.java @@ -90,7 +90,7 @@ public class InstantiationController extends AbstractRestController implements A public ResponseEntity queryCompositionInstances(UUID compositionId, String name, String version, UUID requestId) { - return ResponseEntity.ok().body(provider.getAutomationCompositions(name, version)); + return ResponseEntity.ok().body(provider.getAutomationCompositions(compositionId, name, version)); } /** -- cgit 1.2.3-korg