diff artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java @ 145:c0d025df722d

Enable backend to delete users artifacts/trunk@1370 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 02 Mar 2011 17:47:20 +0000
parents 5369582d4fbf
children 967dc552455d
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java	Wed Mar 02 17:43:25 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java	Wed Mar 02 17:47:20 2011 +0000
@@ -822,7 +822,7 @@
         Connection        connection    = null;
         PreparedStatement stmnt_next_id = null;
         PreparedStatement stmnt_insert  = null;
-        ResultSet         res_id        = null;
+        ResultSet         result        = null;
 
         String identifier = newIdentifier();
 
@@ -835,13 +835,13 @@
                 stmnt_next_id = connection.prepareStatement(SQL_USERS_NEXT_ID);
                 stmnt_insert  = connection.prepareStatement(SQL_USERS_INSERT);
 
-                res_id = stmnt_next_id.executeQuery();
+                result = stmnt_next_id.executeQuery();
 
                 if (!res_id.next()) {
                     throw new RuntimeException("No id generated");
                 }
 
-                int id = res_id.getInt(1);
+                int id = result.getInt(1);
 
                 stmnt_insert.setInt(1, id);
                 stmnt_insert.setString(2, identifier);
@@ -873,8 +873,8 @@
             logger.error(sqle.getLocalizedMessage(), sqle);
         }
         finally {
-            if (res_id != null) {
-                try { res_id.close(); }
+            if (result != null) {
+                try { result.close(); }
                 catch (SQLException sqle) {}
             }
             if (stmnt_insert != null) {

http://dive4elements.wald.intevation.org