org.apache.torque.templates.transformer.om

## Class OMTableAndViewTransformer

- java.lang.Object
- - org.apache.torque.generator.source.transform.AttributeTransformer
  - - org.apache.torque.templates.transformer.om.OMTableAndViewTransformer

- All Implemented Interfaces:
    SourceTransformer

      public class OMTableAndViewTransformer
      extends AttributeTransformer

  Transforms the tables and views in the OM model.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OMTableAndViewTransformer()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createInheritanceColumnChildIfNecessary(SourceElement tableElement)`
    `protected void` | `setCreateDefaultDateMethodsAttributes(SourceElement tableElement)`
    `protected void` | `setFieldNameAttribute(SourceElement tableElement)` Sets the fieldName attribute of the table element if it is not already set.
    `protected void` | `setIdMethodAttribute(SourceElement tableElement)`
    `static void` | `setJavaNameAttribute(SourceElement tableElement, ControllerState controllerState)` Sets the javaName attribute of the table element, if not already set.
    `protected void` | `setManagerClassNameAttributes(SourceElement tableElement, ControllerState controllerState)`
    `protected void` | `setPeerImplFieldNameAttribute(SourceElement tableElement)` Sets the peerImplFieldName attribute of the table element if it is not already set.
    `static void` | `setPeerImplGetterAttribute(SourceElement tableElement)` Sets the peerImplGetter attribute of the table element if it is not already set.
    `protected void` | `setPeerImplSetterAttribute(SourceElement tableElement)` Sets the peerImplSetter attribute of the table element if it is not already set.
    `protected void` | `setSaveAttributes(SourceElement tableElement, ControllerState controllerState)`
    `protected void` | `setSequenceAttributeIfNecessary(SourceElement tableElement)`
    `protected void` | `setUnqualifiedNameAttribute(SourceElement tableElement)`
    `SourceElement` | `transform(Object tableModel, ControllerState controllerState)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### OMTableAndViewTransformer

          public OMTableAndViewTransformer()
                                    throws SourceTransformerException

      Throws:
        `SourceTransformerException`

  - ### Method Detail

    - #### transform

          public SourceElement transform(Object tableModel,
                                         ControllerState controllerState)
                                  throws SourceTransformerException

      Specified by:
        `transform` in interface `SourceTransformer`
      Overrides:
        `transform` in class `AttributeTransformer`
      Throws:
        `SourceTransformerException`

    - #### setJavaNameAttribute

          public static void setJavaNameAttribute(SourceElement tableElement,
                                                  ControllerState controllerState)
                                           throws SourceTransformerException

      Sets the javaName attribute of the table element, if not already set.
      Parameters:
        `tableElement` - the table element, not null.
        `controllerState` - the controller state, not null.
      Throws:
        `SourceTransformerException` - if both attributes javaName and name are not set on the tableElement.

    - #### setUnqualifiedNameAttribute

          protected void setUnqualifiedNameAttribute(SourceElement tableElement)

    - #### setIdMethodAttribute

          protected void setIdMethodAttribute(SourceElement tableElement)
                                       throws SourceTransformerException

      Throws:
        `SourceTransformerException`

    - #### setSequenceAttributeIfNecessary

          protected void setSequenceAttributeIfNecessary(SourceElement tableElement)

    - #### setManagerClassNameAttributes

          protected void setManagerClassNameAttributes(SourceElement tableElement,
                                                       ControllerState controllerState)
                                                throws SourceTransformerException

      Throws:
        `SourceTransformerException`

    - #### createInheritanceColumnChildIfNecessary

          public void createInheritanceColumnChildIfNecessary(SourceElement tableElement)
                                                       throws SourceTransformerException

      Throws:
        `SourceTransformerException`

    - #### setFieldNameAttribute

          protected void setFieldNameAttribute(SourceElement tableElement)

      Sets the fieldName attribute of the table element if it is not already set. The field name can be used to contain a database object corresponding to the table. The javaName attribute of the column must be set.
      Parameters:
        `tableElement` - the table element, not null.

    - #### setPeerImplFieldNameAttribute

          protected void setPeerImplFieldNameAttribute(SourceElement tableElement)

      Sets the peerImplFieldName attribute of the table element if it is not already set. The field name can be used to contain a peer object corresponding to the table. The peerImplClassName attribute of the column must be already set when this method is called.
      Parameters:
        `tableElement` - the table element, not null.

    - #### setPeerImplGetterAttribute

          public static void setPeerImplGetterAttribute(SourceElement tableElement)

      Sets the peerImplGetter attribute of the table element if it is not already set. The peerImplClassName attribute of the column must be already set when this method is called.
      Parameters:
        `tableElement` - the table element, not null.

    - #### setPeerImplSetterAttribute

          protected void setPeerImplSetterAttribute(SourceElement tableElement)

      Sets the peerImplSetter attribute of the table element if it is not already set. The peerImplClassName attribute of the column must be already set when this method is called.
      Parameters:
        `tableElement` - the table element, not null.

    - #### setSaveAttributes

          protected void setSaveAttributes(SourceElement tableElement,
                                           ControllerState controllerState)

    - #### setCreateDefaultDateMethodsAttributes

          protected void setCreateDefaultDateMethodsAttributes(SourceElement tableElement)

Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.