aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-20 16:46:17 +1300
committerGitHub <noreply@github.com>2016-10-20 16:46:17 +1300
commit504969d034dce57ebdc85800e051ee918024ef7f (patch)
treeaf3f19ac3bfd02274cc34de3fbb296302cd8631a /src/org/traccar/database/DataManager.java
parentf64840b9e85d4869c92e9f20a2f5043522ad4008 (diff)
parent45302036168fe3adf1d9d184cd68e92e15dd3b1f (diff)
downloadtrackermap-server-504969d034dce57ebdc85800e051ee918024ef7f.tar.gz
trackermap-server-504969d034dce57ebdc85800e051ee918024ef7f.tar.bz2
trackermap-server-504969d034dce57ebdc85800e051ee918024ef7f.zip
Merge pull request #2448 from Abyss777/export_excel
Implement export reports to excel
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r--src/org/traccar/database/DataManager.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 58d16d7f5..e98e1429c 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -20,7 +20,6 @@ import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.sql.SQLException;
-import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
@@ -332,22 +331,14 @@ public class DataManager {
.executeUpdate());
}
- public Collection<Event> getEvents(long deviceId, String type, Date from, Date to) throws SQLException {
+ public Collection<Event> getEvents(long deviceId, Date from, Date to) throws SQLException {
return QueryBuilder.create(dataSource, getQuery("database.selectEvents"))
.setLong("deviceId", deviceId)
- .setString("type", type)
.setDate("from", from)
.setDate("to", to)
.executeQuery(Event.class);
}
- public Collection<Event> getLastEvents(long deviceId, String type, int interval) throws SQLException {
- Calendar calendar = Calendar.getInstance();
- calendar.add(Calendar.SECOND, -interval);
- Date from = calendar.getTime();
- return getEvents(deviceId, type, from, new Date());
- }
-
public Collection<Geofence> getGeofences() throws SQLException {
return QueryBuilder.create(dataSource, getQuery("database.selectGeofencesAll"))
.executeQuery(Geofence.class);