@Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface BindMethodsList
Iterable or array/varargs argument,
and defines a named attribute as a comma-separated list of each bound method name.
Used to create query similar to:
insert into things (id, name) values (1,'abc'),(2,'def'),(3,'ghi')
@SqlQuery("insert into things (id, name) values <items>")
List<Thing> saveThings(@BindMethodsList(value = "items", methodNames = {"getId", "getName"}) Thing... things)
Throws IllegalArgumentException if the argument is not an array or Iterable.
| Modifier and Type | Optional Element and Description |
|---|---|
String[] |
methodNames
The list of methods to invoke on each element in the argument
|
String |
value
The attribute name to define.
|
public abstract String value
public abstract String[] methodNames
Copyright © 2020. All rights reserved.