E - as type of EntityV - as type of value to be set in the entity by the mapperpublic class SetEntityFieldMapperBehavior<E,V> extends ModeAwareMapperBehavior
AbstractEntityTransformer#setEntity() and similar use cases.AbstractEntityTransformer.init(),
AbstractEntityTransformer#setEntity()| Constructor and Description |
|---|
SetEntityFieldMapperBehavior() |
SetEntityFieldMapperBehavior(List<Mode> modesSupported) |
| Modifier and Type | Method and Description |
|---|---|
Predicate<V> |
getPredicate()
If the
Predicate.test(Object) is true then #process should be calledIf null will only process if value passed to this is not null. |
EntityFieldSetter<E,V> |
getProcessor()
Takes in the main Entity type of the transformation process and initializes whatever fields are require and then sets it
|
void |
setEntity(E entity,
String fieldName,
V value) |
void |
setPredicate(Predicate<V> predicate)
If the
Predicate.test(Object) is true then #process should be calledIf null will only process if value passed to this is not null. |
void |
setProcessor(EntityFieldSetter<E,V> processor)
Takes in the main Entity type of the transformation process and initializes whatever fields are require and then sets it
|
getMode, getModesSupported, invokeMapper, setMode, setModesSupportedpublic void setEntity(E entity, String fieldName, V value) throws Exception
entity - as The entity to process or initialize for the field-value we want to set in it.fieldName - as String, to set the value in the Entity for this fieldvalue - as the value to set once processing is done.Exceptionpublic EntityFieldSetter<E,V> getProcessor()
public void setProcessor(EntityFieldSetter<E,V> processor)
public Predicate<V> getPredicate()
Predicate.test(Object) is true then #process should be calledpublic void setPredicate(Predicate<V> predicate)
Predicate.test(Object) is true then #process should be calledCopyright © 2018. All rights reserved.