From 82909a81eb01cfd76f38fec7cccff5a5c87b5232 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 1 Oct 2016 15:50:09 +1300 Subject: Remove unused data manager methods (fix #2386) --- debug.xml | 10 ---------- setup/traccar.xml | 10 ---------- src/org/traccar/database/DataManager.java | 12 ------------ 3 files changed, 32 deletions(-) diff --git a/debug.xml b/debug.xml index 94e30c6b8..d01a25248 100644 --- a/debug.xml +++ b/debug.xml @@ -119,11 +119,6 @@ WHERE email = :email; - - SELECT * FROM users - WHERE id = :id; - - SELECT * FROM users; @@ -247,11 +242,6 @@ SELECT * FROM events WHERE deviceId = :deviceId AND type LIKE :type AND serverTime BETWEEN :from AND :to ORDER BY serverTime DESC; - - SELECT * FROM geofences - WHERE id = :id; - - SELECT * FROM geofences; diff --git a/setup/traccar.xml b/setup/traccar.xml index ccdc5b745..c13abb3e2 100644 --- a/setup/traccar.xml +++ b/setup/traccar.xml @@ -62,11 +62,6 @@ WHERE email = :email; - - SELECT * FROM users - WHERE id = :id; - - SELECT * FROM users; @@ -190,11 +185,6 @@ SELECT * FROM events WHERE deviceId = :deviceId AND type LIKE :type AND serverTime BETWEEN :from AND :to ORDER BY serverTime DESC; - - SELECT * FROM geofences - WHERE id = :id; - - SELECT * FROM geofences; diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index c58fe40a5..6718bda83 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -160,12 +160,6 @@ public class DataManager { .executeQuery(User.class); } - public User getUser(long userId) throws SQLException { - return QueryBuilder.create(dataSource, getQuery("database.selectUser")) - .setLong("id", userId) - .executeQuerySingle(User.class); - } - public void addUser(User user) throws SQLException { user.setId(QueryBuilder.create(dataSource, getQuery("database.insertUser"), true) .setObject(user) @@ -359,12 +353,6 @@ public class DataManager { .executeQuery(Geofence.class); } - public Geofence getGeofence(long geofenceId) throws SQLException { - return QueryBuilder.create(dataSource, getQuery("database.selectGeofences")) - .setLong("id", geofenceId) - .executeQuerySingle(Geofence.class); - } - public void addGeofence(Geofence geofence) throws SQLException { geofence.setId(QueryBuilder.create(dataSource, getQuery("database.insertGeofence"), true) .setObject(geofence) -- cgit v1.2.3