Package org.jdbi.v3.sqlobject.customizer
Enum BindList.EmptyHandling
- java.lang.Object
-
- java.lang.Enum<BindList.EmptyHandling>
-
- org.jdbi.v3.sqlobject.customizer.BindList.EmptyHandling
-
- All Implemented Interfaces:
Serializable,Comparable<BindList.EmptyHandling>
- Enclosing class:
- BindList
public static enum BindList.EmptyHandling extends Enum<BindList.EmptyHandling>
describes what needs to be done if the passed argument is null or empty
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NULLDeprecated.vaguely named in light of new additions, useNULL_STRINGinsteadNULL_STRINGDefine "null", useful e.g.NULL_VALUEDefinenull, leaving the result up to theTemplateEngineto decide.THROWThrow IllegalArgumentException.VOIDDefine "".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddefine(SqlStatement stmt, String name)Deprecated.legacy internal APIEmptyHandlinggetCoreImpl()static BindList.EmptyHandlingvalueOf(String name)Returns the enum constant of this type with the specified name.static BindList.EmptyHandling[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
VOID
public static final BindList.EmptyHandling VOID
Define "".
select * from things where x in ()
-
NULL
@Deprecated public static final BindList.EmptyHandling NULL
Deprecated.vaguely named in light of new additions, useNULL_STRINGinsteadDefine "null", useful e.g. in postgresql where "in ()" is invalid syntax.
select * from things where x in (null)
-
NULL_STRING
public static final BindList.EmptyHandling NULL_STRING
Define "null", useful e.g. in postgresql where "in ()" is invalid syntax.
select * from things where x in (null)
-
NULL_VALUE
public static final BindList.EmptyHandling NULL_VALUE
Define
This value was specifically added to make conditionals work better withnull, leaving the result up to theTemplateEngineto decide.StringTemplate.
-
THROW
public static final BindList.EmptyHandling THROW
Throw IllegalArgumentException.
-
-
Method Detail
-
values
public static BindList.EmptyHandling[] 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 (BindList.EmptyHandling c : BindList.EmptyHandling.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BindList.EmptyHandling valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
define
@Deprecated public void define(SqlStatement stmt, String name)
Deprecated.legacy internal API
-
getCoreImpl
public EmptyHandling getCoreImpl()
-
-