aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/reports/model')
-rw-r--r--src/org/traccar/reports/model/BaseReport.java16
-rw-r--r--src/org/traccar/reports/model/DeviceReport.java6
-rw-r--r--src/org/traccar/reports/model/SummaryReport.java14
-rw-r--r--src/org/traccar/reports/model/TripReport.java24
4 files changed, 57 insertions, 3 deletions
diff --git a/src/org/traccar/reports/model/BaseReport.java b/src/org/traccar/reports/model/BaseReport.java
index c33b9a8dd..13c67cbb7 100644
--- a/src/org/traccar/reports/model/BaseReport.java
+++ b/src/org/traccar/reports/model/BaseReport.java
@@ -19,25 +19,31 @@ package org.traccar.reports.model;
public class BaseReport {
private long deviceId;
+
public long getDeviceId() {
return deviceId;
}
+
public void setDeviceId(long deviceId) {
this.deviceId = deviceId;
}
private String deviceName;
+
public String getDeviceName() {
return deviceName;
}
+
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
- private double distance; // meters
+ private double distance;
+
public double getDistance() {
return distance;
}
+
public void setDistance(double distance) {
this.distance = distance;
}
@@ -46,18 +52,22 @@ public class BaseReport {
this.distance += distance;
}
- private double averageSpeed; // knots
+ private double averageSpeed;
+
public double getAverageSpeed() {
return averageSpeed;
}
+
public void setAverageSpeed(Double averageSpeed) {
this.averageSpeed = averageSpeed;
}
- private double maxSpeed; // knots
+ private double maxSpeed;
+
public double getMaxSpeed() {
return maxSpeed;
}
+
public void setMaxSpeed(double maxSpeed) {
if (maxSpeed > this.maxSpeed) {
this.maxSpeed = maxSpeed;
diff --git a/src/org/traccar/reports/model/DeviceReport.java b/src/org/traccar/reports/model/DeviceReport.java
index 58caa809b..932753d15 100644
--- a/src/org/traccar/reports/model/DeviceReport.java
+++ b/src/org/traccar/reports/model/DeviceReport.java
@@ -23,25 +23,31 @@ import java.util.List;
public class DeviceReport {
private String deviceName;
+
public String getDeviceName() {
return deviceName;
}
+
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
private String groupName = "";
+
public String getGroupName() {
return groupName;
}
+
public void setGroupName(String groupName) {
this.groupName = groupName;
}
private List<?> objects;
+
public Collection<?> getObjects() {
return objects;
}
+
public void setObjects(Collection<?> objects) {
this.objects = new ArrayList<>(objects);
}
diff --git a/src/org/traccar/reports/model/SummaryReport.java b/src/org/traccar/reports/model/SummaryReport.java
index 2d650381d..85ba6bc54 100644
--- a/src/org/traccar/reports/model/SummaryReport.java
+++ b/src/org/traccar/reports/model/SummaryReport.java
@@ -19,13 +19,27 @@ package org.traccar.reports.model;
public class SummaryReport extends BaseReport {
private long engineHours; // milliseconds
+
public long getEngineHours() {
return engineHours;
}
+
public void setEngineHours(long engineHours) {
this.engineHours = engineHours;
}
+
public void addEngineHours(long engineHours) {
this.engineHours += engineHours;
}
+
+ private String spentFuel;
+
+ public String getSpentFuel() {
+ return spentFuel;
+ }
+
+ public void setSpentFuel(String spentFuel) {
+ this.spentFuel = spentFuel;
+ }
+
}
diff --git a/src/org/traccar/reports/model/TripReport.java b/src/org/traccar/reports/model/TripReport.java
index b28793e44..fce805ad6 100644
--- a/src/org/traccar/reports/model/TripReport.java
+++ b/src/org/traccar/reports/model/TripReport.java
@@ -21,54 +21,67 @@ import java.util.Date;
public class TripReport extends BaseReport {
private long startPositionId;
+
public long getStartPositionId() {
return startPositionId;
}
+
public void setStartPositionId(long startPositionId) {
this.startPositionId = startPositionId;
}
private long endPositionId;
+
public long getEndPositionId() {
return endPositionId;
}
+
public void setEndPositionId(long endPositionId) {
this.endPositionId = endPositionId;
}
private double startLat;
+
public double getStartLat() {
return startLat;
}
+
public void setStartLat(double startLat) {
this.startLat = startLat;
}
private double startLon;
+
public double getStartLon() {
return startLon;
}
+
public void setStartLon(double startLon) {
this.startLon = startLon;
}
private double endLat;
+
public double getEndLat() {
return endLat;
}
+
public void setEndLat(double endLat) {
this.endLat = endLat;
}
private double endLon;
+
public double getEndLon() {
return endLon;
}
+
public void setEndLon(double endLon) {
this.endLon = endLon;
}
private Date startTime;
+
public Date getStartTime() {
if (startTime != null) {
return new Date(startTime.getTime());
@@ -76,6 +89,7 @@ public class TripReport extends BaseReport {
return null;
}
}
+
public void setStartTime(Date startTime) {
if (startTime != null) {
this.startTime = new Date(startTime.getTime());
@@ -85,14 +99,17 @@ public class TripReport extends BaseReport {
}
private String startAddress;
+
public String getStartAddress() {
return startAddress;
}
+
public void setStartAddress(String address) {
this.startAddress = address;
}
private Date endTime;
+
public Date getEndTime() {
if (endTime != null) {
return new Date(endTime.getTime());
@@ -100,6 +117,7 @@ public class TripReport extends BaseReport {
return null;
}
}
+
public void setEndTime(Date endTime) {
if (endTime != null) {
this.endTime = new Date(endTime.getTime());
@@ -109,25 +127,31 @@ public class TripReport extends BaseReport {
}
private String endAddress;
+
public String getEndAddress() {
return endAddress;
}
+
public void setEndAddress(String address) {
this.endAddress = address;
}
private long duration;
+
public long getDuration() {
return duration;
}
+
public void setDuration(long duration) {
this.duration = duration;
}
private String spentFuel;
+
public String getSpentFuel() {
return spentFuel;
}
+
public void setSpentFuel(String spentFuel) {
this.spentFuel = spentFuel;
}