@Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface BindList
Iterable or array/varargs argument, and defines a named attribute as a
comma-separated list of each bound parameter name. Common use cases:
@SqlQuery("select * from things where id in (<ids>)")
List<Thing> getThings(@BindList int... ids)
@SqlQuery("insert into things (<columnNames>) values (<values>)")
void insertThings(@DefineList List<String> columnNames, @BindList List<Object> values)
Throws IllegalArgumentException if the argument is not an array or Iterable. How null and empty collections are handled can be configured with onEmpty:EmptyHandling - throws IllegalArgumentException by default.
| Modifier and Type | Optional Element and Description |
|---|---|
BindList.EmptyHandling |
onEmpty |
String |
value
The attribute name to define.
|
public abstract String value
public abstract BindList.EmptyHandling onEmpty
Copyright © 2019. All rights reserved.