From a1f2a34090f842f597987666e91d2d54c718c1b7 Mon Sep 17 00:00:00 2001 From: mdb Date: Thu, 13 Apr 2006 18:40:31 +0000 Subject: [PATCH] Return the number of rows modified by an update. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1823 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/java/com/samskivert/jdbc/JORARepository.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/java/com/samskivert/jdbc/JORARepository.java b/src/java/com/samskivert/jdbc/JORARepository.java index 347fcf70..ab5d0add 100644 --- a/src/java/com/samskivert/jdbc/JORARepository.java +++ b/src/java/com/samskivert/jdbc/JORARepository.java @@ -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 void update (final Table table, final T object) + protected int update (final Table table, final T object) throws PersistenceException { - executeUpdate(new Operation() { - public Object invoke (Connection conn, DatabaseLiaison liaison) + return executeUpdate(new Operation() { + public Integer invoke (Connection conn, DatabaseLiaison liaison) throws SQLException, PersistenceException { - table.update(object); - return null; + return table.update(object); } }); }