aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper/NamedParameterStatement.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-04-02 20:03:08 +0000
committerAnton Tananaev <anton.tananaev@gmail.com>2012-04-02 20:03:08 +0000
commit96beee5caf560e4b441d2d9e2ebba434c70f5f79 (patch)
treeeddcf0977b73ad716fa86dfa33ec00b7fe846847 /src/org/traccar/helper/NamedParameterStatement.java
parent932111062285ffdbb8f22a9c25e4946c893a6e71 (diff)
downloadtrackermap-server-96beee5caf560e4b441d2d9e2ebba434c70f5f79.tar.gz
trackermap-server-96beee5caf560e4b441d2d9e2ebba434c70f5f79.tar.bz2
trackermap-server-96beee5caf560e4b441d2d9e2ebba434c70f5f79.zip
Diffstat (limited to 'src/org/traccar/helper/NamedParameterStatement.java')
-rw-r--r--src/org/traccar/helper/NamedParameterStatement.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/helper/NamedParameterStatement.java b/src/org/traccar/helper/NamedParameterStatement.java
index 0e84e9827..c71f7dd05 100644
--- a/src/org/traccar/helper/NamedParameterStatement.java
+++ b/src/org/traccar/helper/NamedParameterStatement.java
@@ -209,4 +209,16 @@ public class NamedParameterStatement {
}
}
+ public void setString(String name, String value) throws SQLException {
+
+ List indexList = (List) indexMap.get(name);
+ if (indexList != null) for (Object index: indexList) {
+ if (value != null) {
+ statement.setString((Integer) index, value);
+ } else {
+ statement.setNull((Integer) index, Types.VARCHAR);
+ }
+ }
+ }
+
}