Package org.jdbi.v3.core.statement
Class BaseStatement<This>
java.lang.Object
org.jdbi.v3.core.statement.BaseStatement<This>
- All Implemented Interfaces:
Closeable,AutoCloseable,Configurable<This>
- Direct Known Subclasses:
Batch,MetaData,SqlStatement
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddCustomizers(Collection<StatementCustomizer> customizers) final ThisRegisters with the handle for cleaning when the handle is closed.private static voidattachToHandleForCleanup(Handle handle, StatementContext context) (package private) final voidprotected final voidvoidclose()final booleanReturns the configuration registry associated with this object.final StatementContextReturns the statement context associated with this statement.private Collection<StatementCustomizer>final Handlefinal inthashCode()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jdbi.v3.core.config.Configurable
addCustomizer, configure, define, getConfig, registerArgument, registerArgument, registerArrayType, registerArrayType, registerArrayType, registerArrayType, registerCodecFactory, registerCollector, registerCollector, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerExtension, registerRowMapper, registerRowMapper, registerRowMapper, registerRowMapper, setMapKeyColumn, setMapValueColumn, setSqlArrayArgumentStrategy, setSqlLogger, setSqlParser, setTemplateEngine, setTimingCollector
-
Field Details
-
typedThis
-
handle
-
ctx
-
-
Constructor Details
-
BaseStatement
BaseStatement(Handle handle)
-
-
Method Details
-
getHandle
-
getConfig
Description copied from interface:ConfigurableReturns the configuration registry associated with this object.- Specified by:
getConfigin interfaceConfigurable<This>- Returns:
- the configuration registry associated with this object.
-
getContext
Returns the statement context associated with this statement.- Returns:
- the statement context associated with this statement.
-
attachToHandleForCleanup
Registers with the handle for cleaning when the handle is closed.
There are some situations where Statements need to be cleaned up to avoid resource leaks. This method registers the current Statement it with the Handle. If the statement or the context are cleaned by themselves, it will automatically unregister, so in normal operations, resources should not pool for cleanup with the Handle.- Since:
- 3.35.0
-
attachToHandleForCleanup
-
cleanUpForException
-
addCustomizers
-
callCustomizers
-
getCustomizers
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
equals
-
hashCode
public final int hashCode()
-