Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.torque.generator.source.transform
Class BeanPropertyMethodNameTransformer

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

All Implemented Interfaces:
  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 1406804 2012-11-07 21:04:28Z tfischer $

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

### BeanPropertyMethodNameTransformer

    public BeanPropertyMethodNameTransformer()

  Constructor.

Method Detail

### getTargetNamePrefix

    public String getTargetNamePrefix()

  Returns the prefix which is added in front of the input string.

  Returns:
    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.

  Parameters:
    `prefix` - the prefix for the result, not null.
  Throws:
    `NullPointerException` - if prefix is null.

### getSuffix

    public String getSuffix()

  Returns the suffix which is added after the input string.

  Returns:
    the suffix for the result, not null.

### setSuffix

    public void setSuffix(String suffix)

  Sets the suffix which is added after of the input string.

  Parameters:
    `suffix` - the suffix for the result, not null.
  Throws:
    `NullPointerException` - if suffix is null.

### transform

    public SourceElement transform(SourceElement sourceElement,
                                   ControllerState controllerState)

  Fills the target attribute according to the settings.

  Specified by:
    `transform` in interface `SourceTransformer`
  Specified by:
    `transform` in class `SourceTargetAttributeTransformer`
  Parameters:
    `sourceElement` - the source element to modify, not null.
    `controllerState` - the controller state.
  Returns:
    the modified source element, not null.
  Throws:
    `IllegalStateException` - if targetAttributeName was not set.
  See Also:
    `SourceTransformer.transform(SourceElement, ControllerState)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2013 The Apache Software Foundation. All Rights Reserved.