Batch updates against single database objects with annotated methods

You can run batch updates against single database objects by using annotated methods.

As with single updates, you specify an SQL statement in an @Update annotation on a method. However, you can pass to the method a single input parameter only. pureQuery treats each input parameter as a vertical collection of generic objects. Each element of the collection provides the parameters for one run of the SQL statement. You can use these types of collections: a Array object, an Iterator, or a class that implements the java.lang.Iterable interface. The number of generic objects in the collection determines the number of times that pureQuery runs the SQL statement.

pureQuery returns an integer array of update counts.

The annotated methods that you use for batch updates have the following signatures, with <T> being a scalar type, bean type, or Map<String, Object>:

<T> int[] <annotatedMethod> (Iterable<T> parameters);  
<T> int[] <annotatedMethod> (Iterator<T> parameters);  
<T> int[] <annotatedMethod> (T[] parameters);

Feedback