Spring Data Neo4j

org.springframework.data.neo4j.aspects.core
Interface RelationshipBacked

All Superinterfaces:
GraphBacked<org.neo4j.graphdb.Relationship,RelationshipBacked>, ManagedEntity<org.neo4j.graphdb.Relationship,RelationshipBacked>

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

concrete interface introduced onto Relationship entities by the org.springframework.data.neo4j.support.relationship.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.aspects.core.GraphBacked
getPersistentState, hasPersistentState, remove, setPersistentState
 
Methods inherited from interface org.springframework.data.neo4j.mapping.ManagedEntity
getEntityState, persist
 

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 Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.