DATAGRAPH-393 - Use supplied RestGraphDatabase as GraphDatabase in MappingInfrastructure.

This commit is contained in:
Michael Hunger
2013-09-24 14:19:41 +02:00
committed by Oliver Gierke
parent c09a657f0c
commit 4c871b51bf

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);
}