Package org.jdbi.v3.sqlobject.customizer
Annotation Type BindBeanList
Binds each property for each value in the annotated
Iterable
or array/varargs argument,
and defines a named attribute as a comma-separated list of each bound parameter name.
Used to create query similar to:
select * from things where (id, name) in ((1,'abc'),(2,'def'),(3,'ghi'))
@SqlQuery("select * from things where (id, name) in (<keys>)") List<Thing> getThings(@BindBeanList(value = "keys", propertyNames = {"id", "name"}) ThingKey... thingKeys)
Throws IllegalArgumentException if the argument is not an array or Iterable.
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionString[]
The list of properties to invoke on each element in the argument -
Optional Element Summary
-
Element Details
-
propertyNames
String[] propertyNamesThe list of properties to invoke on each element in the argument- Returns:
- the property names
-
-
-
value
String valueThe 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:
- ""
-