diff --git a/spring-data-graph-parent/pom.xml b/spring-data-graph-parent/pom.xml
index 246ef3e3d..01749384a 100644
--- a/spring-data-graph-parent/pom.xml
+++ b/spring-data-graph-parent/pom.xml
@@ -16,7 +16,7 @@
1.5.10
3.0.5.RELEASE
1.1.0.BUILD-SNAPSHOT
- 1.4.M04
+ 1.4-SNAPSHOT
1.6.12.M1
diff --git a/spring-data-neo4j-rest/pom.xml b/spring-data-neo4j-rest/pom.xml
index 80d362c65..5f027d10f 100644
--- a/spring-data-neo4j-rest/pom.xml
+++ b/spring-data-neo4j-rest/pom.xml
@@ -55,7 +55,7 @@
neo4j
- org.neo4j
+ org.neo4j.server.plugin
neo4j-cypher-plugin
${neo4j.version}
diff --git a/spring-data-neo4j-rest/src/main/java/org/springframework/data/graph/neo4j/rest/support/RestGraphDatabase.java b/spring-data-neo4j-rest/src/main/java/org/springframework/data/graph/neo4j/rest/support/RestGraphDatabase.java
index 4a31442f1..e46a071ad 100644
--- a/spring-data-neo4j-rest/src/main/java/org/springframework/data/graph/neo4j/rest/support/RestGraphDatabase.java
+++ b/spring-data-neo4j-rest/src/main/java/org/springframework/data/graph/neo4j/rest/support/RestGraphDatabase.java
@@ -22,10 +22,13 @@ import org.neo4j.graphdb.event.KernelEventHandler;
import org.neo4j.graphdb.event.TransactionEventHandler;
import org.neo4j.graphdb.index.Index;
import org.neo4j.graphdb.traversal.TraversalDescription;
+import org.springframework.core.convert.ConversionService;
import org.springframework.data.graph.core.GraphDatabase;
import org.springframework.data.graph.core.Property;
import org.springframework.data.graph.neo4j.rest.support.index.RestIndexManager;
+import org.springframework.data.graph.neo4j.support.query.ConversionServiceQueryResultConverter;
import org.springframework.data.graph.neo4j.support.query.QueryEngine;
+import org.springframework.data.graph.neo4j.support.query.QueryResultConverter;
import javax.ws.rs.core.Response.Status;
import java.net.URI;
@@ -35,6 +38,7 @@ public class RestGraphDatabase implements GraphDatabaseService, GraphDatabase {
private RestRequest restRequest;
private long propertyRefetchTimeInMillis = 1000;
+ private ConversionService conversionService;
public RestGraphDatabase( URI uri ) {
@@ -99,7 +103,18 @@ public class RestGraphDatabase implements GraphDatabaseService, GraphDatabase {
@Override
public QueryEngine queryEngineFor(QueryEngine.Type type) {
- return new RestQueryEngine(restRequest);
+ return new RestQueryEngine(this, createResultConverter());
+ }
+
+ private ConversionServiceQueryResultConverter createResultConverter() {
+ if (conversionService==null) return null;
+ return new ConversionServiceQueryResultConverter(conversionService);
+ }
+
+ @Override
+ public void setConversionService(ConversionService conversionService) {
+
+ this.conversionService = conversionService;
}
public RestIndexManager index() {
diff --git a/spring-data-neo4j-rest/src/main/java/org/springframework/data/graph/neo4j/rest/support/RestQueryEngine.java b/spring-data-neo4j-rest/src/main/java/org/springframework/data/graph/neo4j/rest/support/RestQueryEngine.java
new file mode 100644
index 000000000..e76120603
--- /dev/null
+++ b/spring-data-neo4j-rest/src/main/java/org/springframework/data/graph/neo4j/rest/support/RestQueryEngine.java
@@ -0,0 +1,141 @@
+/**
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.data.graph.neo4j.rest.support;
+
+import com.sun.jersey.api.client.ClientResponse;
+import org.neo4j.helpers.collection.IterableWrapper;
+import org.springframework.dao.InvalidDataAccessResourceUsageException;
+import org.springframework.data.graph.neo4j.support.query.QueryEngine;
+import org.springframework.data.graph.neo4j.support.query.QueryResultConverter;
+
+import java.util.*;
+
+/**
+ * @author mh
+ * @since 22.06.11
+ */
+public class RestQueryEngine implements QueryEngine {
+ private final RestRequest restRequest;
+ private final RestGraphDatabase restGraphDatabase;
+ private final QueryResultConverter resultConverter;
+
+ public RestQueryEngine(RestGraphDatabase restGraphDatabase, QueryResultConverter resultConverter) {
+ this.restGraphDatabase = restGraphDatabase;
+ this.resultConverter = resultConverter;
+ this.restRequest = restGraphDatabase.getRestRequest();
+ }
+
+ @Override
+ public Iterable