Package org.jdbi.v3.core.statement
Class StatementExceptions
java.lang.Object
org.jdbi.v3.core.statement.StatementExceptions
- All Implemented Interfaces:
JdbiConfig<StatementExceptions>
Configuration for
StatementException
and subclasses behavior.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Control exception message generation. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this configuration object.int
Returns the limit hint to use to shorten strings.Returns the statement exception message rendering strategy.setLengthLimit
(int lengthLimit) Set a hint on how long you'd like to shorten various variable-length strings to.setMessageRendering
(StatementExceptions.MessageRendering messageRendering) Configure exception statement message generation.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jdbi.v3.core.config.JdbiConfig
setRegistry
-
Constructor Details
-
StatementExceptions
public StatementExceptions()
-
-
Method Details
-
getLengthLimit
public int getLengthLimit()Returns the limit hint to use to shorten strings.- Returns:
- the limit hint to use to shorten strings.
-
setLengthLimit
Set a hint on how long you'd like to shorten various variable-length strings to.- Parameters:
lengthLimit
- the limit hint.- Returns:
- this
-
getMessageRendering
Returns the statement exception message rendering strategy.- Returns:
- the statement exception message rendering strategy.
-
setMessageRendering
public StatementExceptions setMessageRendering(StatementExceptions.MessageRendering messageRendering) Configure exception statement message generation.- Parameters:
messageRendering
- the message rendering strategy to use- Returns:
- this
-
createCopy
Description copied from interface:JdbiConfig
Returns a copy of this configuration object. Changes to the copy should not modify the original, and vice-versa.- Specified by:
createCopy
in interfaceJdbiConfig<StatementExceptions>
- Returns:
- a copy of this configuration object.
-