Klasse BeanPropertyMethodNameTransformer
java.lang.Object
org.apache.torque.generator.source.transform.SourceTargetAttributeTransformer
org.apache.torque.generator.source.transform.BeanPropertyMethodNameTransformer
- Alle implementierten Schnittstellen:
SourceTransformer
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.
- Version:
- $Id: BeanPropertyMethodNameTransformer.java 1855923 2019-03-20 16:19:39Z gk $
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the suffix which is added after the input string.Returns the prefix which is added in front of the input string.void
Sets the prefix which is added in front of the input string.void
Sets the suffix which is added after of the input string.transform
(Object rootObject, ControllerState controllerState) Fills the target attribute according to the settings.Von Klasse geerbte Methoden org.apache.torque.generator.source.transform.SourceTargetAttributeTransformer
getSourceAttributeName, getTargetAttributeName, isOverwrite, setOverwrite, setSourceAttributeName, setTargetAttributeName
-
Konstruktordetails
-
BeanPropertyMethodNameTransformer
public BeanPropertyMethodNameTransformer()Constructor.
-
-
Methodendetails
-
getTargetNamePrefix
Returns the prefix which is added in front of the input string.- Gibt zurück:
- the prefix for the result, not null.
-
setPrefix
Sets the prefix which is added in front of the input string.- Parameter:
prefix
- the prefix for the result, not null.- Löst aus:
NullPointerException
- if prefix is null.
-
getSuffix
Returns the suffix which is added after the input string.- Gibt zurück:
- the suffix for the result, not null.
-
setSuffix
Sets the suffix which is added after of the input string.- Parameter:
suffix
- the suffix for the result, not null.- Löst aus:
NullPointerException
- if suffix is null.
-
transform
public SourceElement transform(Object rootObject, ControllerState controllerState) throws SourceTransformerException Fills the target attribute according to the settings.- Angegeben von:
transform
in SchnittstelleSourceTransformer
- Angegeben von:
transform
in KlasseSourceTargetAttributeTransformer
- Parameter:
rootObject
- the root of the source graph, not null.controllerState
- the controller state.- Gibt zurück:
- the modified source element, not null.
- Löst aus:
SourceTransformerException
- if rootObject is not a SourceElement.IllegalStateException
- if targetAttributeName was not set.- Siehe auch:
-