diff options
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r-- | src/org/traccar/helper/NamedParameterStatement.java | 12 |
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); + } + } + } + } |