|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.torque.generator.source.transform.SourceTargetAttributeTransformer
public abstract class SourceTargetAttributeTransformer
A transformer which has a source attribute and a target attribute.
Constructor Summary | |
---|---|
SourceTargetAttributeTransformer()
Standard constructor. |
|
SourceTargetAttributeTransformer(String sourceAttributeName,
String targetAttributeName)
Constructor used to set default attribute names. |
Method Summary | |
---|---|
String |
getSourceAttributeName()
Returns the name of the attribute which is read as Input. |
String |
getTargetAttributeName()
Returns the name of the attribute into which the result is stored. |
boolean |
isOverwrite()
Returns whether the content of the target attribute is overwritten if it exists. |
void |
setOverwrite(boolean overwrite)
Sets whether the content of the target attribute should be overwritten if it exists. |
void |
setSourceAttributeName(String sourceAttributeName)
Sets the name of the attribute which is read as Input. |
void |
setTargetAttributeName(String targetAttributeName)
Sets the name of the attribute into which the result is stored. |
abstract SourceElement |
transform(SourceElement toTransformRoot,
ControllerState controllerState)
Performs the transformation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceTargetAttributeTransformer()
public SourceTargetAttributeTransformer(String sourceAttributeName, String targetAttributeName)
sourceAttributeName
- the default sourceAttributeName.targetAttributeName
- the default targetAttributeName.Method Detail |
---|
public String getSourceAttributeName()
public void setSourceAttributeName(String sourceAttributeName)
sourceAttributeName
- the name of the attribute which is read
as Input, not null.
NullPointerException
- if sourceAttributeName is null.public String getTargetAttributeName()
public void setTargetAttributeName(String targetAttributeName)
targetAttributeName
- the name of the attribute into which
the result is stored, not null.
NullPointerException
- if targetAttributeName is null.public boolean isOverwrite()
public void setOverwrite(boolean overwrite)
overwrite
- true if the target is overwritten, false if it is
only filled when not set.public abstract SourceElement transform(SourceElement toTransformRoot, ControllerState controllerState) throws SourceTransformerException
transform
in interface SourceTransformer
toTransformRoot
- the root element of the source tree
to transform, not null.controllerState
- the state of the controller, not null.
SourceTransformerException
- if the source cannot be transformed.SourceTransformer.transform(SourceElement, ControllerState)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |