From 958a87de8f3c19ce51d969047f750692da2ba833 Mon Sep 17 00:00:00 2001 From: Wojciech Sliwka Date: Fri, 28 Jun 2019 09:20:55 +0200 Subject: Remove field injection in catalog-dao Change-Id: I96ac13d3b50737518924a3aaa9b320adbba241eb Issue-ID: SDC-2398 Signed-off-by: Wojciech Sliwka --- .../org/openecomp/sdc/be/dao/config/JanusGraphSpringConfig.java | 4 ++-- .../sdc/be/dao/janusgraph/HealingJanusGraphGenericDao.java | 5 +++-- .../org/openecomp/sdc/be/dao/jsongraph/HealingJanusGraphDao.java | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'catalog-dao') diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/config/JanusGraphSpringConfig.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/config/JanusGraphSpringConfig.java index d30caf1845..eff0ec7be0 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/config/JanusGraphSpringConfig.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/config/JanusGraphSpringConfig.java @@ -23,8 +23,8 @@ public class JanusGraphSpringConfig { @Bean(name = "janusgraph-generic-dao") @Primary - public HealingJanusGraphGenericDao janusGraphGenericDao(@Qualifier("janusgraph-client") JanusGraphClient janusGraphClient) { - return new HealingJanusGraphGenericDao(janusGraphClient); + public HealingJanusGraphGenericDao janusGraphGenericDao(@Qualifier("janusgraph-client") JanusGraphClient janusGraphClient, @Qualifier("healingPipelineDao") HealingPipelineDao healingPipelineDao) { + return new HealingJanusGraphGenericDao(healingPipelineDao, janusGraphClient); } @Bean(name = "janusgraph-client", initMethod = "createGraph") diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/janusgraph/HealingJanusGraphGenericDao.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/janusgraph/HealingJanusGraphGenericDao.java index f8ab531f04..1b643ffa75 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/janusgraph/HealingJanusGraphGenericDao.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/janusgraph/HealingJanusGraphGenericDao.java @@ -36,11 +36,12 @@ import org.springframework.stereotype.Component; @Component("janusgraph-generic-dao") public class HealingJanusGraphGenericDao extends JanusGraphGenericDao { - @Autowired private HealingPipelineDao healingPipelineDao; - public HealingJanusGraphGenericDao(JanusGraphClient janusGraphClient) { + @Autowired + public HealingJanusGraphGenericDao(HealingPipelineDao healingPipelineDao, JanusGraphClient janusGraphClient) { super(janusGraphClient); + this.healingPipelineDao = healingPipelineDao; } @Override diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/HealingJanusGraphDao.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/HealingJanusGraphDao.java index c2ef659c65..90c0d9157a 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/HealingJanusGraphDao.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/HealingJanusGraphDao.java @@ -31,13 +31,13 @@ import org.springframework.stereotype.Component; @Component("janusgraph-dao") public class HealingJanusGraphDao extends JanusGraphDao { - - @Autowired private HealingPipelineDao healingPipelineDao; - public HealingJanusGraphDao(JanusGraphClient janusGraphClient) { + @Autowired + public HealingJanusGraphDao(HealingPipelineDao healingPipelineDao, JanusGraphClient janusGraphClient) { super(janusGraphClient); + this.healingPipelineDao = healingPipelineDao; } @Override -- cgit 1.2.3-korg