Spring Data Neo4j

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


@Retention(value=RUNTIME)
@Target(value=TYPE)
@Inherited
public @interface RelationshipEntity

Annotation to declare a Pojo-Entity as graph backed relationship entity. It is used by the org.springframework.data.neo4j.support.relationship.Neo4jRelationshipBacking aspect to add field advices as well as the org.springframework.data.neo4j.core.RelationshipBacked interface. Relationship entities cannot be instantiated directly. The will be provided by relationship fields and the methods relatedTo and getRelationshipTo introduced to the node entities.

Since:
27.08.2010
Author:
Michael Hunger

Optional Element Summary
 String type
           
 boolean useShortNames
           
 

useShortNames

public abstract boolean useShortNames
Returns:
true if the property names default to field names, otherwise the FQN of the class will be prepended
Default:
true

type

public abstract String type
Returns:
the relationship-type of this entity will be used if no other type is provided, either as field inside the relationship-entity or via an annotation in the node-entity, this type will take precedence over node-entity # field names.
Default:
""

Spring Data Neo4j

Copyright © 2012 SpringSource. All Rights Reserved.