aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/ObjectConverter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database/ObjectConverter.java')
-rw-r--r--src/org/traccar/database/ObjectConverter.java34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/org/traccar/database/ObjectConverter.java b/src/org/traccar/database/ObjectConverter.java
index 7852c88f4..5a7f7083a 100644
--- a/src/org/traccar/database/ObjectConverter.java
+++ b/src/org/traccar/database/ObjectConverter.java
@@ -15,9 +15,6 @@
*/
package org.traccar.database;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -45,16 +42,6 @@ public class ObjectConverter {
return array.build();
}
- private static boolean hasColumn(ResultSet resultSet, String columnName) throws SQLException {
- ResultSetMetaData metaData = resultSet.getMetaData();
- for (int i = 1; i <= metaData.getColumnCount(); i++) {
- if (columnName.equalsIgnoreCase(metaData.getColumnName(i))) {
- return true;
- }
- }
- return false;
- }
-
public static String getString(JsonObject json, String key) {
if (json.containsKey(key)) {
return json.getString(key);
@@ -62,13 +49,6 @@ public class ObjectConverter {
return null;
}
- public static String getString(ResultSet record, String key) throws SQLException {
- if (hasColumn(record, key)) {
- return record.getString(key);
- }
- return null;
- }
-
public static void putString(JsonObjectBuilder json, String key, String value) {
if (value != null) {
json.add(key, value);
@@ -82,13 +62,6 @@ public class ObjectConverter {
return 0;
}
- public static long getLong(ResultSet record, String key) throws SQLException {
- if (hasColumn(record, key)) {
- return record.getLong(key);
- }
- return 0;
- }
-
public static void putLong(JsonObjectBuilder json, String key, long value) {
json.add(key, value);
}
@@ -104,13 +77,6 @@ public class ObjectConverter {
return null;
}
- public static Date getDate(ResultSet record, String key) throws SQLException {
- if (hasColumn(record, key)) {
- return record.getDate(key);
- }
- return null;
- }
-
public static void putDate(JsonObjectBuilder json, String key, Date value) {
if (value != null) {
json.add(key, dateFormat.format(value));