I've got the fever, I can't stop making the repositories more convenient.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1654 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2005-06-08 23:14:32 +00:00
parent 57b6bd257d
commit 1cab976a7d
@@ -198,26 +198,26 @@ public class SimpleRepository extends Repository
}
/**
* Executes the supplied update query in this repository, ignoring the
* return value.
* Executes the supplied update query in this repository, returning
* the number of rows modified.
*/
protected void update (final String query)
protected int update (final String query)
throws PersistenceException
{
execute(new Operation() {
Integer rv = (Integer)execute(new Operation() {
public Object invoke (Connection conn, DatabaseLiaison liaison)
throws SQLException, PersistenceException
{
Statement stmt = null;
try {
stmt = conn.createStatement();
stmt.executeUpdate(query);
return new Integer(stmt.executeUpdate(query));
} finally {
JDBCUtil.close(stmt);
}
return null;
}
});
return rv.intValue();
}
/**