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

public Class LobCreatorBuilder

extends Object
Class Inheritance
Imports
java.lang.reflect.Method, java.sql.Connection, .DatabaseMetaData, .SQLException, java.util.Map, org.hibernate.cfg.Environment, org.hibernate.engine.jdbc.ContextualLobCreator, .LobCreationContext, .LobCreator, .NonContextualLobCreator, org.hibernate.internal.CoreMessageLogger, org.hibernate.internal.util.config.ConfigurationHelper, org.jboss.logging.Logger

Builds 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 boolean

Constructor Summary

AccessConstructor and Description
public
LobCreatorBuilder(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 (according to given JDBC java.sql.Connection.

Method Summary

Modifier and TypeMethod and Description
public LobCreator

Returns:

The LobCreator
buildLobCreator
(LobCreationContext
The LOB creation context
lobCreationContext
)

Build a LobCreator using the given context

private static boolean

Returns:

True if the connection can be used to create LOBs; false otherwise.
useContextualLobCreation
(Map<K, V> 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 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 boolean useContextualLobCreation

Constructor Detail

LobCreatorBuilderback to summary
public LobCreatorBuilder(Map<K, V> configValues, Connection jdbcConnection)

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

Parameters
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.

Method Detail

buildLobCreatorback to summary
public LobCreator buildLobCreator(LobCreationContext lobCreationContext)

Build a LobCreator using the given context

Parameters
lobCreationContext:LobCreationContext

The LOB creation context

Returns:LobCreator

The LobCreator

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

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

Parameters
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