aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-08 18:27:33 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-10-08 18:27:33 +1300
commitccd10d6ee510c72b583fae8e302ed6c44574d5b1 (patch)
treea9427c6938552e0ba6ed53d3097902dd79cd1787 /src/org/traccar/database/DataManager.java
parent3c5293cd078149a81cfdd21878e7731d56b2830c (diff)
downloadtrackermap-server-ccd10d6ee510c72b583fae8e302ed6c44574d5b1.tar.gz
trackermap-server-ccd10d6ee510c72b583fae8e302ed6c44574d5b1.tar.bz2
trackermap-server-ccd10d6ee510c72b583fae8e302ed6c44574d5b1.zip
Implement statistics API call
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r--src/org/traccar/database/DataManager.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 6718bda83..58d16d7f5 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -474,8 +474,10 @@ public class DataManager {
.executeUpdate();
}
- public Collection<Statistics> getStatistics() throws SQLException {
+ public Collection<Statistics> getStatistics(Date from, Date to) throws SQLException {
return QueryBuilder.create(dataSource, getQuery("database.selectStatistics"))
+ .setDate("from", from)
+ .setDate("to", to)
.executeQuery(Statistics.class);
}