aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r--src/org/traccar/database/DataManager.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index afa8b1677..8be53ad7b 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -280,6 +280,12 @@ public class DataManager {
.executeQuery(Position.class);
}
+ public Position getPosition(long positionId) throws SQLException {
+ return QueryBuilder.create(dataSource, getQuery("database.selectPosition"))
+ .setLong("id", positionId)
+ .executeQuerySingle(Position.class);
+ }
+
public void addPosition(Position position) throws SQLException {
position.setId(QueryBuilder.create(dataSource, getQuery("database.insertPosition"), true)
.setDate("now", new Date())