org.apache.torque.templates.transformer

## Class LoadExternalSchemaTransformer

- java.lang.Object
- - org.apache.torque.templates.transformer.LoadExternalSchemaTransformer

- All Implemented Interfaces:
    SourceTransformer

      public class LoadExternalSchemaTransformer
      extends Object
      implements SourceTransformer

  A SourceTransformer which loads the external schemata tables and views into the current graph.
  Version:
    $Id: LoadExternalSchemaTransformer.java 1850969 2019-01-10 18:09:47Z painter $

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LoadExternalSchemaTransformer()` Standard constructor.
    `LoadExternalSchemaTransformer(File baseDir)` Constructor to override base dir.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Database` | `transform(Database database, ControllerState controllerState)` Loads the external schemata tables into the current graph.
    `SourceElement` | `transform(Object modelRoot, ControllerState controllerState)` Loads the external schemata tables into the current graph.

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

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

- - ### Constructor Detail

    - #### LoadExternalSchemaTransformer

          public LoadExternalSchemaTransformer()

      Standard constructor.

    - #### LoadExternalSchemaTransformer

          public LoadExternalSchemaTransformer(File baseDir)

      Constructor to override base dir.
      Parameters:
        `baseDir` - the new base dir.

  - ### Method Detail

    - #### transform

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

      Loads the external schemata tables into the current graph. The external database element is added as child of the external-schema element. Also, an all-tables child element is added to the root element, which is filled with all tables from the external schema plus its own tables.
      Specified by:
        `transform` in interface `SourceTransformer`
      Parameters:
        `modelRoot` - the database root element of the source tree, not null.
        `controllerState` - the controller state, not null.
      Returns:
        SourceElement
      Throws:
        `SourceTransformerException` - if the transformation fails.

    - #### transform

          public Database transform(Database database,
                                    ControllerState controllerState)
                             throws SourceTransformerException

      Loads the external schemata tables into the current graph. The external database element is added as child of the external-schema element. Also, an all-tables child element is added to the root element, which is filled with all tables from the external schema plus its own tables.
      Parameters:
        `database` - the database root element of the source tree, not null.
        `controllerState` - the controller state, not null.
      Returns:
        Database object
      Throws:
        `SourceTransformerException` - if the transformation fails.

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