Return the number of rows modified by an update.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1823 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2006-04-13 18:40:31 +00:00
parent 790d0dd35f
commit a1f2a34090
@@ -76,15 +76,14 @@ public abstract class JORARepository extends SimpleRepository
* Updates the supplied object in the specified table. The table must
* be configured to store items of the supplied type.
*/
protected <T> void update (final Table<T> table, final T object)
protected <T> int update (final Table<T> table, final T object)
throws PersistenceException
{
executeUpdate(new Operation<Object>() {
public Object invoke (Connection conn, DatabaseLiaison liaison)
return executeUpdate(new Operation<Integer>() {
public Integer invoke (Connection conn, DatabaseLiaison liaison)
throws SQLException, PersistenceException
{
table.update(object);
return null;
return table.update(object);
}
});
}