aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model/Device.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-08-01 16:21:35 +1200
committerGitHub <noreply@github.com>2017-08-01 16:21:35 +1200
commit06df08150504f86cc7e34c1ef90277c87ba55b99 (patch)
tree92caf0de95aa57185417433851a019529c2348a7 /src/org/traccar/model/Device.java
parentbf8a7aac4921d17c086e6d35e44a1bc2e37888b8 (diff)
parent0c15d55ada982b404c9863a8409bb4e91aa59ace (diff)
downloadtrackermap-server-06df08150504f86cc7e34c1ef90277c87ba55b99.tar.gz
trackermap-server-06df08150504f86cc7e34c1ef90277c87ba55b99.tar.bz2
trackermap-server-06df08150504f86cc7e34c1ef90277c87ba55b99.zip
Merge pull request #3402 from Abyss777/construct_requests
Implement SQL requests construction
Diffstat (limited to 'src/org/traccar/model/Device.java')
-rw-r--r--src/org/traccar/model/Device.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java
index 6a13c2b77..c8a28404c 100644
--- a/src/org/traccar/model/Device.java
+++ b/src/org/traccar/model/Device.java
@@ -18,6 +18,9 @@ package org.traccar.model;
import java.util.Date;
import java.util.List;
+import org.traccar.database.QueryExtended;
+import org.traccar.database.QueryIgnore;
+
public class Device extends ExtendedModel {
private String name;
@@ -46,6 +49,7 @@ public class Device extends ExtendedModel {
private String status;
+ @QueryIgnore
public String getStatus() {
return status != null ? status : STATUS_OFFLINE;
}
@@ -56,6 +60,7 @@ public class Device extends ExtendedModel {
private Date lastUpdate;
+ @QueryExtended
public Date getLastUpdate() {
if (lastUpdate != null) {
return new Date(lastUpdate.getTime());
@@ -74,6 +79,7 @@ public class Device extends ExtendedModel {
private long positionId;
+ @QueryIgnore
public long getPositionId() {
return positionId;
}
@@ -94,6 +100,7 @@ public class Device extends ExtendedModel {
private List<Long> geofenceIds;
+ @QueryIgnore
public List<Long> getGeofenceIds() {
return geofenceIds;
}