|
||||||||||
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 org.apache.torque.generator.source.transform.BeanPropertyMethodNameTransformer
public class BeanPropertyMethodNameTransformer
Converts a source element Attribute such that it can be used as method name. The base of the method name is the attribute content, with special characters removed and case corrected where necessary. Optionally, a prefix and/or suffix can be added. The result is stored into another attribute of the same source element.
Constructor Summary | |
---|---|
BeanPropertyMethodNameTransformer()
Constructor. |
Method Summary | |
---|---|
String |
getSuffix()
Returns the suffix which is added after the input string. |
String |
getTargetNamePrefix()
Returns the prefix which is added in front of the input string. |
void |
setPrefix(String prefix)
Sets the prefix which is added in front of the input string. |
void |
setSuffix(String suffix)
Sets the suffix which is added after of the input string. |
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 |
---|
public BeanPropertyMethodNameTransformer()
Method Detail |
---|
public String getTargetNamePrefix()
public void setPrefix(String prefix)
prefix
- the prefix for the result, not null.
NullPointerException
- if prefix is null.public String getSuffix()
public void setSuffix(String suffix)
prefix
- the suffix for the result, not null.
NullPointerException
- if suffix is null.public SourceElement transform(SourceElement sourceElement, ControllerState controllerState)
transform
in interface SourceTransformer
transform
in class SourceTargetAttributeTransformer
sourceElement
- the source element to modify, not null.controllerState
- the controller state.
IllegalStateException
- if targetAttributeName was not set.SourceTransformer.transform(SourceElement, ControllerState)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |