summaryrefslogtreecommitdiffstats
path: root/catalog-dao/src
diff options
context:
space:
mode:
authorWojciech Sliwka <wojciech.sliwka@nokia.com>2019-06-28 09:20:55 +0200
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-07-07 08:22:38 +0000
commit958a87de8f3c19ce51d969047f750692da2ba833 (patch)
tree63d9b5f2934c2e6e44022aa2a6fc7fb3875da799 /catalog-dao/src
parentbf2ffad5b686eb0ffddbeeeca5824b8caea0c8ff (diff)
Remove field injection in catalog-dao
Change-Id: I96ac13d3b50737518924a3aaa9b320adbba241eb Issue-ID: SDC-2398 Signed-off-by: Wojciech Sliwka <wojciech.sliwka@nokia.com>
Diffstat (limited to 'catalog-dao/src')
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/config/JanusGraphSpringConfig.java4
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/janusgraph/HealingJanusGraphGenericDao.java5
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/HealingJanusGraphDao.java6
3 files changed, 8 insertions, 7 deletions
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