public class EntityFieldsCopyTransformer<T,F> extends Object implements ContextAware<List<T>>, org.apache.commons.collections.Transformer
Iterable
of 2 objects FROM and a Collection of TO).CloneCollection
Modifier and Type | Field and Description |
---|---|
protected Object |
exceptions
List or Map of Field to its fields that are included or excluded depending on the
inverseMode To support complex nested exceptions, the Map is recursive in nature for each nested field. |
protected boolean |
inverseMode
By default, the exceptions are the fields in the entity that are EXCLUDED.
In inverseMode , the exceptions list are the only ones included in the copy. |
Constructor and Description |
---|
EntityFieldsCopyTransformer() |
Modifier and Type | Method and Description |
---|---|
protected Object |
copy(Object inputEntity,
Object outputEntity,
Object exceptions) |
Object |
getExceptions()
List or Map of Field to its fields that are included or excluded depending on the
inverseMode To support complex nested exceptions, the Map is recursive in nature for each nested field. |
boolean |
isInverseMode()
By default, the exceptions are the fields in the entity that are EXCLUDED.
In inverseMode , the exceptions list are the only ones included in the copy. |
void |
setExceptions(Object exceptions)
List or Map of Field to its fields that are included or excluded depending on the
inverseMode To support complex nested exceptions, the Map is recursive in nature for each nested field. |
void |
setInverseMode(boolean inverseMode)
By default, the exceptions are the fields in the entity that are EXCLUDED.
In inverseMode , the exceptions list are the only ones included in the copy. |
Object |
transform(Object input) |
protected boolean inverseMode
inverseMode
, the exceptions list are the only ones included in the copy.protected Object exceptions
inverseMode
inverseMode
, it looks for the name of the field in the Map to follow. In the opposite mode the key represents to follow an exclude or null key to complete exclude.protected Object copy(Object inputEntity, Object outputEntity, Object exceptions) throws Exception
Exception
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public boolean isInverseMode()
inverseMode
, the exceptions list are the only ones included in the copy.public void setInverseMode(boolean inverseMode)
inverseMode
, the exceptions list are the only ones included in the copy.public Object getExceptions()
inverseMode
inverseMode
, it looks for the name of the field in the Map to follow. In the opposite mode the key represents to follow an exclude or null key to complete exclude.public void setExceptions(Object exceptions)
inverseMode
inverseMode
, it looks for the name of the field in the Map to follow. In the opposite mode the key represents to follow an exclude or null key to complete exclude.Copyright © 2018. All rights reserved.