Package 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
  Description
  `IncludeSchemaTransformer()`
  Standard constructor.
  `IncludeSchemaTransformer(File baseDir)`
  Constructor to override base dir.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SourceElement`
  `transform(Object modelRoot, ControllerState controllerState)`
  Loads the included schema objects into the current source graph.
  `Database`
  `transform(Database database, ControllerState controllerState)`
  Loads the included schema content into the current model.

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

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

- ## Constructor Details

  - ### IncludeSchemaTransformer

    public IncludeSchemaTransformer()
    Standard constructor.

  - ### IncludeSchemaTransformer

    public IncludeSchemaTransformer(File baseDir)
    Constructor to override base dir.
    Parameters:
      `baseDir` - the new base dir.

- ## Method Details

  - ### 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.