aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r--src/org/traccar/database/DataManager.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 9633ada58..dd611d975 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -15,12 +15,10 @@
*/
package org.traccar.database;
+import com.mchange.v2.c3p0.ComboPooledDataSource;
import java.io.File;
-import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLClassLoader;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
@@ -32,10 +30,8 @@ import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-
import javax.naming.InitialContext;
import javax.sql.DataSource;
-
import org.traccar.Context;
import org.traccar.helper.DriverDelegate;
import org.traccar.helper.Hashing;
@@ -47,8 +43,6 @@ import org.traccar.model.Position;
import org.traccar.model.Server;
import org.traccar.model.User;
-import com.mchange.v2.c3p0.ComboPooledDataSource;
-
public class DataManager {
private static final long DEFAULT_REFRESH_DELAY = 300;
@@ -143,6 +137,10 @@ public class DataManager {
public void updateLatestPosition(Position position) throws SQLException {
QueryBuilder.create(dataSource, properties.getProperty("database.updateLatestPosition"))
.setObject(position)
+ .setDate("time", position.getFixTime()) // tmp
+ .setLong("device_id", position.getDeviceId()) // tmp
+ .setLong("power", 0) // tmp
+ .setString("extended_info", position.getOther()) // tmp
.executeUpdate();
}