Package org.apache.torque.templates.transformer.om

# Klasse OMColumnTransformer

java.lang.Object
org.apache.torque.templates.transformer.om.OMColumnTransformer

public class OMColumnTransformer extends Object
Sets the class names and packages for the OM model. The id method attribute must already be set on the parent table element when this transformer is called.

- ## Feldübersicht

  Felder
  Modifizierer und Typ
  Feld
  Beschreibung
  `protected OMColumnJavaTransformer`
  `javaTransformer`

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `OMColumnTransformer()`

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `protected void`
  `checkColumnNameExists(SourceElement columnElement)`
  Checks that the name attribute exists on the column element.
  `protected void`
  `checkElementName(SourceElement columnElement)`
  Checks that the name of the column element is correct.
  `protected void`
  `setAccessModifierAttributes(SourceElement columnElement)`
  Sets the attributes getterAccessModifier and setterAccessModifer on the column element.
  `protected void`
  `setAttributeDefaultValues(SourceElement columnElement)`
  Sets default values for attributes of the column element if the attribute is not set.
  `protected void`
  `setDefaultValueAttribute(SourceElement columnElement, JavaType javaType, ControllerState controllerState)`
  Sets the defaultValue attribute of the column element if it is not already set.
  `protected void`
  `setDomainAttributes(SourceElement columnElement, ControllerState controllerState)`
  `protected void`
  `setFieldNameAttribute(SourceElement columnElement)`
  Sets the fieldName attribute of the column element if it is not already set.
  `protected void`
  `setGetterNameAttribute(SourceElement columnElement, JavaType javaType, ControllerState controllerState)`
  Sets the getterName attribute of the column element if it is not already set.
  `protected void`
  `setNumberTypeAttribute(SourceElement columnElement, JavaType javaType)`
  Sets the numberType attribute of the column element if it is not already set.
  `protected void`
  `setPeerColumnNameAttribute(SourceElement columnElement)`
  Sets the peerColumnName attribute of the column element if it is not already set.
  `protected void`
  `setPrimitiveTypeAttribute(SourceElement columnElement, JavaType javaType)`
  Sets the primitiveType attribute of the column element if it is not already set.
  `protected void`
  `setQualifiedColumnNameAttribute(SourceElement columnElement)`
  Sets the qualifiedColumnName attribute of the column element if it is not already set.
  `protected void`
  `setResultSetGetterAttribute(SourceElement columnElement, SchemaType schemaType)`
  Sets the resultSetGetter attribute of the column element if it is not already set.
  `protected void`
  `setSampleObjectAttribute(SourceElement columnElement, SchemaType schemaType)`
  Sets the sampleObject attribute of the column element if it is not already set.
  `protected void`
  `setSetterNameAttribute(SourceElement columnElement)`
  Sets the setterName attribute of the column element if it is not already set.
  `protected void`
  `setUseDatabaseDefaultValueAttribute(SourceElement columnElement)`
  Sets the useDatabaseDefaultValue attribute of the column element to its default "false" if it is not already set.
  `void`
  `transform(SourceElement columnElement, ControllerState controllerState, int columnPosition)`

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

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

- ## Felddetails

  - ### javaTransformer

    protected OMColumnJavaTransformer javaTransformer

- ## Konstruktordetails

  - ### OMColumnTransformer

    public OMColumnTransformer()

