Spring Data Neo4j

org.springframework.data.neo4j.core
Interface EntityState<STATE>

All Known Implementing Classes:
CrossStoreNodeEntityState, DefaultEntityState, DetachedEntityState, NodeEntityState, RelationshipEntityState

public interface EntityState<STATE>

Interface for classes encapsulating and delegating read and write field access of an GraphBacked entity to a number of field accessors. Wraps the entity, the underlying state and also handles the creation of the state (call back).

Since:
15.09.2010
Author:
Michael Hunger

Method Summary
 void createAndAssignState()
          Deprecated. 
 Object getDefaultImplementation(Field field)
           
 Object getEntity()
           
 Neo4jPersistentEntity<?> getPersistentEntity()
           
 STATE getPersistentState()
           
 Object getValue(Field field)
           
 boolean hasPersistentState()
           
 boolean isWritable(Field field)
           
 Object persist()
           
 void setPersistentState(STATE state)
           
 Object setValue(Field field, Object newVal)
           
 Object setValue(Neo4jPersistentProperty property, Object newVal)
           
 

Method Detail

getEntity

Object getEntity()

setPersistentState

void setPersistentState(STATE state)

getDefaultImplementation

Object getDefaultImplementation(Field field)
Parameters:
field - field of the entity class
Returns:
a default value for the given field by its FieldAccessor or null if none is provided.

getValue

Object getValue(Field field)
Parameters:
field -
Returns:
value of the field either from the state and/or the entity

isWritable

boolean isWritable(Field field)
Parameters:
field -
Returns:
true if the field can be written

setValue

Object setValue(Field field,
                Object newVal)
Parameters:
field -
newVal -
Returns:
sets the value in the entity and/or the state

setValue

Object setValue(Neo4jPersistentProperty property,
                Object newVal)

createAndAssignState

@Deprecated
void createAndAssignState()
Deprecated. 

callback for creating and initializing an initial state TODO will be internal implementation detail of persist


hasPersistentState

boolean hasPersistentState()

getPersistentState

STATE getPersistentState()

persist

Object persist()

getPersistentEntity

Neo4jPersistentEntity<?> getPersistentEntity()

Spring Data Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.