Allow for "ResultSet"s as arguments of insert, update, delete, upsert

GWTORM defines a "ResulSet" interface, which extends
java.lang.Iterable but does not allow invoking the iterator()
method multiple times.

This patch adds a test to assert that implementations of this
interface (and specifically the ListResultSet class) can be used
as arguments for the JdbcAccess.insert, update, delete and upsert
method. The TestJdbcAccess reveals an issue with passing an instance
of ResultSet to the JdbcAccess.upsert method as this method may
invoke the iterator() method twice on the same Iterable. This
must be considered an issue as it prevents data read by the
com.google.gwtorm.client.Access.get() method from being processed
by the upsert() method.

Change-Id: I6ce625ed9476e1649600dc7eb5db4f77e9629607
Signed-off-by: Adrian Goerler <adrian.goerler@sap.com>
2 files changed