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 getDefaultValue(Neo4jPersistentProperty property)
           
 Object getEntity()
           
 Neo4jPersistentEntity<?> getPersistentEntity()
           
 STATE getPersistentState()
           
 Object getValue(Field field, MappingPolicy mappingPolicy)
           
 Object getValue(Neo4jPersistentProperty property, MappingPolicy mappingPolicy)
           
 boolean hasPersistentState()
           
 boolean isWritable(Neo4jPersistentProperty property)
           
 Object persist()
           
 void setPersistentState(STATE state)
           
 Object setValue(Field field, Object newVal, MappingPolicy mappingPolicy)
           
 Object setValue(Neo4jPersistentProperty property, Object newVal, MappingPolicy mappingPolicy)
           
 

Method Detail

getEntity

Object getEntity()

setPersistentState

void setPersistentState(STATE state)

getDefaultValue

Object getDefaultValue(Neo4jPersistentProperty property)
Returns:
a default value for the given field by its FieldAccessor or null if none is provided.

getValue

Object getValue(Field field,
                MappingPolicy mappingPolicy)
Returns:
value of the field either from the state and/or the entity

getValue

Object getValue(Neo4jPersistentProperty property,
                MappingPolicy mappingPolicy)
Returns:
value of the property either from the state and/or the entity

isWritable

boolean isWritable(Neo4jPersistentProperty property)
Returns:
true if the field can be written

setValue

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

setValue

Object setValue(Neo4jPersistentProperty property,
                Object newVal,
                MappingPolicy mappingPolicy)

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 © 2013 SpringSource. All Rights Reserved.