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.templates.transformer.om
Class OMTransformer

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

All Implemented Interfaces:
  SourceTransformer

    public class OMTransformer

extends Object
implements SourceTransformer

Performs the transformations which are necessary to apply the OM templates to the source tree. This transformer performs the following actions:

- adds attributes to source elements
- links elements to other source elements

No elements or attributes are deleted. This transformer calls the following other transformers on the source tree:

- IncludeSchemaTransformer on the root node
- LoadExternalSchemaTransformer on the root node
- OMTableAndViewTransformer on all tables and views
- OMForeignKeyColumnTransformer on all columns
- OMForeignKeyTransformer on all foreign keys (two passes)

$Id: OMTransformer.java 1435917 2013-01-20 19:15:48Z tfischer $

Constructor Summary
`OMTransformer()`

Method Summary
`static void` | `setRootDatabaseNameAttribute(SourceElement databaseElement)` Sets the rootDatabaseName attribute of the database element to the database's name.
`SourceElement` | `transform(SourceElement root, ControllerState controllerState)` Transforms the source tree so it can be used by the om templates.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OMTransformer

    public OMTransformer()

Method Detail

### transform

    public SourceElement transform(SourceElement root,
                                   ControllerState controllerState)
                            throws SourceTransformerException

  Transforms the source tree so it can be used by the om templates.

  Specified by:
    `transform` in interface `SourceTransformer`
  Parameters:
    `root` - the database root element of the source tree, not null.
    `controllerState` - the controller state, not null.
  Throws:
    `SourceTransformerException` - if the transformation fails.

### setRootDatabaseNameAttribute

    public static void setRootDatabaseNameAttribute(SourceElement databaseElement)

  Sets the rootDatabaseName attribute of the database element to the database's name.

  Parameters:
    `databaseElement` - the database element, not null.

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.