Spring Data Neo4j

org.springframework.data.neo4j.aspects.core
Interface GraphBacked<STATE,ENTITY extends GraphBacked<STATE,ENTITY>>

All Superinterfaces:
ManagedEntity<STATE,ENTITY>
All Known Subinterfaces:
NodeBacked, RelationshipBacked

public interface GraphBacked<STATE,ENTITY extends GraphBacked<STATE,ENTITY>>
extends ManagedEntity<STATE,ENTITY>

super interface denoting entities that are graph backed, the backing STATE can be a Node or a Relationship. Subclasses of this interface bind the type parameter to a concrete Node or Relationship state.

Since:
21.09.2010
Author:
Michael Hunger

Method Summary
 STATE getPersistentState()
           
 boolean hasPersistentState()
           
 void remove()
          removes the entity using @{link Neo4jTemplate.removeNodeEntity} the entity and relationship are still accessible after removal but before transaction commit but all modifications will throw an exception
 void setPersistentState(STATE state)
          internal setter used for initializing the graph-db state on existing or newly created entities
 
Methods inherited from interface org.springframework.data.neo4j.mapping.ManagedEntity
getEntityState, persist
 

Method Detail

setPersistentState

void setPersistentState(STATE state)
internal setter used for initializing the graph-db state on existing or newly created entities

Specified by:
setPersistentState in interface ManagedEntity<STATE,ENTITY extends GraphBacked<STATE,ENTITY>>
Parameters:
state - (Node or Relationship)

getPersistentState

STATE getPersistentState()
Specified by:
getPersistentState in interface ManagedEntity<STATE,ENTITY extends GraphBacked<STATE,ENTITY>>
Returns:
the underlying graph-db state or null if the current entity is not related to the graph-store (possible with unsaved or partial entities)

hasPersistentState

boolean hasPersistentState()

remove

void remove()
removes the entity using @{link Neo4jTemplate.removeNodeEntity} the entity and relationship are still accessible after removal but before transaction commit but all modifications will throw an exception


Spring Data Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.