org.apache.torque.generator.source

## Interface Source

- All Known Implementing Classes:
    CombinedFileSource, FileSource, JdbcMetadataSource, SourceImpl

      public interface Source

  An entity which serves as an input for the generation process.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getContentChecksum()` Returns the checksum of the content of the source.
    `String` | `getDescription()` Gets a description of this source for debugging purposes.
    `Date` | `getLastModified()` Returns the date when the source was last modified.
    `SourceElement` | `getRootElement()` Returns the root element of the source.
    `File` | `getSourceFile()` Returns the source file, if it exists.

- - ### Method Detail

    - #### getRootElement

          SourceElement getRootElement()
                                throws SourceException

      Returns the root element of the source.
      Returns:
        the root element of the source, not null.
      Throws:
        `SourceException` - if the source cannot be constructed.

    - #### getDescription

          String getDescription()

      Gets a description of this source for debugging purposes.
      Returns:
        the description, which should make it possible to identify the currently processed output.

    - #### getSourceFile

          File getSourceFile()

      Returns the source file, if it exists.
      Returns:
        the source file, or null if the source is not read from a file.

    - #### getLastModified

          Date getLastModified()

      Returns the date when the source was last modified.
      Returns:
        the last modification date, or null when unknown.

    - #### getContentChecksum

          byte[] getContentChecksum()

      Returns the checksum of the content of the source. It is not defined which checksum is returned, the only requirement is that collisions should be extremely rare, i.e it can be assumed that if the checksum is the same, the content is also the same.
      Returns:
        the checksum of the content of the source, or null if it cannot be determined.

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