aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoshial <soshial@gmail.com>2021-09-13 08:21:35 +0200
committersoshial <soshial@gmail.com>2021-09-13 08:26:45 +0200
commitfd91d6bbb189b091799708a4d3f4e9d9ca114763 (patch)
treecfc4d03916138505f10c0f590ffe8b72de548fde
parent7a3b106dfc28a6254825b8d664db8181f4bd19f1 (diff)
downloadtraccar-server-fd91d6bbb189b091799708a4d3f4e9d9ca114763.tar.gz
traccar-server-fd91d6bbb189b091799708a4d3f4e9d9ca114763.tar.bz2
traccar-server-fd91d6bbb189b091799708a4d3f4e9d9ca114763.zip
remove comments
-rw-r--r--setup/default.xml4
-rw-r--r--src/main/java/org/traccar/database/DataManager.java12
-rw-r--r--src/main/java/org/traccar/handler/FilterHandler.java2
3 files changed, 0 insertions, 18 deletions
diff --git a/setup/default.xml b/setup/default.xml
index 7ed3e35b2..419eaef45 100644
--- a/setup/default.xml
+++ b/setup/default.xml
@@ -48,10 +48,6 @@
SELECT * FROM tc_positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime
</entry>
- <entry key='database.selectPositionByTime'>
- SELECT * FROM tc_positions WHERE deviceId = :deviceId AND fixTime = :time LIMIT 1
- </entry>
-
<entry key='database.selectPrecedingPosition'>
SELECT * FROM tc_positions WHERE deviceId = :deviceId AND fixTime lte :time ORDER BY fixTime DESC LIMIT 1
</entry>
diff --git a/src/main/java/org/traccar/database/DataManager.java b/src/main/java/org/traccar/database/DataManager.java
index d8401774e..15c67cb74 100644
--- a/src/main/java/org/traccar/database/DataManager.java
+++ b/src/main/java/org/traccar/database/DataManager.java
@@ -328,18 +328,6 @@ public class DataManager {
.executeQuery(Position.class);
}
- public Position getPositionByTime(long deviceId, Date date) throws SQLException {
- Collection<Position> positions = QueryBuilder.create(dataSource, getQuery("database.selectPositionByTime"))
- .setLong("deviceId", deviceId)
- .setDate("time", date)
- .executeQuery(Position.class);
- if (positions.isEmpty()) {
- return null;
- } else {
- return positions.iterator().next();
- }
- }
-
public Position getPrecedingPosition(long deviceId, Date date) throws SQLException {
Collection<Position> positions = QueryBuilder.create(dataSource, getQuery("database.selectPrecedingPosition"))
.setLong("deviceId", deviceId)
diff --git a/src/main/java/org/traccar/handler/FilterHandler.java b/src/main/java/org/traccar/handler/FilterHandler.java
index 5287a7639..6331ff773 100644
--- a/src/main/java/org/traccar/handler/FilterHandler.java
+++ b/src/main/java/org/traccar/handler/FilterHandler.java
@@ -153,7 +153,6 @@ public class FilterHandler extends BaseDataHandler {
StringBuilder filterType = new StringBuilder();
- // general filtering
if (filterInvalid(position)) {
filterType.append("Invalid ");
}
@@ -173,7 +172,6 @@ public class FilterHandler extends BaseDataHandler {
filterType.append("Static ");
}
- // relative filtering
long deviceId = position.getDeviceId();
if (filterDuplicate || filterDistance > 0 || filterMaxSpeed > 0 || filterMinPeriod > 0) {
Position preceding = null;