aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-13 15:34:19 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-13 15:34:19 +1200
commitbd4c32abced2bb654b64a2042668340167d6b191 (patch)
tree3a7102b47bc708fa1b76926c796ce63cb7a72bb4 /src/org/traccar/database
parenteddf517d19919bf1b21d8b5c52ff34777ddd4556 (diff)
downloadtrackermap-server-bd4c32abced2bb654b64a2042668340167d6b191.tar.gz
trackermap-server-bd4c32abced2bb654b64a2042668340167d6b191.tar.bz2
trackermap-server-bd4c32abced2bb654b64a2042668340167d6b191.zip
Temporary add old parameters
Diffstat (limited to 'src/org/traccar/database')
-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();
}