org.firebirdsql.jdbc.metadata

## Class DbMetadataMediator

- java.lang.Object
- - org.firebirdsql.jdbc.metadata.DbMetadataMediator

-     @InternalApi
      public abstract class DbMetadataMediator
      extends java.lang.Object

  Provides access to the database connection for executing database metadata queries.
  Since:
    4.0
  Author:
    Mark Rotteveel

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DbMetadataMediator.MetadataQuery` Holder class for query text and parameters.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DbMetadataMediator()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract FirebirdSupportInfo` | `getFirebirdSupportInfo()` Provides the `FirebirdSupportInfo` for the connection of the associated database metadata.
    `protected abstract GDSType` | `getGDSType()`
    `protected abstract FBDatabaseMetaData` | `getMetaData()` A `FBDatabaseMetaData` instance of the connection that created this mediator.
    `protected abstract int` | `getOdsMajorVersion()`
    `protected abstract int` | `getOdsMinorVersion()`
    `protected boolean` | `isOdsEqualOrAbove(int major, int minor)`
    `protected abstract java.sql.ResultSet` | `performMetaDataQuery(DbMetadataMediator.MetadataQuery metadataQuery)` Executes the provided metadata query on the connection of the associated database metadata.

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

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

- - ### Constructor Detail

    - #### DbMetadataMediator

          public DbMetadataMediator()

  - ### Method Detail

    - #### getFirebirdSupportInfo

          protected abstract FirebirdSupportInfo getFirebirdSupportInfo()

      Provides the `FirebirdSupportInfo` for the connection of the associated database metadata.
      Returns:
        Firebird support info object.

    - #### performMetaDataQuery

          protected abstract java.sql.ResultSet performMetaDataQuery(DbMetadataMediator.MetadataQuery metadataQuery)
                                                              throws java.sql.SQLException

      Executes the provided metadata query on the connection of the associated database metadata.
      Parameters:
        `metadataQuery` - Result set producing query to execute
      Returns:
        Result set of the query
      Throws:
        `java.sql.SQLException` - For failures to execute the query

    - #### getMetaData

          protected abstract FBDatabaseMetaData getMetaData()

      A `FBDatabaseMetaData` instance of the connection that created this mediator.
      Returns:
        metadata instance

    - #### getGDSType

          protected abstract GDSType getGDSType()

      Returns:
        GDSType of the current connection

    - #### getOdsMajorVersion

          protected abstract int getOdsMajorVersion()

      Returns:
        ODS major version

    - #### getOdsMinorVersion

          protected abstract int getOdsMinorVersion()

      Returns:
        ODS minor version

    - #### isOdsEqualOrAbove

          protected final boolean isOdsEqualOrAbove(int major,
                                                    int minor)

Copyright © 2001-2025 Jaybird (Firebird JDBC) team. All rights reserved.