- ## Methodendetails

  - ### transform

    public void transform(SourceElement columnElement, ControllerState controllerState, int columnPosition) throws SourceTransformerException
    Parameter:
      `columnElement` - column to transform
      `controllerState` - the controller state object
      `columnPosition` - column position
    Löst aus:
      `SourceTransformerException` - if the column cannot be found

  - ### setAttributeDefaultValues

    protected void setAttributeDefaultValues(SourceElement columnElement)
    Sets default values for attributes of the column element if the attribute is not set. The following attributes are checked: autoIncrement, protected, inheritance, required, primaryKey
    Parameter:
      `columnElement` - the column element, not null.

  - ### setDomainAttributes

    protected void setDomainAttributes(SourceElement columnElement, ControllerState controllerState) throws SourceTransformerException
    Löst aus:
      `SourceTransformerException`

  - ### setAccessModifierAttributes

    protected void setAccessModifierAttributes(SourceElement columnElement)
    Sets the attributes getterAccessModifier and setterAccessModifer on the column element.
    Parameter:
      `columnElement` - the column element, not null.

  - ### checkElementName

    protected void checkElementName(SourceElement columnElement)
    Checks that the name of the column element is correct.
    Parameter:
      `columnElement` - the column element, not null.
    Löst aus:
      `IllegalArgumentException` - if the element name is wrong.

  - ### checkColumnNameExists

    protected void checkColumnNameExists(SourceElement columnElement) throws SourceTransformerException
    Checks that the name attribute exists on the column element.
    Parameter:
      `columnElement` - the column element, not null.
    Löst aus:
      `SourceTransformerException` - if the name attribute does not exist.

  - ### setFieldNameAttribute

    protected void setFieldNameAttribute(SourceElement columnElement)
    Sets the fieldName attribute of the column element if it is not already set. The javaName attribute of the column must be set.
    Parameter:
      `columnElement` - the column element, not null.

  - ### setPeerColumnNameAttribute

    protected void setPeerColumnNameAttribute(SourceElement columnElement)
    Sets the peerColumnName attribute of the column element if it is not already set.
    Parameter:
      `columnElement` - the column element, not null.

  - ### setQualifiedColumnNameAttribute

    protected void setQualifiedColumnNameAttribute(SourceElement columnElement)
    Sets the qualifiedColumnName attribute of the column element if it is not already set.
    Parameter:
      `columnElement` - the column element, not null.

  - ### setGetterNameAttribute

    protected void setGetterNameAttribute(SourceElement columnElement, JavaType javaType, ControllerState controllerState)
    Sets the getterName attribute of the column element if it is not already set. The fieldName attribute of the column element must already be set.
    Parameter:
      `columnElement` - the column element, not null.
      `javaType` - the java type of the column, not null.
      `controllerState` - the controller state, not null.

  - ### setSetterNameAttribute

    protected void setSetterNameAttribute(SourceElement columnElement)
    Sets the setterName attribute of the column element if it is not already set. The fieldName attribute of the column element must already be set.
    Parameter:
      `columnElement` - the column element, not null.

  - ### setPrimitiveTypeAttribute

    protected void setPrimitiveTypeAttribute(SourceElement columnElement, JavaType javaType)
    Sets the primitiveType attribute of the column element if it is not already set.
    Parameter:
      `columnElement` - the column element, not null.
      `javaType` - the type of the java field corresponding to the column, not null.

  - ### setNumberTypeAttribute

    protected void setNumberTypeAttribute(SourceElement columnElement, JavaType javaType)
    Sets the numberType attribute of the column element if it is not already set.
    Parameter:
      `columnElement` - the column element, not null.
      `javaType` - the type of the java field corresponding to the column, not null.

  - ### setDefaultValueAttribute

    protected void setDefaultValueAttribute(SourceElement columnElement, JavaType javaType, ControllerState controllerState) throws SourceTransformerException
    Sets the defaultValue attribute of the column element if it is not already set.
    Parameter:
      `columnElement` - the column element, not null.
      `javaType` - the type of the java field corresponding to the column, not null.
      `controllerState` - the ControllerState, not null.
    Löst aus:
      `SourceTransformerException` - if an unknown primitive type is encountered

  - ### setUseDatabaseDefaultValueAttribute

    protected void setUseDatabaseDefaultValueAttribute(SourceElement columnElement)
    Sets the useDatabaseDefaultValue attribute of the column element to its default "false" if it is not already set.
    Parameter:
      `columnElement` - the column element, not null.

  - ### setResultSetGetterAttribute

    protected void setResultSetGetterAttribute(SourceElement columnElement, SchemaType schemaType)
    Sets the resultSetGetter attribute of the column element if it is not already set. If the resultSetGetter is a string value, it is converted to a ResultSetGetter value.
    Parameter:
      `columnElement` - the column element, not null.
      `schemaType` - the schema type of the column, not null.

  - ### setSampleObjectAttribute

    protected void setSampleObjectAttribute(SourceElement columnElement, SchemaType schemaType)
    Sets the sampleObject attribute of the column element if it is not already set.
    Parameter:
      `columnElement` - the column element, not null.
      `schemaType` - the schema type of the column, not null.