Class DatabaseMetaDataDialectResolutionInfoAdapter
- java.lang.Object
-
- org.hibernate.engine.jdbc.dialect.spi.DatabaseMetaDataDialectResolutionInfoAdapter
-
- All Implemented Interfaces:
DialectResolutionInfo
public class DatabaseMetaDataDialectResolutionInfoAdapter extends java.lang.Object implements DialectResolutionInfo
An implementation of DialectResolutionInfo that delegates calls to a wrappedDatabaseMetaData. AllSQLExceptions resulting from calls on the DatabaseMetaData are converted to the HibernateJDBCExceptionhierarchy.
-
-
Field Summary
-
Fields inherited from interface org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo
NO_VERSION
-
-
Constructor Summary
Constructors Constructor Description DatabaseMetaDataDialectResolutionInfoAdapter(java.sql.DatabaseMetaData databaseMetaData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDatabaseMajorVersion()Obtain access to the database major version, as returned fromDatabaseMetaData.getDatabaseMajorVersion()for the target database.intgetDatabaseMinorVersion()Obtain access to the database minor version, as returned fromDatabaseMetaData.getDatabaseMinorVersion()for the target database.java.lang.StringgetDatabaseName()Obtain access to the database name, as returned fromDatabaseMetaData.getDatabaseProductName()for the target databaseintgetDriverMajorVersion()Obtain access to the major version of the JDBC driver, as returned fromDatabaseMetaData.getDriverMajorVersion()()} for the target database.intgetDriverMinorVersion()Obtain access to the minor version of the JDBC driver, as returned fromDatabaseMetaData.getDriverMinorVersion()for the target database.java.lang.StringgetDriverName()Obtain access to the name of the JDBC driver, as returned fromDatabaseMetaData.getDriverName()for the target database
-
-
-
Method Detail
-
getDatabaseName
public java.lang.String getDatabaseName()
Description copied from interface:DialectResolutionInfoObtain access to the database name, as returned fromDatabaseMetaData.getDatabaseProductName()for the target database- Specified by:
getDatabaseNamein interfaceDialectResolutionInfo- Returns:
- The database name
- See Also:
DatabaseMetaData.getDatabaseProductName()
-
getDatabaseMajorVersion
public int getDatabaseMajorVersion()
Description copied from interface:DialectResolutionInfoObtain access to the database major version, as returned fromDatabaseMetaData.getDatabaseMajorVersion()for the target database.- Specified by:
getDatabaseMajorVersionin interfaceDialectResolutionInfo- Returns:
- The database major version, or -9999 to indicate "no version information"
- See Also:
DatabaseMetaData.getDatabaseMajorVersion()
-
getDatabaseMinorVersion
public int getDatabaseMinorVersion()
Description copied from interface:DialectResolutionInfoObtain access to the database minor version, as returned fromDatabaseMetaData.getDatabaseMinorVersion()for the target database.- Specified by:
getDatabaseMinorVersionin interfaceDialectResolutionInfo- Returns:
- The database minor version, or -9999 to indicate "no version information"
- See Also:
DatabaseMetaData.getDatabaseMinorVersion()
-
getDriverName
public java.lang.String getDriverName()
Description copied from interface:DialectResolutionInfoObtain access to the name of the JDBC driver, as returned fromDatabaseMetaData.getDriverName()for the target database- Specified by:
getDriverNamein interfaceDialectResolutionInfo- Returns:
- The JDBC driver name
- See Also:
DatabaseMetaData.getDriverName()
-
getDriverMajorVersion
public int getDriverMajorVersion()
Description copied from interface:DialectResolutionInfoObtain access to the major version of the JDBC driver, as returned fromDatabaseMetaData.getDriverMajorVersion()()} for the target database.- Specified by:
getDriverMajorVersionin interfaceDialectResolutionInfo- Returns:
- The JDBC driver major version, or -9999 to indicate "no version information"
- See Also:
DatabaseMetaData.getDriverMajorVersion()
-
getDriverMinorVersion
public int getDriverMinorVersion()
Description copied from interface:DialectResolutionInfoObtain access to the minor version of the JDBC driver, as returned fromDatabaseMetaData.getDriverMinorVersion()for the target database.- Specified by:
getDriverMinorVersionin interfaceDialectResolutionInfo- Returns:
- The JDBC driver minor version, or -9999 to indicate "no version information"
- See Also:
DatabaseMetaData.getDriverMinorVersion()
-
-