Package org.jdbi.v3.core.statement
Enum StatementExceptions.MessageRendering
- java.lang.Object
-
- java.lang.Enum<StatementExceptions.MessageRendering>
-
- org.jdbi.v3.core.statement.StatementExceptions.MessageRendering
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<StatementExceptions.MessageRendering>,java.util.function.Function<StatementException,java.lang.String>
- Enclosing class:
- StatementExceptions
public static enum StatementExceptions.MessageRendering extends java.lang.Enum<StatementExceptions.MessageRendering> implements java.util.function.Function<StatementException,java.lang.String>
Control exception message generation.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DETAILInclude all detail.NONEDo not include SQL or parameter information.PARAMETERSInclude bound parameters but not the SQL.SHORT_STATEMENTInclude a length-limited SQL statement and parameter information.
-
Constructor Summary
Constructors Modifier Constructor Description privateMessageRendering()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Stringapply(StatementException exc)protected abstract java.lang.Stringrender(StatementException exc, StatementContext ctx)static StatementExceptions.MessageRenderingvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static StatementExceptions.MessageRendering[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final StatementExceptions.MessageRendering NONE
Do not include SQL or parameter information.
-
PARAMETERS
public static final StatementExceptions.MessageRendering PARAMETERS
Include bound parameters but not the SQL.
-
SHORT_STATEMENT
public static final StatementExceptions.MessageRendering SHORT_STATEMENT
Include a length-limited SQL statement and parameter information.
-
DETAIL
public static final StatementExceptions.MessageRendering DETAIL
Include all detail.
-
-
Method Detail
-
values
public static StatementExceptions.MessageRendering[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (StatementExceptions.MessageRendering c : StatementExceptions.MessageRendering.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StatementExceptions.MessageRendering valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
apply
public java.lang.String apply(StatementException exc)
- Specified by:
applyin interfacejava.util.function.Function<StatementException,java.lang.String>
-
render
protected abstract java.lang.String render(StatementException exc, StatementContext ctx)
-
-