diff options
author | Anton Tananaev <anton@traccar.org> | 2023-04-23 08:29:22 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-04-23 08:29:22 -0700 |
commit | 30bafaed42e74863c5ca68a33c87f39d1e2de93d (patch) | |
tree | 0e5e6cf980b8f162680233cecfd854f87092216f /src/main/java/org/traccar/model | |
parent | c2637180549e69fc302f91f4685036e2697ae7bf (diff) | |
download | trackermap-server-30bafaed42e74863c5ca68a33c87f39d1e2de93d.tar.gz trackermap-server-30bafaed42e74863c5ca68a33c87f39d1e2de93d.tar.bz2 trackermap-server-30bafaed42e74863c5ca68a33c87f39d1e2de93d.zip |
Move geofenceIds to position
Diffstat (limited to 'src/main/java/org/traccar/model')
-rw-r--r-- | src/main/java/org/traccar/model/Device.java | 21 | ||||
-rw-r--r-- | src/main/java/org/traccar/model/Position.java | 16 |
2 files changed, 18 insertions, 19 deletions
diff --git a/src/main/java/org/traccar/model/Device.java b/src/main/java/org/traccar/model/Device.java index b8c87921d..b7cffac49 100644 --- a/src/main/java/org/traccar/model/Device.java +++ b/src/main/java/org/traccar/model/Device.java @@ -15,14 +15,12 @@ */ package org.traccar.model; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - import com.fasterxml.jackson.annotation.JsonIgnore; import org.traccar.storage.QueryIgnore; import org.traccar.storage.StorageName; +import java.util.Date; + @StorageName("tc_devices") public class Device extends GroupedModel implements Disableable { @@ -83,21 +81,6 @@ public class Device extends GroupedModel implements Disableable { this.positionId = positionId; } - private List<Long> geofenceIds; - - @QueryIgnore - public List<Long> getGeofenceIds() { - return geofenceIds; - } - - public void setGeofenceIds(List<? extends Number> geofenceIds) { - if (geofenceIds != null) { - this.geofenceIds = geofenceIds.stream().map(Number::longValue).collect(Collectors.toList()); - } else { - this.geofenceIds = null; - } - } - private String phone; public String getPhone() { diff --git a/src/main/java/org/traccar/model/Position.java b/src/main/java/org/traccar/model/Position.java index 2bd71f383..3ed340703 100644 --- a/src/main/java/org/traccar/model/Position.java +++ b/src/main/java/org/traccar/model/Position.java @@ -16,6 +16,8 @@ package org.traccar.model; import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; import com.fasterxml.jackson.annotation.JsonIgnore; import org.traccar.storage.QueryIgnore; @@ -309,6 +311,20 @@ public class Position extends Message { this.network = network; } + private List<Long> geofenceIds; + + public List<Long> getGeofenceIds() { + return geofenceIds; + } + + public void setGeofenceIds(List<? extends Number> geofenceIds) { + if (geofenceIds != null) { + this.geofenceIds = geofenceIds.stream().map(Number::longValue).collect(Collectors.toList()); + } else { + this.geofenceIds = null; + } + } + @JsonIgnore @QueryIgnore @Override |