org.springframework.data.neo4j.fieldaccess
Class DetachedEntityState<STATE>
java.lang.Object
org.springframework.data.neo4j.fieldaccess.DetachedEntityState<STATE>
- All Implemented Interfaces:
- EntityState<STATE>
public class DetachedEntityState<STATE>
- extends Object
- implements EntityState<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<STATE> delegate
DetachedEntityState
public DetachedEntityState(EntityState<STATE> delegate,
Neo4jTemplate template)
isWritable
public boolean isWritable(Neo4jPersistentProperty property)
- Specified by:
isWritable
in interface EntityState<STATE>
getEntity
public Object getEntity()
- Specified by:
getEntity
in interface EntityState<STATE>
hasPersistentState
public boolean hasPersistentState()
- Specified by:
hasPersistentState
in interface EntityState<STATE>
getPersistentState
public STATE getPersistentState()
- Specified by:
getPersistentState
in interface EntityState<STATE>
getPersistentEntity
public Neo4jPersistentEntity<?> getPersistentEntity()
- Specified by:
getPersistentEntity
in interface EntityState<STATE>
getValue
public Object getValue(Neo4jPersistentProperty property,
MappingPolicy mappingPolicy)
- Specified by:
getValue
in interface EntityState<STATE>
- Returns:
- value of the property either from the state and/or the entity
getValue
public Object getValue(Field field,
MappingPolicy mappingPolicy)
- Specified by:
getValue
in interface EntityState<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,
MappingPolicy mappingPolicy)
- Specified by:
setValue
in interface EntityState<STATE>
- Returns:
- sets the value in the entity and/or the state
setValue
public Object setValue(Neo4jPersistentProperty property,
Object newVal,
MappingPolicy mappingPolicy)
- Specified by:
setValue
in interface EntityState<STATE>
getDefaultValue
public Object getDefaultValue(Neo4jPersistentProperty property)
- Specified by:
getDefaultValue
in interface EntityState<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<STATE>
setPersistentState
public void setPersistentState(STATE state)
- Specified by:
setPersistentState
in interface EntityState<STATE>
getTemplate
public Neo4jTemplate getTemplate()
persist
public Object persist()
- Specified by:
persist
in interface EntityState<STATE>
Copyright © 2011 SpringSource. All Rights Reserved.