From 06499b21fb3a2842d1bbae3eb790c93ea6c9272a Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Fri, 19 Nov 2021 15:59:54 +0000 Subject: Add support transaction Add support transaction in CommissioningProvider and ControlLoopInstantiationProvider Issue-ID: POLICY-3802 Change-Id: I8ddba4814547e335b7b27342189a3fc5d9dc4582 Signed-off-by: FrancescoFioraEst --- .../persistence/provider/ClElementStatisticsProvider.java | 4 ++-- .../controlloop/persistence/provider/ControlLoopProvider.java | 4 ++-- .../controlloop/persistence/provider/ParticipantProvider.java | 4 ++-- .../persistence/provider/ParticipantStatisticsProvider.java | 4 ++-- .../controlloop/persistence/provider/ServiceTemplateProvider.java | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'models/src/main/java') diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProvider.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProvider.java index 867c34aad..3a7fa9c87 100644 --- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProvider.java +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProvider.java @@ -33,7 +33,7 @@ import org.onap.policy.clamp.controlloop.models.controlloop.persistence.reposito import org.onap.policy.models.base.PfModelException; import org.onap.policy.models.base.PfReferenceTimestampKey; import org.onap.policy.models.dao.PfFilterParameters; -import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** @@ -41,7 +41,7 @@ import org.springframework.transaction.annotation.Transactional; * * @author Ramesh Murugan Iyer (ramesh.murugan.iyer@est.tech) */ -@Component +@Service @Transactional @AllArgsConstructor public class ClElementStatisticsProvider { diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProvider.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProvider.java index 7b6787c5d..a1b1045eb 100644 --- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProvider.java +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProvider.java @@ -44,13 +44,13 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; import org.onap.policy.models.tosca.authorative.concepts.ToscaTypedEntityFilter; import org.onap.policy.models.tosca.simple.concepts.JpaToscaNodeTemplate; import org.onap.policy.models.tosca.simple.concepts.JpaToscaNodeTemplates; -import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * This class provides information on control loop concepts in the database to callers. */ -@Component +@Service @Transactional @AllArgsConstructor public class ControlLoopProvider { diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantProvider.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantProvider.java index 2a6f21c07..0c001c11c 100644 --- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantProvider.java +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantProvider.java @@ -32,15 +32,15 @@ import org.onap.policy.models.base.PfConceptKey; import org.onap.policy.models.base.PfModelException; import org.onap.policy.models.base.PfModelRuntimeException; import org.onap.policy.models.tosca.authorative.concepts.ToscaTypedEntityFilter; -import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * This class provides information on participant concepts in the database to callers. */ +@Service @Transactional @AllArgsConstructor -@Component public class ParticipantProvider { private ParticipantRepository participantRepository; diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProvider.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProvider.java index 811412205..bb4f3a5dd 100644 --- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProvider.java +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProvider.java @@ -33,13 +33,13 @@ import org.onap.policy.clamp.controlloop.models.controlloop.persistence.reposito import org.onap.policy.models.base.PfModelException; import org.onap.policy.models.base.PfTimestampKey; import org.onap.policy.models.dao.PfFilterParameters; -import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * This class provides the provision of information on participant statistics in the database to callers. */ -@Component +@Service @Transactional @AllArgsConstructor public class ParticipantStatisticsProvider { diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ServiceTemplateProvider.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ServiceTemplateProvider.java index 6b3749fc5..8ff0dd102 100644 --- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ServiceTemplateProvider.java +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ServiceTemplateProvider.java @@ -34,12 +34,12 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaNodeType; import org.onap.policy.models.tosca.authorative.concepts.ToscaProperty; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; import org.onap.policy.models.tosca.simple.concepts.JpaToscaServiceTemplate; -import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -@Component -@RequiredArgsConstructor +@Service @Transactional +@RequiredArgsConstructor public class ServiceTemplateProvider { private final ToscaServiceTemplateRepository serviceTemplateRepository; -- cgit 1.2.3-korg