Spring Data Graph

org.springframework.data.neo4j.core
Interface RelationshipBacked

All Superinterfaces:
GraphBacked<org.neo4j.graphdb.Relationship>

public interface RelationshipBacked
extends GraphBacked<org.neo4j.graphdb.Relationship>

concrete interface introduced onto Relationship entities by the Neo4jRelationshipBacking aspect, encapsulates a neo4j relationship as backing state


Method Summary
 Long getRelationshipId()
           
<R extends RelationshipBacked>
R
projectTo(Class<R> targetType)
          Project this relationship entity as another relationship backed type.
 
Methods inherited from interface org.springframework.data.neo4j.core.GraphBacked
getPersistentState, hasPersistentState, remove, setPersistentState
 

Method Detail

getRelationshipId

Long getRelationshipId()
Returns:
the id of the underlying relationship or null if there is none

projectTo

<R extends RelationshipBacked> R projectTo(Class<R> targetType)
Project this relationship entity as another relationship backed type. The same underlying relationship will be used for the new entity.

Parameters:
targetType - type to project to
Returns:
new instance of specified type, sharing the same underlying relationship with this entity

Spring Data Graph

Copyright © 2011 SpringSource. All Rights Reserved.