diff options
author | Gábor Somogyi <gabor.g.somogyi@gmail.com> | 2016-04-27 22:22:08 +0200 |
---|---|---|
committer | Gábor Somogyi <gabor.g.somogyi@gmail.com> | 2016-04-27 22:34:17 +0200 |
commit | bf68718e05f811ffeb2b4b57acab56dca3e7de56 (patch) | |
tree | 5853e81ae5d08e996d1600504027c7a870202643 /src/org/traccar/database | |
parent | 44f026f881efa6207ab79fb5bada20ab67f018a0 (diff) | |
download | trackermap-server-bf68718e05f811ffeb2b4b57acab56dca3e7de56.tar.gz trackermap-server-bf68718e05f811ffeb2b4b57acab56dca3e7de56.tar.bz2 trackermap-server-bf68718e05f811ffeb2b4b57acab56dca3e7de56.zip |
Command framework ugly hack version
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r-- | src/org/traccar/database/DataManager.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index eb0be9274..3dba215f6 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -472,6 +472,12 @@ public class DataManager implements IdentityManager { .executeQuery(Position.class); } + public Position getLatestPosition(long deviceId) throws SQLException { + return QueryBuilder.create(dataSource, getQuery("database.selectLatestPosition")) + .setLong("deviceId", deviceId) + .executeQuerySingle(Position.class); + } + public Server getServer() throws SQLException { return QueryBuilder.create(dataSource, getQuery("database.selectServers")) .executeQuerySingle(Server.class); @@ -482,5 +488,4 @@ public class DataManager implements IdentityManager { .setObject(server) .executeUpdate(); } - } |