Spring Data Neo4j

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


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

Annotation for NodeEntity fields that relate to other entities via relationships. The fields represent read only iterators that provide the relationship-entities org.springframework.persistence.RelatedEntity of the relationships. The iterator reflects the underlying relationships.

 @RelatedToVia([type="roles"], elementClass=Role.class)
 Iterator<Role> roles;
 

Since:
27.08.2010
Author:
Michael Hunger

Optional Element Summary
 org.neo4j.graphdb.Direction direction
           
 Class<?> elementClass
           
 String type
           
 

type

public abstract String type
Returns:
name of the relationship type, optional, can be inferred from the field name
Default:
""

direction

public abstract org.neo4j.graphdb.Direction direction
Returns:
direction for the relationship, by default outgoing
Default:
org.neo4j.graphdb.Direction.OUTGOING

elementClass

public abstract Class<?> elementClass
Returns:
target relationship entity class
Default:
java.lang.Object.class

Spring Data Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.