Spring Data Neo4j

org.springframework.data.neo4j.annotation
Annotation Type Query


@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
public @interface Query

Field that provides access to an iterator which is created by applying the traversal that is built by the supplied traversal builder to the current node. The result elements are automatically converted to appropriate element entity class instances.

 @GraphTraversal(traversalBuilder=FriendTraversalBuilder.class, elementClass=Person.class)
 Iterable<Person> friends;
 

Since:
15.09.2010
Author:
Michael Hunger

Optional Element Summary
 Class<?> elementClass
           
 String[] params
           
 QueryType type
           
 String value
           
 

value

public abstract String value
Returns:
Query to be executed {self} will be provided by the node-id of the current entity other parameters (e.g. {name}) by the given named params
Default:
""

elementClass

public abstract Class<?> elementClass
Returns:
target type to convert the single result column (if any) to.
Default:
java.lang.Object.class

params

public abstract String[] params
Returns:
tuple list of parameters that are replaced in the to the @see query-string {"name", value}
Default:
{}

type

public abstract QueryType type
Default:
org.springframework.data.neo4j.annotation.QueryType.Cypher

Spring Data Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.