Package org.apache.torque.generator.source.transform

# Klasse BeanPropertyMethodNameTransformer

java.lang.Object
org.apache.torque.generator.source.transform.SourceTargetAttributeTransformer
org.apache.torque.generator.source.transform.BeanPropertyMethodNameTransformer

Alle implementierten Schnittstellen:
  `SourceTransformer`

public class BeanPropertyMethodNameTransformer extends SourceTargetAttributeTransformer
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
  Konstruktor
  Beschreibung
  `BeanPropertyMethodNameTransformer()`
  Constructor.

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `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(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`

  ### Von Klasse geerbte Methoden java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Konstruktordetails

  - ### BeanPropertyMethodNameTransformer

    public BeanPropertyMethodNameTransformer()
    Constructor.

- ## Methodendetails

  - ### getTargetNamePrefix

    public String getTargetNamePrefix()
    Returns the prefix which is added in front of the input string.
    Gibt zurück:
      the prefix for the result, not null.

  - ### setPrefix

    public void setPrefix(String prefix)
    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

    public String getSuffix()
    Returns the suffix which is added after the input string.
    Gibt zurück:
      the suffix for the result, not null.

  - ### setSuffix

    public void setSuffix(String suffix)
    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 Schnittstelle `SourceTransformer`
    Angegeben von:
      `transform` in Klasse `SourceTargetAttributeTransformer`
    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:
      - `SourceTransformer.transform(Object, ControllerState)`