Package org.jdbi.v3.sqlobject.customizer
Annotation Type BindMethodsList
-
@Retention(RUNTIME) @Target(PARAMETER) public @interface BindMethodsList
Binds each method for each value in the annotatedIterableor 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.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String[]methodNamesThe list of methods to invoke on each element in the argumentStringvalueThe attribute name to define.
-
-
-
Element Detail
-
value
String value
The attribute name to define. If omitted, the name of the annotated parameter is used. It is an error to omit the name when there is no parameter naming information in your class files.- Returns:
- the attribute name
- Default:
- ""
-
-
-
methodNames
String[] methodNames
The list of methods to invoke on each element in the argument- Returns:
- the method names
- Default:
- {}
-
-