Class CopyAttributeTransformer
java.lang.Object
org.apache.torque.generator.source.transform.SourceTargetAttributeTransformer
org.apache.torque.generator.source.transform.CopyAttributeTransformer
- All Implemented Interfaces:
SourceTransformer
Fills an attribute with the content of another attribute.
It can be configured whether the target attribute is overwritten
if it is not set.
$Id: CopyAttributeTransformer.java 1839288 2018-08-27 09:48:33Z tv $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontransform(Object rootObject, ControllerState controllerState) Fills the target attribute according to the settings.Methods inherited from class org.apache.torque.generator.source.transform.SourceTargetAttributeTransformer
getSourceAttributeName, getTargetAttributeName, isOverwrite, setOverwrite, setSourceAttributeName, setTargetAttributeName
-
Constructor Details
-
CopyAttributeTransformer
public CopyAttributeTransformer()
-
-
Method Details
-
transform
public SourceElement transform(Object rootObject, ControllerState controllerState) throws SourceTransformerException Fills the target attribute according to the settings.- Specified by:
transformin interfaceSourceTransformer- Specified by:
transformin classSourceTargetAttributeTransformer- Parameters:
rootObject- the root of the source graph, not null.controllerState- the controller state.- Returns:
- the modified source element, not null.
- Throws:
SourceTransformerException- if rootObject is not a SourceElement.IllegalStateException- if sourceAttributeName or targetAttributeName was not set.- See Also:
-