Mercurial > dive4elements > river
diff flys-aft/src/main/java/de/intevation/db/SymbolicStatement.java @ 4076:039413d7e394
Load gauges from both dbs.
flys-aft/trunk@3436 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 16 Dec 2011 11:26:12 +0000 |
parents | dbd0b3b1b8b8 |
children | aad1886ea226 |
line wrap: on
line diff
--- a/flys-aft/src/main/java/de/intevation/db/SymbolicStatement.java Wed Dec 14 17:53:15 2011 +0000 +++ b/flys-aft/src/main/java/de/intevation/db/SymbolicStatement.java Fri Dec 16 11:26:12 2011 +0000 @@ -45,7 +45,7 @@ } } - public void setInt(String key, int value) + public Instance setInt(String key, int value) throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); @@ -54,9 +54,11 @@ stmnt.setInt(p, value); } } + + return this; } - public void setString(String key, String value) + public Instance setString(String key, String value) throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); @@ -65,9 +67,10 @@ stmnt.setString(p, value); } } + return this; } - public void setObject(String key, Object value) + public Instance setObject(String key, Object value) throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); @@ -76,9 +79,10 @@ stmnt.setObject(p, value); } } + return this; } - public void setTimestamp(String key, Timestamp value) + public Instance setTimestamp(String key, Timestamp value) throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); @@ -87,9 +91,10 @@ stmnt.setTimestamp(p, value); } } + return this; } - public void setDouble(String key, int value) + public Instance setDouble(String key, int value) throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); @@ -98,9 +103,10 @@ stmnt.setDouble(p, value); } } + return this; } - public void setNull(String key, int sqlType) + public Instance setNull(String key, int sqlType) throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); @@ -109,16 +115,19 @@ stmnt.setNull(p, sqlType); } } + return this; } - public void set(Map<String, Object> map) throws SQLException { + public Instance set(Map<String, Object> map) throws SQLException { for (Map.Entry<String, Object> entry: map.entrySet()) { setObject(entry.getKey(), entry.getValue()); } + return this; } - public void clearParameters() throws SQLException { + public Instance clearParameters() throws SQLException { stmnt.clearParameters(); + return this; } public boolean execute() throws SQLException {