Class BaseStatement<This>

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, Configurable<This>
    Direct Known Subclasses:
    Batch, MetaData, SqlStatement

    abstract class BaseStatement<This>
    extends java.lang.Object
    implements java.io.Closeable, Configurable<This>
    • Constructor Detail

      • BaseStatement

        BaseStatement​(Handle handle)
    • Method Detail

      • getHandle

        public final Handle getHandle()
      • getConfig

        public ConfigRegistry getConfig()
        Description copied from interface: Configurable
        Returns the configuration registry associated with this object.
        Specified by:
        getConfig in interface Configurable<This>
        Returns:
        the configuration registry associated with this object.
      • getContext

        public final StatementContext getContext()
        Returns the statement context associated with this statement.
        Returns:
        the statement context associated with this statement.
      • attachToHandleForCleanup

        @Alpha
        public final This 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

        private static void attachToHandleForCleanup​(Handle handle,
                                                     StatementContext context)
      • cleanUpForException

        protected final void cleanUpForException​(java.sql.SQLException e)
      • addCustomizers

        void addCustomizers​(java.util.Collection<StatementCustomizer> customizers)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • equals

        public final boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object