diff options
author | Abyss777 <abyss@fox5.ru> | 2017-07-31 14:08:36 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-07-31 15:17:59 +0500 |
commit | ae76cbf971bfc9e47ef21e87606dacc7c0e3ddc6 (patch) | |
tree | ad0679fac893b5000f1abfaeee9f4433b3596374 /src/org/traccar/model/Device.java | |
parent | d3021c9ae11b177fe05b79e98f1e560e8c3cbaf5 (diff) | |
download | trackermap-server-ae76cbf971bfc9e47ef21e87606dacc7c0e3ddc6.tar.gz trackermap-server-ae76cbf971bfc9e47ef21e87606dacc7c0e3ddc6.tar.bz2 trackermap-server-ae76cbf971bfc9e47ef21e87606dacc7c0e3ddc6.zip |
Implement SQL requests construction
Diffstat (limited to 'src/org/traccar/model/Device.java')
-rw-r--r-- | src/org/traccar/model/Device.java | 7 |
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..cd5dd12c4 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.QueryAdditional; +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; + @QueryAdditional 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; } |