Spring Data Graph

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


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface GraphTraversal

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<? extends NodeBacked> elementClass
           
 String[] params
           
 Class<? extends FieldTraversalDescriptionBuilder> traversalBuilder
           
 

traversalBuilder

public abstract Class<? extends FieldTraversalDescriptionBuilder> traversalBuilder
Returns:
Builder for the TraversalDescription to be applied
Default:
org.springframework.data.neo4j.core.FieldTraversalDescriptionBuilder.class

elementClass

public abstract Class<? extends NodeBacked> elementClass
Returns:
target graph entity to be iterated over.
Default:
org.springframework.data.neo4j.core.NodeBacked.class

params

public abstract String[] params
Returns:
parameters that are passed to the @see FieldTraversalDescriptionBuilder#build
Default:
{}

Spring Data Graph

Copyright © 2011 SpringSource. All Rights Reserved.