public class JdbiUtil extends Object
Constructor and Description |
---|
JdbiUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
closeIfNeeded(Handle handle)
Close a handle if it is not transactionally bound, otherwise no-op
|
static Handle |
getHandle(Jdbi jdbi)
Obtain a Handle instance, either the transactionally bound one if we are in a transaction,
or a new one otherwise.
|
public static Handle getHandle(Jdbi jdbi)
jdbi
- the Jdbi instance from which to obtain the handlepublic static void closeIfNeeded(Handle handle)
handle
- the handle to consider closingCopyright © 2018. All rights reserved.