Package org.hibernate.type.descriptor
Interface WrapperOptions
- All Known Subinterfaces:
EventSource
,SessionImplementor
,SharedSessionContractImplementor
- All Known Implementing Classes:
AbstractDelegateSessionImplementor
,AbstractSharedSessionContract
,SessionDelegatorBaseImpl
,SessionImpl
,SharedSessionDelegatorBaseImpl
,StatelessSessionImpl
,ToOneDelegateSessionImplementor
public interface WrapperOptions
Options for binding values to and extracting values from JDBC prepared statements and result sets.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault Dialect
Access to the current dialect.default TimeZone
The JDBCTimeZone
used when writing a value of typeTime
orTimestamp
to a JDBCPreparedStatement
, or when reading from a JDBCResultSet
.Obtain the JSONFormatMapper
.default LobCreator
Obtain access to theLobCreator
.default int
The JDBCtype code
used to bind a null boolean value.Access to the current session.default SessionFactoryImplementor
Access to the current session factory.default TypeConfiguration
Obtain theTypeConfiguration
.Obtain the XMLFormatMapper
.default boolean
Determines whether streams should be used for binding LOB values.
-
Method Details
-
getSession
SharedSessionContractImplementor getSession()Access to the current session. -
getSessionFactory
Access to the current session factory. -
getDialect
Access to the current dialect. -
useStreamForLobBinding
default boolean useStreamForLobBinding()Determines whether streams should be used for binding LOB values.- Returns:
true
/false
- See Also:
-
getPreferredSqlTypeCodeForBoolean
default int getPreferredSqlTypeCodeForBoolean()The JDBCtype code
used to bind a null boolean value. -
getLobCreator
Obtain access to theLobCreator
.- Returns:
- The LOB creator
- See Also:
-
getJdbcTimeZone
The JDBCTimeZone
used when writing a value of typeTime
orTimestamp
to a JDBCPreparedStatement
, or when reading from a JDBCResultSet
.- When
getJdbcTimeZone()
is null, the methodPreparedStatement.setTimestamp(int, java.sql.Timestamp)
is called to write a timestamp, andResultSet.getTimestamp(int)
is called to read a timestamp. - But when not null, the method
PreparedStatement.setTimestamp(int, java.sql.Timestamp, java.util.Calendar)
is called to write a timestamp, andResultSet.getTimestamp(int, java.util.Calendar)
is called to read a timestamp.
Thus, the storage
TimeZone
can differ from the default JVM TimeZone given byTimeZone.getDefault()
.- Returns:
- the JDBC
TimeZone
, or null if no JDBC timezone was explicitly set - See Also:
- When
-
getTypeConfiguration
Obtain theTypeConfiguration
.- Since:
- 7.0
-
getXmlFormatMapper
FormatMapper getXmlFormatMapper()Obtain the XMLFormatMapper
.- Since:
- 7.0
-
getJsonFormatMapper
FormatMapper getJsonFormatMapper()Obtain the JSONFormatMapper
.- Since:
- 7.0
-