DATAGRAPH-393 Use supplied RestGraphDatabase as GraphDatabase in MappingInfrastructure

This commit is contained in:
Michael Hunger
2013-09-24 14:19:41 +02:00
parent d6b6a11e9c
commit f430b448b8

View File

@@ -107,6 +107,9 @@ public class MappingInfrastructureFactoryBean implements FactoryBean<Infrastruct
if (this.graphDatabaseService == null && graphDatabase instanceof DelegatingGraphDatabase) {
this.graphDatabaseService = ((DelegatingGraphDatabase) graphDatabase).getGraphDatabaseService();
}
if (this.graphDatabase == null && graphDatabaseService instanceof GraphDatabase) {
this.graphDatabase = (GraphDatabase)graphDatabaseService;
}
if (this.graphDatabase == null) {
this.graphDatabase = new DelegatingGraphDatabase(graphDatabaseService);
}