aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
authorwilliamchitto <williamchitto@gmail.com>2012-07-31 08:08:53 -0300
committerwilliamchitto <williamchitto@gmail.com>2012-07-31 08:08:53 -0300
commitf5e305c4ea89210a2e4daffa4e947acdc440fbe7 (patch)
treeebc542944483e95c9b7374217690fc7bba38ff33 /src/org/traccar/model
parentd9c99fafa2e4d581f473029144aec495cb94bb62 (diff)
downloadtrackermap-server-f5e305c4ea89210a2e4daffa4e947acdc440fbe7.tar.gz
trackermap-server-f5e305c4ea89210a2e4daffa4e947acdc440fbe7.tar.bz2
trackermap-server-f5e305c4ea89210a2e4daffa4e947acdc440fbe7.zip
adicionando classes de testes
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/DatabaseDataManager.java2
-rw-r--r--src/org/traccar/model/Position.java12
2 files changed, 14 insertions, 0 deletions
diff --git a/src/org/traccar/model/DatabaseDataManager.java b/src/org/traccar/model/DatabaseDataManager.java
index 384d87828..2207d272b 100644
--- a/src/org/traccar/model/DatabaseDataManager.java
+++ b/src/org/traccar/model/DatabaseDataManager.java
@@ -210,6 +210,7 @@ public class DatabaseDataManager implements DataManager {
position.setSpeed(result.getDouble("speed"));
position.setCourse(result.getDouble("course"));
position.setPower(result.getDouble("power"));
+ position.setMode(result.getInt("mode"));
positionList.add(position);
}
@@ -229,6 +230,7 @@ public class DatabaseDataManager implements DataManager {
queryAddPosition.setDouble("speed", position.getSpeed());
queryAddPosition.setDouble("course", position.getCourse());
queryAddPosition.setDouble("power", position.getPower());
+ queryAddPosition.setInt("mode", position.getMode());
queryAddPosition.setString("address", position.getAddress());
queryAddPosition.setString("extended_info", position.getExtendedInfo());
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index b408dbbf2..0d04f4d49 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -151,6 +151,18 @@ public class Position {
public void setPower(Double power) {
this.power = power;
}
+ /**
+ * Mode / 1 - Parking | 2 - Driving
+ */
+ private int mode;
+
+ public int getMode() {
+ return mode;
+ }
+
+ public void setMode(int mode) {
+ this.mode = mode;
+ }
/**
* Address