org.springframework.data.graph.neo4j.fieldaccess
Class DetachedEntityState<ENTITY extends GraphBacked<STATE>,STATE>
java.lang.Object
org.springframework.data.graph.neo4j.fieldaccess.DetachedEntityState<ENTITY,STATE>
- All Implemented Interfaces:
- EntityState<ENTITY,STATE>
public class DetachedEntityState<ENTITY extends GraphBacked<STATE>,STATE>
- extends Object
- implements EntityState<ENTITY,STATE>
- Since:
- 15.09.2010
- Author:
- Michael Hunger
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
delegate
protected final EntityState<ENTITY extends GraphBacked<STATE>,STATE> delegate
DetachedEntityState
public DetachedEntityState(EntityState<ENTITY,STATE> delegate,
GraphDatabaseContext graphDatabaseContext)
isWritable
public boolean isWritable(Field field)
- Specified by:
isWritable
in interface EntityState<ENTITY extends GraphBacked<STATE>,STATE>
- Returns:
- true if the field can be written
getEntity
public ENTITY getEntity()
- Specified by:
getEntity
in interface EntityState<ENTITY extends GraphBacked<STATE>,STATE>
hasPersistentState
public boolean hasPersistentState()
- Specified by:
hasPersistentState
in interface EntityState<ENTITY extends GraphBacked<STATE>,STATE>
getPersistentState
public STATE getPersistentState()
- Specified by:
getPersistentState
in interface EntityState<ENTITY extends GraphBacked<STATE>,STATE>
getValue
public Object getValue(Field field)
- Specified by:
getValue
in interface EntityState<ENTITY extends GraphBacked<STATE>,STATE>
- Returns:
- value of the field either from the state and/or the entity
isDetached
protected boolean isDetached()
transactionIsRunning
protected boolean transactionIsRunning()
setValue
public Object setValue(Field field,
Object newVal)
- Specified by:
setValue
in interface EntityState<ENTITY extends GraphBacked<STATE>,STATE>
- Returns:
- sets the value in the entity and/or the state
createAndAssignState
public void createAndAssignState()
- Description copied from interface:
EntityState
- callback for creating and initializing an initial state
TODO will be internal implementation detail of persist
- Specified by:
createAndAssignState
in interface EntityState<ENTITY extends GraphBacked<STATE>,STATE>
setPersistentState
public void setPersistentState(STATE state)
- Specified by:
setPersistentState
in interface EntityState<ENTITY extends GraphBacked<STATE>,STATE>
getGraphDatabaseContext
public GraphDatabaseContext getGraphDatabaseContext()
persist
public ENTITY persist()
- Specified by:
persist
in interface EntityState<ENTITY extends GraphBacked<STATE>,STATE>
Copyright © 2011. All Rights Reserved.