Package org.hibernate.type.descriptor
Interface WrapperOptions
- All Known Subinterfaces:
EventSource
,SessionImplementor
,SharedSessionContractImplementor
- All Known Implementing Classes:
AbstractDelegateSessionImplementor
,AbstractDelegatingWrapperOptions
,AbstractSharedSessionContract
,SessionDelegatorBaseImpl
,SessionFactoryBasedWrapperOptions
,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.The JDBCTimeZone
used when writing a value of typeTime
orTimestamp
to a JDBCPreparedStatement
, or when reading from a JDBCResultSet
.Obtain access to theLobCreator
.int
The JDBCtype code
used to bind a null boolean value.Access to the current session.Access to the current session factory.boolean
Determines whether streams should be used for binding LOB values.
-
Method Details
-
getSession
SharedSessionContractImplementor getSession()Access to the current session. -
getSessionFactory
SessionFactoryImplementor getSessionFactory()Access to the current session factory. -
getDialect
Access to the current dialect. -
useStreamForLobBinding
boolean useStreamForLobBinding()Determines whether streams should be used for binding LOB values.- Returns:
true
/false
- See Also:
-
getPreferredSqlTypeCodeForBoolean
int getPreferredSqlTypeCodeForBoolean()The JDBCtype code
used to bind a null boolean value. -
getLobCreator
LobCreator getLobCreator()Obtain access to theLobCreator
.- Returns:
- The LOB creator
- See Also:
-
getJdbcTimeZone
TimeZone 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
-