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.
- Author:
- Steve Ebersole
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault DialectAccess to the current dialect.The JDBCTimeZoneused when writing a value of typeTimeorTimestampto a JDBCPreparedStatement, or when reading from a JDBCResultSet.Obtain access to theLobCreator.intThe JDBCtype codeused to bind a null boolean value.Access to the current session.Access to the current session factory.booleanDetermines 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 codeused to bind a null boolean value. -
getLobCreator
LobCreator getLobCreator()Obtain access to theLobCreator.- Returns:
- The LOB creator
- See Also:
-
getJdbcTimeZone
TimeZone getJdbcTimeZone()The JDBCTimeZoneused when writing a value of typeTimeorTimestampto 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
TimeZonecan 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
-