org.springframework.data.persistence
Class AbstractConstructorEntityInstantiator<BACKING_INTERFACE,STATE>
java.lang.Object
org.springframework.data.persistence.AbstractConstructorEntityInstantiator<BACKING_INTERFACE,STATE>
- All Implemented Interfaces:
- EntityInstantiator<BACKING_INTERFACE,STATE>
public abstract class AbstractConstructorEntityInstantiator<BACKING_INTERFACE,STATE>
- extends Object
- implements EntityInstantiator<BACKING_INTERFACE,STATE>
Try for a constructor taking state: failing that, try a no-arg constructor and then setUnderlyingNode().
- Author:
- Rod Johnson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractConstructorEntityInstantiator
public AbstractConstructorEntityInstantiator()
createEntityFromState
public <T extends BACKING_INTERFACE> T createEntityFromState(STATE n,
Class<T> c)
- Specified by:
createEntityFromState
in interface EntityInstantiator<BACKING_INTERFACE,STATE>
setInstantiators
public void setInstantiators(Map<Class<? extends BACKING_INTERFACE>,StateBackedCreator<? extends BACKING_INTERFACE,STATE>> instantiators)
createInstantiator
protected <T extends BACKING_INTERFACE> StateBackedCreator<T,STATE> createInstantiator(Class<T> type,
Class<STATE> stateType)
createFailingInstantiator
protected <T extends BACKING_INTERFACE> StateBackedCreator<T,STATE> createFailingInstantiator(Class<STATE> stateType)
getFailingMessageForClass
protected String getFailingMessageForClass(Class<?> entityClass,
Class<STATE> stateClass)
createWithoutConstructorInvocation
protected <T extends BACKING_INTERFACE> StateBackedCreator<T,STATE> createWithoutConstructorInvocation(Class<T> type,
Class<STATE> stateType)
getNoArgConstructor
protected <T extends BACKING_INTERFACE> Constructor<T> getNoArgConstructor(Class<T> type)
stateTakingConstructorInstantiator
protected <T extends BACKING_INTERFACE> StateBackedCreator<T,STATE> stateTakingConstructorInstantiator(Class<T> type,
Class<STATE> stateType)
getDeclaredConstructor
protected <T> Constructor<T> getDeclaredConstructor(Class<T> c)
setState
protected abstract void setState(BACKING_INTERFACE entity,
STATE s)
- Subclasses must implement to set state
- Parameters:
entity
- s
-
Copyright © 2011. All Rights Reserved.