Class DatabaseMetaDataDialectResolutionInfoAdapter
java.lang.Object
org.hibernate.engine.jdbc.dialect.spi.DatabaseMetaDataDialectResolutionInfoAdapter
- All Implemented Interfaces:
DatabaseVersion
,DialectResolutionInfo
public class DatabaseMetaDataDialectResolutionInfoAdapter
extends Object
implements DialectResolutionInfo
An implementation of DialectResolutionInfo that delegates calls to a wrapped
DatabaseMetaData
.
All SQLException
s resulting from calls on the DatabaseMetaData are converted to the Hibernate
JDBCException
hierarchy.
-
Field Summary
Fields inherited from interface org.hibernate.dialect.DatabaseVersion
NO_VERSION
-
Constructor Summary
ConstructorDescriptionDatabaseMetaDataDialectResolutionInfoAdapter
(DatabaseMetaData databaseMetaData) -
Method Summary
Modifier and TypeMethodDescriptionint
Obtain access to the database major version, as returned fromDatabaseMetaData.getDatabaseMajorVersion()
for the target database.Obtain access to theDatabaseMetaData
if it is available.int
Obtain access to the database minor version, as returned fromDatabaseMetaData.getDatabaseMinorVersion()
for the target database.Obtain access to the database name, as returned fromDatabaseMetaData.getDatabaseProductName()
for the target databaseObtain access to the database version, as returned fromDatabaseMetaData.getDatabaseProductVersion()
for the target databaseint
Obtain access to the major version of the JDBC driver, as returned fromDatabaseMetaData.getDriverMajorVersion()
()} for the target database.int
Obtain access to the minor version of the JDBC driver, as returned fromDatabaseMetaData.getDriverMinorVersion()
for the target database.Obtain access to the name of the JDBC driver, as returned fromDatabaseMetaData.getDriverName()
for the target databaseObtain access to the SQL keywords of the JDBC driver, as returned fromDatabaseMetaData.getSQLKeywords()
for the target database.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hibernate.dialect.DatabaseVersion
getDatabaseMicroVersion, getMajor, getMicro, getMinor, isAfter, isAfter, isAfter, isAfter, isAfter, isBefore, isBefore, isBefore, isBefore, isBefore, isSame, isSame, isSame, isSame, isSameOrAfter, isSameOrAfter, isSameOrAfter, isSameOrAfter, isSameOrAfter, makeCopy, makeCopy, makeCopyOrDefault
Methods inherited from interface org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo
getConfigurationValues
-
Constructor Details
-
DatabaseMetaDataDialectResolutionInfoAdapter
-
-
Method Details
-
getDatabaseName
Description copied from interface:DialectResolutionInfo
Obtain access to the database name, as returned fromDatabaseMetaData.getDatabaseProductName()
for the target database- Specified by:
getDatabaseName
in interfaceDialectResolutionInfo
- Returns:
- The database name
- See Also:
-
getDatabaseVersion
Description copied from interface:DialectResolutionInfo
Obtain access to the database version, as returned fromDatabaseMetaData.getDatabaseProductVersion()
for the target database- Specified by:
getDatabaseVersion
in interfaceDialectResolutionInfo
- Returns:
- The database version
- See Also:
-
getDatabaseMajorVersion
public int getDatabaseMajorVersion()Description copied from interface:DatabaseVersion
Obtain access to the database major version, as returned fromDatabaseMetaData.getDatabaseMajorVersion()
for the target database.- Specified by:
getDatabaseMajorVersion
in interfaceDatabaseVersion
- Returns:
- The database major version, or -9999 to indicate "no version information"
- See Also:
-
getDatabaseMinorVersion
public int getDatabaseMinorVersion()Description copied from interface:DatabaseVersion
Obtain access to the database minor version, as returned fromDatabaseMetaData.getDatabaseMinorVersion()
for the target database.- Specified by:
getDatabaseMinorVersion
in interfaceDatabaseVersion
- Returns:
- The database minor version, or -9999 to indicate "no version information"
- See Also:
-
getDriverName
Description copied from interface:DialectResolutionInfo
Obtain access to the name of the JDBC driver, as returned fromDatabaseMetaData.getDriverName()
for the target database- Specified by:
getDriverName
in interfaceDialectResolutionInfo
- Returns:
- The JDBC driver name
- See Also:
-
getDriverMajorVersion
public int getDriverMajorVersion()Description copied from interface:DialectResolutionInfo
Obtain access to the major version of the JDBC driver, as returned fromDatabaseMetaData.getDriverMajorVersion()
()} for the target database.- Specified by:
getDriverMajorVersion
in interfaceDialectResolutionInfo
- Returns:
- The JDBC driver major version, or -9999 to indicate "no version information"
- See Also:
-
getDriverMinorVersion
public int getDriverMinorVersion()Description copied from interface:DialectResolutionInfo
Obtain access to the minor version of the JDBC driver, as returned fromDatabaseMetaData.getDriverMinorVersion()
for the target database.- Specified by:
getDriverMinorVersion
in interfaceDialectResolutionInfo
- Returns:
- The JDBC driver minor version, or -9999 to indicate "no version information"
- See Also:
-
getSQLKeywords
Description copied from interface:DialectResolutionInfo
Obtain access to the SQL keywords of the JDBC driver, as returned fromDatabaseMetaData.getSQLKeywords()
for the target database.- Specified by:
getSQLKeywords
in interfaceDialectResolutionInfo
- Returns:
- The JDBC driver keywords
- See Also:
-
getDatabaseMetadata
Description copied from interface:DialectResolutionInfo
Obtain access to theDatabaseMetaData
if it is available.- Specified by:
getDatabaseMetadata
in interfaceDialectResolutionInfo
- Returns:
- The
DatabaseMetaData
ornull
if not available
-
toString
-