aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/model/DataManager.java4
-rw-r--r--src/org/traccar/model/DatabaseDataManager.java10
-rw-r--r--src/org/traccar/model/Device.java26
3 files changed, 39 insertions, 1 deletions
diff --git a/src/org/traccar/model/DataManager.java b/src/org/traccar/model/DataManager.java
index 70cf63380..423c540da 100644
--- a/src/org/traccar/model/DataManager.java
+++ b/src/org/traccar/model/DataManager.java
@@ -30,11 +30,13 @@ public interface DataManager {
public void updateDevice(Device device) throws Exception;
public void removeDevice(Device device) throws Exception;
public Device getDeviceByImei(String imei) throws Exception;
+ public Device getDeviceByPhoneNumber(String phoneNumber) throws Exception;
+ public Device getDeviceByUniqueId(String uniqueId) throws Exception;
/**
* Manage positions
*/
- public List<Position> getPositions(Long deviceId) throws Exception;
public void addPosition(Position position) throws Exception;
+ public List<Position> getPositions(Long deviceId) throws Exception;
}
diff --git a/src/org/traccar/model/DatabaseDataManager.java b/src/org/traccar/model/DatabaseDataManager.java
index 733f0a0ec..8235a6170 100644
--- a/src/org/traccar/model/DatabaseDataManager.java
+++ b/src/org/traccar/model/DatabaseDataManager.java
@@ -182,6 +182,16 @@ public class DatabaseDataManager implements DataManager {
return (Device) devices.get(imei);
}
+ public Device getDeviceByPhoneNumber(String phoneNumber) {
+ // TODO: implement getDeviceByPhoneNumber
+ return null;
+ }
+
+ public Device getDeviceByUniqueId(String uniqueId) {
+ // TODO: implement getDeviceByUniqueId
+ return null;
+ }
+
public synchronized List<Position> getPositions(Long deviceId) throws SQLException {
List<Position> positionList = new LinkedList();
diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java
index 4b911d805..1276216fc 100644
--- a/src/org/traccar/model/Device.java
+++ b/src/org/traccar/model/Device.java
@@ -46,4 +46,30 @@ public class Device {
this.imei = imei;
}
+ /**
+ * Phone number
+ */
+ private String phoneNumber;
+
+ public String getPhoneNumber() {
+ return phoneNumber;
+ }
+
+ public void setPhoneNumber(String phoneNumber) {
+ this.phoneNumber = phoneNumber;
+ }
+
+ /**
+ * Unique id (for some trackers)
+ */
+ private String uniqueId;
+
+ public String getUniqueId() {
+ return uniqueId;
+ }
+
+ public void setUniqueId(String uniqueId) {
+ this.uniqueId = uniqueId;
+ }
+
}