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
Nested ClassesModifier and TypeClassDescriptionstatic enumControl exception message generation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this configuration object.intReturns 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(Function<StatementException, String> messageRendering) Configure exception statement message generation.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JdbiConfig
setRegistryModifier and TypeMethodDescriptiondefault voidsetRegistry(ConfigRegistry registry) The registry will inject itself into the configuration object.
-
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.
- See Also:
-
setMessageRendering
public StatementExceptions setMessageRendering(Function<StatementException, String> messageRendering) Configure exception statement message generation.- Parameters:
messageRendering- the message rendering strategy to use- Returns:
- this
- See Also:
-
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<StatementExceptions>- Returns:
- a copy of this configuration object.
-