Package org.jdbi.v3.core
Class Handles
java.lang.Object
org.jdbi.v3.core.Handles
- All Implemented Interfaces:
JdbiConfig<Handles>
Configuration class for handles.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this configuration object.booleanReturns whether to enforce transaction termination discipline when aHandleis closed.voidsetForceEndTransactions(boolean forceEndTransactions) Sets whether to enforce transaction termination discipline when aHandleis closed.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jdbi.v3.core.config.JdbiConfig
setRegistry
-
Constructor Details
-
Handles
public Handles()
-
-
Method Details
-
isForceEndTransactions
public boolean isForceEndTransactions()Returns whether to enforce transaction termination discipline when aHandleis closed. This check is enabled by default. If enabled, and a handle is closed while a transaction is active (i.e. not committed or rolled back), an exception will be thrown. This check does not apply to handles allocated with a connection that already has an open transaction.- Returns:
- whether to enforce transaction termination discipline when a
Handleis closed.
-
setForceEndTransactions
public void setForceEndTransactions(boolean forceEndTransactions) Sets whether to enforce transaction termination discipline when aHandleis closed.- Parameters:
forceEndTransactions- whether to enforce transaction termination discipline.
-
createCopy
Description copied from interface:JdbiConfigReturns a copy of this configuration object. Changes to the copy should not modify the original, and vice-versa.- Specified by:
createCopyin interfaceJdbiConfig<Handles>- Returns:
- a copy of this configuration object.
-