Klasse GetterSetterNameTransformer
java.lang.Object
org.apache.torque.generator.source.transform.GetterSetterNameTransformer
- Alle implementierten Schnittstellen:
SourceTransformer
Takes a property name as input from a source element attribute
and generates a getter and a setter name from it.
- Version:
- $Id: GetterSetterNameTransformer.java 1855923 2019-03-20 16:19:39Z gk $
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the name of the source element attribute.Returns the name of the target element attribute for the getter name.Returns the name of the target element attribute for the setter name.void
setAttributeName
(String attributeName) Sets the name of the source element attribute.void
setGetterNameAttribute
(String getterNameAttribute) Sets the name of the target element attribute for the getter name.void
setSetterNameAttribute
(String setterNameAttribute) Sets the name of the target element attribute for the setter name.transform
(Object rootObject, ControllerState controllerState) Fills the target attributes according to the settings.
-
Konstruktordetails
-
GetterSetterNameTransformer
public GetterSetterNameTransformer()
-
-
Methodendetails
-
getAttributeName
Returns the name of the source element attribute.- Gibt zurück:
- the name of the source attribute, not null.
-
setAttributeName
Sets the name of the source element attribute.- Parameter:
attributeName
- the name of the source attribute, not null.- Löst aus:
NullPointerException
- if attributeName is null.
-
getGetterNameAttribute
Returns the name of the target element attribute for the getter name.- Gibt zurück:
- the name of the getter name target attribute, not null.
-
setGetterNameAttribute
Sets the name of the target element attribute for the getter name.- Parameter:
getterNameAttribute
- the name of the getter name target attribute, not null.- Löst aus:
NullPointerException
- if getterNameAttribute is null.
-
getSetterNameAttribute
Returns the name of the target element attribute for the setter name.- Gibt zurück:
- the name of the setter name target attribute, not null.
-
setSetterNameAttribute
Sets the name of the target element attribute for the setter name.- Parameter:
setterNameAttribute
- the name of the setter name target attribute, not null.- Löst aus:
NullPointerException
- if setterNameAttribute is null.
-
transform
public SourceElement transform(Object rootObject, ControllerState controllerState) throws SourceTransformerException Fills the target attributes according to the settings.- Angegeben von:
transform
in SchnittstelleSourceTransformer
- 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:
IllegalStateException
- if sourceAttributeName or targetAttributeName was not set.SourceTransformerException
- if rootObject is not a SourceElement.
-