|
||||||||||
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.GetterSetterNameTransformer
public class GetterSetterNameTransformer
Takes a property name as input from a source element attribute and generates a getter and a setter name from it.
Constructor Summary | |
---|---|
GetterSetterNameTransformer()
|
Method Summary | |
---|---|
String |
getAttributeName()
Returns the name of the source element attribute. |
String |
getGetterNameAttribute()
Returns the name of the target element attribute for the getter name. |
String |
getSetterNameAttribute()
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. |
SourceElement |
transform(SourceElement sourceElement,
ControllerState controllerState)
Fills the target attributes according to the settings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GetterSetterNameTransformer()
Method Detail |
---|
public String getAttributeName()
public void setAttributeName(String attributeName)
attributeName
- the name of the source attribute, not null.
NullPointerException
- if attributeName is null.public String getGetterNameAttribute()
public void setGetterNameAttribute(String getterNameAttribute)
getterNameAttribute
- the name of the getter name target attribute,
not null.
NullPointerException
- if getterNameAttribute is null.public String getSetterNameAttribute()
public void setSetterNameAttribute(String setterNameAttribute)
getterNameAttribute
- the name of the setter name target attribute,
not null.
NullPointerException
- if setterNameAttribute is null.public SourceElement transform(SourceElement sourceElement, ControllerState controllerState)
transform
in interface SourceTransformer
sourceElement
- the source element to modify, not null.controllerState
- the controller state.
IllegalStateException
- if sourceAttributeName or
targetAttributeName was not set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |