Class CopyAttributeTransformer
- java.lang.Object
-
- org.apache.torque.generator.source.transform.SourceTargetAttributeTransformer
-
- org.apache.torque.generator.source.transform.CopyAttributeTransformer
-
- All Implemented Interfaces:
SourceTransformer
public class CopyAttributeTransformer extends SourceTargetAttributeTransformer
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 Constructor Description CopyAttributeTransformer()
-
Method Summary
Modifier and Type Method Description SourceElement
transform(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
-
-
-
-
Method Detail
-
transform
public SourceElement transform(Object rootObject, ControllerState controllerState) throws SourceTransformerException
Fills the target attribute according to the settings.- Specified by:
transform
in interfaceSourceTransformer
- Specified by:
transform
in 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:
SourceTransformer.transform(Object, ControllerState)
-
-