diff options
author | Anton Tananaev <anton@traccar.org> | 2022-10-13 10:31:54 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-10-13 10:31:54 -0700 |
commit | 4c8e98ed409df6e12128591eb1d8d0cf0856deb7 (patch) | |
tree | 83da3517bb14977ab4809aecf3681b777785e83d /src/main/java/org/traccar/model/Device.java | |
parent | acedd28b8584a18022d9e2343558f9acbad1666f (diff) | |
download | trackermap-server-4c8e98ed409df6e12128591eb1d8d0cf0856deb7.tar.gz trackermap-server-4c8e98ed409df6e12128591eb1d8d0cf0856deb7.tar.bz2 trackermap-server-4c8e98ed409df6e12128591eb1d8d0cf0856deb7.zip |
Refactor database code (fix #4961)
Diffstat (limited to 'src/main/java/org/traccar/model/Device.java')
-rw-r--r-- | src/main/java/org/traccar/model/Device.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/model/Device.java b/src/main/java/org/traccar/model/Device.java index 147b0fd20..7728172cb 100644 --- a/src/main/java/org/traccar/model/Device.java +++ b/src/main/java/org/traccar/model/Device.java @@ -52,22 +52,22 @@ public class Device extends GroupedModel implements Disableable { private String status; + @QueryIgnore public String getStatus() { return status != null ? status : STATUS_OFFLINE; } - @QueryIgnore public void setStatus(String status) { this.status = status != null ? status.trim() : null; } private Date lastUpdate; + @QueryIgnore public Date getLastUpdate() { return this.lastUpdate; } - @QueryIgnore public void setLastUpdate(Date lastUpdate) { this.lastUpdate = lastUpdate; } @@ -79,18 +79,17 @@ public class Device extends GroupedModel implements Disableable { return positionId; } - @QueryIgnore public void setPositionId(long positionId) { this.positionId = positionId; } private List<Long> geofenceIds; + @QueryIgnore public List<Long> getGeofenceIds() { return geofenceIds; } - @QueryIgnore public void setGeofenceIds(List<? extends Number> geofenceIds) { if (geofenceIds != null) { this.geofenceIds = geofenceIds.stream().map(Number::longValue).collect(Collectors.toList()); |