From 6a26740a4e74b2a627ad2de4b764a0c7dfdf6ca2 Mon Sep 17 00:00:00 2001 From: Jed Date: Mon, 8 Sep 2014 19:14:20 +0800 Subject: Updated TrackerEventHandler to only trigger UpdateLatestPosition on the last record processed and pass the position object to the function Added database property to Device class Updated DatabaseDataManager to allow the use of placeholder _database_ in queries --- test/org/traccar/helper/TestDataManager.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test/org') diff --git a/test/org/traccar/helper/TestDataManager.java b/test/org/traccar/helper/TestDataManager.java index 8503791e7..000b7196d 100644 --- a/test/org/traccar/helper/TestDataManager.java +++ b/test/org/traccar/helper/TestDataManager.java @@ -19,10 +19,17 @@ public class TestDataManager implements DataManager { return device; } @Override + public Device getDeviceById(Long id) { + Device device = new Device(); + device.setId(new Long(1)); + device.setImei("123456789012345"); + return device; + } + @Override public Long addPosition(Position position) { return null; } @Override - public void updateLatestPosition(Long deviceId, Long positionId) throws Exception { + public void updateLatestPosition(Position position, Long positionId) throws Exception { } } -- cgit v1.2.3 From 41e46eb9f51a16ab39f1a20ba81cdf573c06c86f Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 9 Sep 2014 13:49:37 +0800 Subject: Removed Other changes to prepare for pull request --- src/org/traccar/model/DataManager.java | 1 - src/org/traccar/model/Device.java | 13 ------------- test/org/traccar/helper/TestDataManager.java | 7 ------- 3 files changed, 21 deletions(-) (limited to 'test/org') diff --git a/src/org/traccar/model/DataManager.java b/src/org/traccar/model/DataManager.java index 7228409f1..f0bfdb50d 100644 --- a/src/org/traccar/model/DataManager.java +++ b/src/org/traccar/model/DataManager.java @@ -27,7 +27,6 @@ public interface DataManager { */ public List getDevices() throws Exception; public Device getDeviceByImei(String imei) throws Exception; - public Device getDeviceById(Long id) throws Exception; /** * Manage positions diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java index 8c8c74e28..1276216fc 100644 --- a/src/org/traccar/model/Device.java +++ b/src/org/traccar/model/Device.java @@ -72,17 +72,4 @@ public class Device { this.uniqueId = uniqueId; } - /** - * Database (for multi-database systems) - */ - private String database; - - public String getDatabase() { - return database; - } - - public void setDatabase(String database) { - this.database = database; - } - } diff --git a/test/org/traccar/helper/TestDataManager.java b/test/org/traccar/helper/TestDataManager.java index 000b7196d..9e8147b05 100644 --- a/test/org/traccar/helper/TestDataManager.java +++ b/test/org/traccar/helper/TestDataManager.java @@ -19,13 +19,6 @@ public class TestDataManager implements DataManager { return device; } @Override - public Device getDeviceById(Long id) { - Device device = new Device(); - device.setId(new Long(1)); - device.setImei("123456789012345"); - return device; - } - @Override public Long addPosition(Position position) { return null; } -- cgit v1.2.3