aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
authorGábor Somogyi <gabor.g.somogyi@gmail.com>2016-04-27 22:22:08 +0200
committerGábor Somogyi <gabor.g.somogyi@gmail.com>2016-04-27 22:34:17 +0200
commitbf68718e05f811ffeb2b4b57acab56dca3e7de56 (patch)
tree5853e81ae5d08e996d1600504027c7a870202643 /src/org/traccar/database
parent44f026f881efa6207ab79fb5bada20ab67f018a0 (diff)
downloadtrackermap-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.java7
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();
}
-
}