org.apache.torque.templates.transformer

## Class IncludeSchemaTransformer

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

- All Implemented Interfaces:
    SourceTransformer

      public class IncludeSchemaTransformer
      extends Object
      implements SourceTransformer

  A SourceTransformer which includes other schemata into the current graph.
  Version:
    $Id: IncludeSchemaTransformer.java 1850969 2019-01-10 18:09:47Z painter $

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IncludeSchemaTransformer()` Standard constructor.
    `IncludeSchemaTransformer(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 included schema content into the current model.
    `SourceElement` | `transform(Object modelRoot, ControllerState controllerState)` Loads the included schema objects into the current source graph.

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

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

- - ### Constructor Detail

    - #### IncludeSchemaTransformer

          public IncludeSchemaTransformer()

      Standard constructor.

    - #### IncludeSchemaTransformer

          public IncludeSchemaTransformer(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 included schema objects into the current source graph.
      Specified by:
        `transform` in interface `SourceTransformer`
      Parameters:
        `modelRoot` - the database root element of the source tree, not null.
        `controllerState` - the controller state, not null.
      Throws:
        `SourceTransformerException` - if the transformation fails.

    - #### transform

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

      Loads the included schema content into the current model.
      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.