org.apache.torque.templates.transformer.om

## Class OMJoinGetterTransformer

- java.lang.Object
- - org.apache.torque.templates.transformer.om.OMJoinGetterTransformer

-     public class OMJoinGetterTransformer
      extends Object

  Creates the joinGetter Elements on a table. The OMReferencingForeignKeyTableTransformer needs to be run before this transformation The structure before transformation is:

       table
         foreign-key
           ...
           table (the referenced table in the foreign key)
         foreign-key
           ...
           table
         ...
         referencing-foreign-keys
           foreign-key (a foreign key where the foreignTable is the current table)
             ...
             table (the referenced table in the foreign key, i.e this table.)
           foreign-key
             ...
             table
         ...

  The structure after transformation is

       table
         foreign-key
           ...
           table (the referenced table in the foreign key)
         foreign-key
           ...
           table
         ...
         referencing-foreign-keys
           foreign-key (a foreign key where the foreignTable is the current table)
             ...
             table (the referenced table in the foreign key, i.e this table.)
           foreign-key
             ...
             table
         ...
         joinGetter name=".."
           local
             foreign-key (a foreign key referencing the table)
           remote
             foreign-key (a foreign key of the referenced table)

         ...

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OMJoinGetterTransformer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `checkElementName(SourceElement tableElement)` Checks that the name of the table element is correct.
    `void` | `transform(SourceElement tableElement, ControllerState controllerState)`

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

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

- - ### Constructor Detail

    - #### OMJoinGetterTransformer

          public OMJoinGetterTransformer()

  - ### Method Detail

    - #### transform

          public void transform(SourceElement tableElement,
                                ControllerState controllerState)
                         throws SourceTransformerException

      Parameters:
        `tableElement` - the table
        `controllerState` - the controller state
      Throws:
        `SourceTransformerException` - if the table cannot be joined

    - #### checkElementName

          protected void checkElementName(SourceElement tableElement)

      Checks that the name of the table element is correct.
      Parameters:
        `tableElement` - the table element, not null.
      Throws:
        `IllegalArgumentException` - if the element name is wrong.

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