Class JdbiUtil

java.lang.Object
org.jdbi.v3.spring5.JdbiUtil

@Deprecated(forRemoval=true, since="3.47.0") public class JdbiUtil extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Use the org.jdbi.v3.spring module with Spring 6.x or newer.
Utility for working with Jdbi and Spring transaction bound resources
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Close a handle if it is not transactionally bound, otherwise no-op
    static Handle
    Deprecated, for removal: This API element is subject to removal in a future version.
    Obtain a Handle instance, either the transactionally bound one if we are in a transaction, or a new one otherwise.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getHandle

      public static Handle getHandle(Jdbi jdbi)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Obtain a Handle instance, either the transactionally bound one if we are in a transaction, or a new one otherwise.
      Parameters:
      jdbi - the Jdbi instance from which to obtain the handle
      Returns:
      the Handle instance
    • closeIfNeeded

      public static void closeIfNeeded(Handle handle)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Close a handle if it is not transactionally bound, otherwise no-op
      Parameters:
      handle - the handle to consider closing