ENTITY - as type of entity this will instantiatepublic class SubTypeInitMapperTransformer<ENTITY> extends Object implements org.apache.commons.collections.Transformer
AbstractEntityTransformers like QueryResultArrayToEntityTransformer; can use polymorphic instances like Size
for AbstractEntityTransformer.setNestedObjectInitMap(java.util.Map).| Constructor and Description |
|---|
SubTypeInitMapperTransformer() |
| Modifier and Type | Method and Description |
|---|---|
protected ENTITY |
instantiate(String filedName,
Object fieldValue)
Default implementation will return the fieldValue.
This is because in many cases like JPA, the sub-type maybe instantiated already if it has a value. |
Object |
transform(Object input) |
public Object transform(Object input)
transform in interface org.apache.commons.collections.Transformerprotected ENTITY instantiate(String filedName, Object fieldValue)
filedName - as StringfieldValue - as Object (Default case expected ENTITY type)Copyright © 2018. All rights reserved.