]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/database/GigiPreparedStatement.java
add: internal api for password reset (with assurance)
[gigi.git] / src / org / cacert / gigi / database / GigiPreparedStatement.java
index 81e5f4e31aa27004efb9df0468b1a2b31784b516..6d967648e9695a0c0e8781c95888b571904a4bed 100644 (file)
@@ -8,7 +8,7 @@ import java.sql.Timestamp;
 
 public class GigiPreparedStatement {
 
-    PreparedStatement target;
+    private PreparedStatement target;
 
     public GigiPreparedStatement(PreparedStatement preparedStatement) {
         target = preparedStatement;
@@ -23,9 +23,12 @@ public class GigiPreparedStatement {
         }
     }
 
-    public int executeUpdate() {
+    public void executeUpdate() {
         try {
-            return target.executeUpdate();
+            int updated = target.executeUpdate();
+            if (updated != 1) {
+                throw new Error("FATAL: multiple or no data updated: " + updated);
+            }
         } catch (SQLException e) {
             handleSQL(e);
             throw new Error(e);
@@ -103,4 +106,5 @@ public class GigiPreparedStatement {
         // TODO Auto-generated method stub
 
     }
+
 }