org.apache.torque.generator.source.transform
Class CopyAttributeTransformer

java.lang.Object
  extended by org.apache.torque.generator.source.transform.SourceTargetAttributeTransformer
      extended by 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 1331190 2012-04-27 02:41:35Z tfischer $


Constructor Summary
CopyAttributeTransformer()
           
 
Method Summary
 SourceElement transform(SourceElement sourceElement, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyAttributeTransformer

public CopyAttributeTransformer()
Method Detail

transform

public SourceElement transform(SourceElement sourceElement,
                               ControllerState controllerState)
Fills the target attribute according to the settings.

Specified by:
transform in interface SourceTransformer
Specified by:
transform in class SourceTargetAttributeTransformer
Parameters:
sourceElement - the source element to modify, not null.
controllerState - the controller state.
Returns:
the modified source element, not null.
Throws:
IllegalStateException - if sourceAttributeName or targetAttributeName was not set.
See Also:
SourceTransformer.transform(SourceElement, ControllerState)


Copyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.