Class JdbcEnvironmentImpl
java.lang.Object
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl
- All Implemented Interfaces:
Serializable,JdbcEnvironment,Service
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcEnvironmentImpl(DatabaseMetaData databaseMetaData, Dialect dialect, JdbcConnectionAccess jdbcConnectionAccess) Constructor form used from testingJdbcEnvironmentImpl(ServiceRegistryImplementor serviceRegistry, Dialect dialect) Constructor form used when the JDBCDatabaseMetaDatais not available.JdbcEnvironmentImpl(ServiceRegistryImplementor serviceRegistry, Dialect dialect, DatabaseMetaData databaseMetaData) Deprecated.JdbcEnvironmentImpl(ServiceRegistryImplementor serviceRegistry, Dialect dialect, DatabaseMetaData databaseMetaData, JdbcConnectionAccess jdbcConnectionAccess) The main constructor form. -
Method Summary
Modifier and TypeMethodDescriptionGet the current database catalog.Get the current database catalog.Get the dialect for this environment.Access to the bits of information we pulled off the JDBCDatabaseMetaData(that did not get "interpreted" into the helpers/delegates available here).Obtain the helper for dealing with identifiers in this environment.Retrieve the delegate for buildingLobCreatorinstances.Obtain the level of support for qualified names.Obtain support for formatting qualified object names.Obtain the helper for dealing with JDBCSQLExceptionfaults.static booleanisMultiTenancyEnabled(ServiceRegistry serviceRegistry)
-
Constructor Details
-
JdbcEnvironmentImpl
Constructor form used when the JDBCDatabaseMetaDatais not available.- Parameters:
serviceRegistry- The service registrydialect- The resolved dialect.
-
JdbcEnvironmentImpl
public JdbcEnvironmentImpl(DatabaseMetaData databaseMetaData, Dialect dialect, JdbcConnectionAccess jdbcConnectionAccess) throws SQLException Constructor form used from testing- Throws:
SQLException
-
JdbcEnvironmentImpl
@Deprecated public JdbcEnvironmentImpl(ServiceRegistryImplementor serviceRegistry, Dialect dialect, DatabaseMetaData databaseMetaData) Deprecated.currently used by Hibernate Reactive This version of the constructor should handle the case in which we do actually have the option to access theDatabaseMetaData, but since Hibernate Reactive is currently not making use of it we take a shortcut. -
JdbcEnvironmentImpl
public JdbcEnvironmentImpl(ServiceRegistryImplementor serviceRegistry, Dialect dialect, DatabaseMetaData databaseMetaData, JdbcConnectionAccess jdbcConnectionAccess) throws SQLException The main constructor form. Builds aJdbcEnvironmentusing the availableDatabaseMetaData.- Parameters:
serviceRegistry- The service registrydialect- The resolved dialectdatabaseMetaData- The available DatabaseMetaData- Throws:
SQLException
-
-
Method Details
-
isMultiTenancyEnabled
-
getDialect
Description copied from interface:JdbcEnvironmentGet the dialect for this environment.- Specified by:
getDialectin interfaceJdbcEnvironment- Returns:
- The dialect.
-
getSqlAstTranslatorFactory
- Specified by:
getSqlAstTranslatorFactoryin interfaceJdbcEnvironment
-
getExtractedDatabaseMetaData
Description copied from interface:JdbcEnvironmentAccess to the bits of information we pulled off the JDBCDatabaseMetaData(that did not get "interpreted" into the helpers/delegates available here).- Specified by:
getExtractedDatabaseMetaDatain interfaceJdbcEnvironment- Returns:
- The values extracted from JDBC DatabaseMetaData
-
getCurrentCatalog
Description copied from interface:JdbcEnvironmentGet the current database catalog. Typically, will come from eitherConnection.getCatalog()or "hibernate.default_catalog".- Specified by:
getCurrentCatalogin interfaceJdbcEnvironment- Returns:
- The current catalog.
-
getCurrentSchema
Description copied from interface:JdbcEnvironmentGet the current database catalog. Typically, will come from eitherConnection.getSchema()or "hibernate.default_schema".- Specified by:
getCurrentSchemain interfaceJdbcEnvironment- Returns:
- The current schema
- See Also:
-
getQualifiedObjectNameFormatter
Description copied from interface:JdbcEnvironmentObtain support for formatting qualified object names.- Specified by:
getQualifiedObjectNameFormatterin interfaceJdbcEnvironment- Returns:
- Qualified name support.
-
getIdentifierHelper
Description copied from interface:JdbcEnvironmentObtain the helper for dealing with identifiers in this environment.Note that the Identifiers returned from this IdentifierHelper already account for auto-quoting :) yaay!
- Specified by:
getIdentifierHelperin interfaceJdbcEnvironment- Returns:
- The identifier helper.
-
getNameQualifierSupport
Description copied from interface:JdbcEnvironmentObtain the level of support for qualified names.- Specified by:
getNameQualifierSupportin interfaceJdbcEnvironment- Returns:
- The NameQualifierSupport.
-
getSqlExceptionHelper
Description copied from interface:JdbcEnvironmentObtain the helper for dealing with JDBCSQLExceptionfaults.- Specified by:
getSqlExceptionHelperin interfaceJdbcEnvironment- Returns:
- This environment's helper.
-
getLobCreatorBuilder
Description copied from interface:JdbcEnvironmentRetrieve the delegate for buildingLobCreatorinstances.- Specified by:
getLobCreatorBuilderin interfaceJdbcEnvironment- Returns:
- The LobCreator builder.
-
DatabaseMetaData, but since Hibernate Reactive is currently not making use of it we take a shortcut.