The CypherResult returns cypher-results including nodes and rels as an iterator of maps.
Btw. you should use parameters instead of string concatenation for the id:
RestAPI restAPI = new RestAPIFacade("http://localhost:7474/db/data","","");
...
Map<String, Object> params = new HashMap<String, Object>();
params.put("id",id);
CypherResult theResult = restAPI.query("MATCH (User:User) WHERE User.userid = {id} RETURN User", params);
for (Node user : theResult.to(Node.class)) {
}
The to()
method also takes converters that can create your result objects.
In general I advise to use the JDBC driver instead of Java-Rest-Binding though.