Top Description Fields Constructors Methods
org.hibernate.engine.jdbc.env.internal

public Class LobCreatorBuilderImpl

extends Object
implements LobCreatorBuilder
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.jdbc.env.spi.LobCreatorBuilder
Imports
java.lang.reflect.Method, java.sql.Connection, .DatabaseMetaData, .SQLException, java.util.Map, org.hibernate.cfg.Environment, org.hibernate.dialect.Dialect, org.hibernate.engine.jdbc.ContextualLobCreator, .LobCreationContext, .LobCreator, .NonContextualLobCreator, org.hibernate.engine.jdbc.env.spi.LobCreatorBuilder, org.hibernate.internal.CoreMessageLogger, org.hibernate.internal.util.config.ConfigurationHelper, org.jboss.logging.Logger

Builds org.hibernate.engine.jdbc.LobCreator instances based on the capabilities of the environment.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private static final CoreMessageLogger
private static final Class<T>[]
private static final Object[]
private final boolean

Constructor Summary

AccessConstructor and Description
private
LobCreatorBuilderImpl(boolean useContextualLobCreation)

Method Summary

Modifier and TypeMethod and Description
public LobCreator

Returns:

The LobCreator
buildLobCreator
(LobCreationContext
The LOB creation context
lobCreationContext
)

Implements org.hibernate.engine.jdbc.env.spi.LobCreatorBuilder.buildLobCreator.

Build a LobCreator using the given context
public static LobCreatorBuilderImpl
makeLobCreatorBuilder(Dialect
The Dialect in use
dialect
,
Map<K, V>
The map of settings
configValues
,
Connection
A JDBC java.sql.Connection which can be used to gauge the drivers level of support, specifically for creating LOB references.
jdbcConnection
)

The public factory method for obtaining the appropriate LOB creator (according to given JDBC java.sql.Connection).

public static LobCreatorBuilderImpl

Returns:

Appropriate LobCreatorBuilder
makeLobCreatorBuilder
()

For used when JDBC Connection is not available.

private static boolean

Returns:

True if the connection can be used to create LOBs; false otherwise.
useContextualLobCreation
(Dialect
The Dialect in use
dialect
,
Map<K, V>
The map of settings
configValues
,
Connection
The connection which can be used in level-of-support testing.
jdbcConnection
)

Basically here we are simply checking whether we can call the java.sql.Connection methods for LOB creation added in JDBC 4.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final CoreMessageLogger LOG
NO_ARG_SIGback to summary
private static final Class<T>[] NO_ARG_SIG
NO_ARGSback to summary
private static final Object[] NO_ARGS
useContextualLobCreationback to summary
private final boolean useContextualLobCreation

Constructor Detail

LobCreatorBuilderImplback to summary
private LobCreatorBuilderImpl(boolean useContextualLobCreation)

Method Detail

buildLobCreatorback to summary
public LobCreator buildLobCreator(LobCreationContext lobCreationContext)

Implements org.hibernate.engine.jdbc.env.spi.LobCreatorBuilder.buildLobCreator.

Build a LobCreator using the given context

Parameters
lobCreationContext:LobCreationContext

The LOB creation context

Returns:LobCreator

The LobCreator

makeLobCreatorBuilderback to summary
public static LobCreatorBuilderImpl makeLobCreatorBuilder(Dialect dialect, Map<K, V> configValues, Connection jdbcConnection)

The public factory method for obtaining the appropriate LOB creator (according to given JDBC java.sql.Connection).

Parameters
dialect:Dialect

The Dialect in use

configValues:Map<K, V>

The map of settings

jdbcConnection:Connection

A JDBC java.sql.Connection which can be used to gauge the drivers level of support, specifically for creating LOB references.

makeLobCreatorBuilderback to summary
public static LobCreatorBuilderImpl makeLobCreatorBuilder()

For used when JDBC Connection is not available.

Returns:LobCreatorBuilderImpl

Appropriate LobCreatorBuilder

useContextualLobCreationback to summary
private static boolean useContextualLobCreation(Dialect dialect, Map<K, V> configValues, Connection jdbcConnection)

Basically here we are simply checking whether we can call the java.sql.Connection methods for LOB creation added in JDBC 4. We not only check whether the java.sql.Connection declares these methods, but also whether the actual java.sql.Connection instance implements them (i.e. can be called without simply throwing an exception).

Parameters
dialect:Dialect

The Dialect in use

configValues:Map<K, V>

The map of settings

jdbcConnection:Connection

The connection which can be used in level-of-support testing.

Returns:boolean

True if the connection can be used to create LOBs; false otherwise.

Annotations
@SuppressWarnings:unchecked