public abstract class DefaultEntityState<STATE> extends Object implements EntityState<STATE>
Modifier and Type | Field and Description |
---|---|
protected Object |
entity |
protected static org.slf4j.Logger |
log |
protected Neo4jPersistentEntity<?> |
persistentEntity |
protected Class<?> |
type |
Constructor and Description |
---|
DefaultEntityState(STATE underlyingState,
Object entity,
Class<?> type,
DelegatingFieldAccessorFactory delegatingFieldAccessorFactory,
Neo4jPersistentEntity<?> persistentEntity) |
Modifier and Type | Method and Description |
---|---|
protected FieldAccessor |
accessorFor(Neo4jPersistentProperty property) |
abstract void |
createAndAssignState()
callback for creating and initializing an initial state
TODO will be internal implementation detail of persist
|
Object |
getDefaultValue(Neo4jPersistentProperty property) |
Object |
getEntity() |
protected Object |
getIdFromEntity() |
Neo4jPersistentEntity<?> |
getPersistentEntity() |
STATE |
getPersistentState() |
Object |
getValue(Field field,
MappingPolicy mappingPolicy) |
Object |
getValue(Neo4jPersistentProperty property,
MappingPolicy mappingPolicy) |
boolean |
hasPersistentState() |
boolean |
isWritable(Neo4jPersistentProperty property) |
protected Neo4jPersistentProperty |
property(Field field) |
void |
setPersistentState(STATE state) |
Object |
setValue(Field field,
Object newVal,
MappingPolicy mappingPolicy) |
Object |
setValue(Neo4jPersistentProperty property,
Object newVal,
MappingPolicy mappingPolicy) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
persist
protected final Object entity
protected final Class<?> type
protected static final org.slf4j.Logger log
protected final Neo4jPersistentEntity<?> persistentEntity
public DefaultEntityState(STATE underlyingState, Object entity, Class<?> type, DelegatingFieldAccessorFactory delegatingFieldAccessorFactory, Neo4jPersistentEntity<?> persistentEntity)
public abstract void createAndAssignState()
EntityState
createAndAssignState
in interface EntityState<STATE>
public Object getEntity()
getEntity
in interface EntityState<STATE>
public void setPersistentState(STATE state)
setPersistentState
in interface EntityState<STATE>
public boolean hasPersistentState()
hasPersistentState
in interface EntityState<STATE>
public STATE getPersistentState()
getPersistentState
in interface EntityState<STATE>
public Neo4jPersistentEntity<?> getPersistentEntity()
getPersistentEntity
in interface EntityState<STATE>
public boolean isWritable(Neo4jPersistentProperty property)
isWritable
in interface EntityState<STATE>
public Object getValue(Neo4jPersistentProperty property, MappingPolicy mappingPolicy)
getValue
in interface EntityState<STATE>
public Object getValue(Field field, MappingPolicy mappingPolicy)
getValue
in interface EntityState<STATE>
public Object setValue(Field field, Object newVal, MappingPolicy mappingPolicy)
setValue
in interface EntityState<STATE>
public Object setValue(Neo4jPersistentProperty property, Object newVal, MappingPolicy mappingPolicy)
setValue
in interface EntityState<STATE>
public Object getDefaultValue(Neo4jPersistentProperty property)
getDefaultValue
in interface EntityState<STATE>
FieldAccessor
or null
if none is provided.protected Neo4jPersistentProperty property(Field field)
protected FieldAccessor accessorFor(Neo4jPersistentProperty property)
protected Object getIdFromEntity()
Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.