Class DataStoreHelperMetaData

java.lang.Object
com.ibm.websphere.rsadapter.DataStoreHelperMetaData

public class DataStoreHelperMetaData extends Object
This class provides metadata information for DataStoreHelpers. DataStoreHelperMetaData can be used to retrieve static information about the database and JDBC driver. Setter methods are provided only for the DataStoreHelper class to use in initializing the DataStoreHelperMetaData. The setter methods must never be used directly by the application.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new DataStoreHelperMetaData instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
     
    final int
    Returns the default transaction isolation level for the DataStoreHelper to which this DataStoreHelperMetaData corresponds.
    final int
    Returns a constant indicating the type of DataStoreHelper to which this DataStoreHelperMetaData instance applies.
    void
    For internal use only.
    final void
    Configures an indicator of the default transaction isolation level for the JDBC driver.
    final void
    setDatabaseDefaultIsolationLevel(int helperDefaultLevel, int cusDefinedWasDefaultIsoLevel)
    Configures an indicator of the default transaction isolation level for the JDBC driver.
    final void
    Configures an indicator of whether extended-for-update is supported by the database.
    final void
    setGetCatalogSupport(boolean flag)
    Configures an indicator of whether the JDBC driver supports java.sql.Connection.getCatalog.
    final void
    setGetTypeMapSupport(boolean flag)
    Configures an indicator of whether the JDBC driver supports java.sql.Connection.getTypeMap.
    final void
    setHelperType(int hType)
    Configures the DataStoreHelepr type.
    final void
    setKerberosSupport(boolean flag)
    Configures an indicator of whether the database supports kerberos.
    final void
    This method configures whether the database supports multiple partitions.
    final void
    This method configures whether the database supports getNetworkTimeout.
    final void
    setReadOnlySupport(boolean flag)
    Configures an indicator of whether the JDBC driver supports java.sql.Connection.isReadOnly.
    final void
    setSchemaSupport(boolean flag)
    This method configures whether the database supports getSchema.
    final void
    Configures an indicator of whether the database supports select for update.
    final void
     
    final void
    Indicates whether the database supports unit-of-work detection API.
    final boolean
    Indicates whether the database supports extended-for-update.
    final boolean
    Indicates whether the JDBC driver supports java.sql.Connection.getCatalog.
    final boolean
    Indicates whether the JDBC driver supports java.sql.Connection.getNetworkTimeout
    final boolean
    Indicates whether the JDBC driver supports java.sql.Connection.getSchema
    final boolean
    Indicates whether the JDBC driver supports java.sql.Connection.getTypeMap.
    final boolean
    Indicates whether the JDBC driver supports java.sql.Connection.isReadOnly.
    final boolean
    Indicates whether the database supports kerberos.
    final boolean
    Indicates whether the database supports multiple partitions.
    final boolean
    Indicates whether the database supports select for update.
    final boolean
    Method to check if unit-of-work detection API is supported by the backend database
    Returns a nicely formatted, legible representation of the DataStoreHelperMetaData.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DataStoreHelperMetaData

      public DataStoreHelperMetaData()

      Create a new DataStoreHelperMetaData instance. By default, values are configured as follows:

      DatabaseDefaultIsolationLevel = java.sql.Connection.TRANSACTION_READ_COMMITTED;
      HelperType = DataStoreHelper.GENERIC_HELPER;
      SupportsExtendedForUpdate = false;
      SupportsKerberos = false;
      SupportsSelectForUpdate = true;
      SupportsGetCatalog = true;
      SupportsGetSchema = true;
      SupportsGetNetworkTimeout = True;
      SupportsGetTypeMap = true;
      SupportsIsReadOnly = true;
      SupportsMultiplePartitionDB = false;
      StatementCachesIsoLevel = false;
  • Method Details

    • getHelperType

      public final int getHelperType()
      Returns a constant indicating the type of DataStoreHelper to which this DataStoreHelperMetaData instance applies. A list of valid DataStoreHelper types is defined on the DataStoreHelper interface. For example, DataStoreHelper.DB2_UNIVERSAL_HELPER.
      Returns:
      the DataStoreHelper type constant indicating the DataStoreHelper type.
    • setHelperType

      public final void setHelperType(int hType)
      Configures the DataStoreHelepr type. A list of valid DataStoreHelper types is defined on the DataStoreHelper interface. For example, DataStoreHelper.DB2_UNIVERSAL_HELPER.
      Parameters:
      hType - a valid DataStoreHelper type constant defined on the DataStoreHelper interface.
    • getDatabaseDefaultIsolationLevel

      public final int getDatabaseDefaultIsolationLevel()
      Returns the default transaction isolation level for the DataStoreHelper to which this DataStoreHelperMetaData corresponds.
      Returns:
      the default transaction isolation level for the JDBC driver. Isolation level constants are defined on the java.sql.Connection interface.
      See Also:
    • setConfig

      public void setConfig(AtomicReference<?> config)
      For internal use only.
      Parameters:
      config -
    • setDatabaseDefaultIsolationLevel

      public final void setDatabaseDefaultIsolationLevel(int level)
      Configures an indicator of the default transaction isolation level for the JDBC driver. This method should be used only by the DataStoreHelper class to initially configure the DataStoreHelperMetaData.
      Parameters:
      level - the transaction isolation level. Transaction isolation level constants are defined on the java.sql.Connection interface.
      See Also:
    • setDatabaseDefaultIsolationLevel

      public final void setDatabaseDefaultIsolationLevel(int helperDefaultLevel, int cusDefinedWasDefaultIsoLevel)
      Configures an indicator of the default transaction isolation level for the JDBC driver. This method should be used only by the DataStoreHelper class to initially configure the DataStoreHelperMetaData.
      Parameters:
      helperDefaultLevel - the datastore helper default transaction isolation level. Transaction isolation level constants are defined on the java.sql.Connection interface.
      cusDefinedWasDefaultIsoLevel - value that overrides the helperDefaultLevel. Specify -1 to use the supplied helperDefaultLevel.
      See Also:
    • setExtendedForUpdateSupport

      public final void setExtendedForUpdateSupport(boolean flag)
      Configures an indicator of whether extended-for-update is supported by the database. This method should be used only by the DataStoreHelper class to initially configure the DataStoreHelperMetaData.
      Parameters:
      flag - indicates whether the database supports extended-for-update.
    • supportsExtendedForUpdate

      public final boolean supportsExtendedForUpdate()
      Indicates whether the database supports extended-for-update.
      Returns:
      true if the database supports extended-for-update, otherwise false.
    • setKerberosSupport

      public final void setKerberosSupport(boolean flag)
      Configures an indicator of whether the database supports kerberos. This method should be used only the DataStoreHelper class to initially configure the DatastoreHelperMetaData.
      Parameters:
      flag - indicates whether the database supports kerberos.
    • supportsKerberos

      public final boolean supportsKerberos()
      Indicates whether the database supports kerberos.
      Returns:
      true if the database supports kerberos, otherwise false.
    • setSelectForUpdateSupport

      public final void setSelectForUpdateSupport(boolean flag)
      Configures an indicator of whether the database supports select for update. This method should be used only by the DataStoreHelper class to initially configure the DataStoreHelperMetaData.
      Parameters:
      flag - indicates whether the database supports select for update.
    • supportsSelectForUpdate

      public final boolean supportsSelectForUpdate()
      Indicates whether the database supports select for update.
      Returns:
      true if the database supports select for update, otherwise false.
    • setGetCatalogSupport

      public final void setGetCatalogSupport(boolean flag)
      Configures an indicator of whether the JDBC driver supports java.sql.Connection.getCatalog. This method should be used only by the DataStoreHelper class to initially configure the DataStoreHelperMetaData.
      Parameters:
      flag - indicates whether the operation is supported.
    • supportsGetCatalog

      public final boolean supportsGetCatalog()
      Indicates whether the JDBC driver supports java.sql.Connection.getCatalog.
      Returns:
      true if the operation is supported, otherwise false.
    • setGetTypeMapSupport

      public final void setGetTypeMapSupport(boolean flag)
      Configures an indicator of whether the JDBC driver supports java.sql.Connection.getTypeMap. This method should be used only by the DataStoreHelper class to initially configure the DataStoreHelperMetaData.
      Parameters:
      flag - indicates whether the operation is supported.
    • supportsGetTypeMap

      public final boolean supportsGetTypeMap()
      Indicates whether the JDBC driver supports java.sql.Connection.getTypeMap.
      Returns:
      true if the operation is supported, otherwise false.
    • setReadOnlySupport

      public final void setReadOnlySupport(boolean flag)
      Configures an indicator of whether the JDBC driver supports java.sql.Connection.isReadOnly. This method should be used only by the DataStoreHelper class to initially configure the DataStoreHelperMetaData.
      Parameters:
      flag - indicates whether the operation is supported.
    • supportsIsReadOnly

      public final boolean supportsIsReadOnly()
      Indicates whether the JDBC driver supports java.sql.Connection.isReadOnly.
      Returns:
      true if the operation is supported, otherwise false.
    • setSchemaSupport

      public final void setSchemaSupport(boolean flag)
      This method configures whether the database supports getSchema. This method should only be used by the DataStoreHelper class to initially configure the DataStoreHelperMetaData.
      Parameters:
      flag - indicates whether the database supports schema changes
    • supportsGetSchema

      public final boolean supportsGetSchema()
      Indicates whether the JDBC driver supports java.sql.Connection.getSchema
      Returns:
      true if the operation is supported, otherwise false.
    • setNetworkTimeoutSupport

      public final void setNetworkTimeoutSupport(boolean flag)
      This method configures whether the database supports getNetworkTimeout. This method should only be used by the DataStoreHelper class to initially configure the DataStoreHelperMetaData.
      Parameters:
      flag - indicates whether the database supports network timeout changes
    • supportsGetNetworkTimeout

      public final boolean supportsGetNetworkTimeout()
      Indicates whether the JDBC driver supports java.sql.Connection.getNetworkTimeout
      Returns:
      true if the operation is supported, otherwise false.
    • setMultiplePartitionDBSupport

      public final void setMultiplePartitionDBSupport(boolean flag)
      This method configures whether the database supports multiple partitions. This method should be used only by the DataStoreHelper class to initially configure the DataStoreHelperMetaData.
      Parameters:
      flag - indicates whether the database supports multiple partitions.
    • supportsMultiplePartitionDB

      public final boolean supportsMultiplePartitionDB()
      Indicates whether the database supports multiple partitions.
      Returns:
      true if the database supports multiple partitions, otherwise false.
    • doesStatementCacheIsoLevel

      public final boolean doesStatementCacheIsoLevel()
    • setStatementCacheIsoLevel

      public final void setStatementCacheIsoLevel(boolean flag)
    • setSupportsUOWDetection

      public final void setSupportsUOWDetection(boolean flag)
      Indicates whether the database supports unit-of-work detection API.
    • supportsUOWDetection

      public final boolean supportsUOWDetection()
      Method to check if unit-of-work detection API is supported by the backend database
      Returns:
      boolean
    • toString

      public String toString()
      Returns a nicely formatted, legible representation of the DataStoreHelperMetaData.
      Overrides:
      toString in class Object
      Returns:
      a String representing the DataStoreHelperMetaData.