Class JdbcEnvironmentImpl
java.lang.Object
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl
- All Implemented Interfaces:
Serializable
,JdbcEnvironment
,Service
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJdbcEnvironmentImpl
(DatabaseMetaData databaseMetaData, Dialect dialect, JdbcConnectionAccess jdbcConnectionAccess) Constructor form used from testingJdbcEnvironmentImpl
(ServiceRegistryImplementor serviceRegistry, Dialect dialect) Constructor form used when the JDBCDatabaseMetaData
is not available.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 the DatabaseMetaData, but since Hibernate Reactive is currently not making use of it we take a shortcut.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 buildingLobCreator
instances.Obtain the level of support for qualified names.Obtain support for formatting qualified object names.Obtain the helper for dealing with JDBCSQLException
faults.static boolean
isMultiTenancyEnabled
(ServiceRegistry serviceRegistry)
-
Field Details
-
SCHEMA_NAME_RESOLVER
- See Also:
-
-
Constructor Details
-
JdbcEnvironmentImpl
Constructor form used when the JDBCDatabaseMetaData
is 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) throws SQLException 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 the DatabaseMetaData, but since Hibernate Reactive is currently not making use of it we take a shortcut.- Throws:
SQLException
-
JdbcEnvironmentImpl
public JdbcEnvironmentImpl(ServiceRegistryImplementor serviceRegistry, Dialect dialect, DatabaseMetaData databaseMetaData, JdbcConnectionAccess jdbcConnectionAccess) throws SQLException The main constructor form. Builds a JdbcEnvironment using the available DatabaseMetaData- Parameters:
serviceRegistry
- The service registrydialect
- The resolved dialectdatabaseMetaData
- The available DatabaseMetaData- Throws:
SQLException
-
-
Method Details
-
isMultiTenancyEnabled
-
getDialect
Description copied from interface:JdbcEnvironment
Get the dialect for this environment.- Specified by:
getDialect
in interfaceJdbcEnvironment
- Returns:
- The dialect.
-
getSqlAstTranslatorFactory
- Specified by:
getSqlAstTranslatorFactory
in interfaceJdbcEnvironment
-
getExtractedDatabaseMetaData
Description copied from interface:JdbcEnvironment
Access to the bits of information we pulled off the JDBCDatabaseMetaData
(that did not get "interpreted" into the helpers/delegates available here).- Specified by:
getExtractedDatabaseMetaData
in interfaceJdbcEnvironment
- Returns:
- The values extracted from JDBC DatabaseMetaData
-
getCurrentCatalog
Description copied from interface:JdbcEnvironment
Get the current database catalog. Typically will come from eitherConnection.getCatalog()
or "hibernate.default_catalog".- Specified by:
getCurrentCatalog
in interfaceJdbcEnvironment
- Returns:
- The current catalog.
-
getCurrentSchema
Description copied from interface:JdbcEnvironment
Get the current database catalog. Typically will come from eitherSchemaNameResolver.resolveSchemaName(java.sql.Connection, Dialect)
or "hibernate.default_catalog".- Specified by:
getCurrentSchema
in interfaceJdbcEnvironment
- Returns:
- The current schema
-
getQualifiedObjectNameFormatter
Description copied from interface:JdbcEnvironment
Obtain support for formatting qualified object names.- Specified by:
getQualifiedObjectNameFormatter
in interfaceJdbcEnvironment
- Returns:
- Qualified name support.
-
getIdentifierHelper
Description copied from interface:JdbcEnvironment
Obtain 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:
getIdentifierHelper
in interfaceJdbcEnvironment
- Returns:
- The identifier helper.
-
getNameQualifierSupport
Description copied from interface:JdbcEnvironment
Obtain the level of support for qualified names.- Specified by:
getNameQualifierSupport
in interfaceJdbcEnvironment
- Returns:
- The NameQualifierSupport.
-
getSqlExceptionHelper
Description copied from interface:JdbcEnvironment
Obtain the helper for dealing with JDBCSQLException
faults.- Specified by:
getSqlExceptionHelper
in interfaceJdbcEnvironment
- Returns:
- This environment's helper.
-
getLobCreatorBuilder
Description copied from interface:JdbcEnvironment
Retrieve the delegate for buildingLobCreator
instances.- Specified by:
getLobCreatorBuilder
in interfaceJdbcEnvironment
- Returns:
- The LobCreator builder.
-