aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-04-26 19:17:20 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-04-26 19:17:20 +1200
commit2eea9f7e758e116a56a58070cc0d839286e606c7 (patch)
tree7c0e72d9093ab988b37e06b324f1b1fc943d01fd /src/org/traccar/model
parent05666c6d2e309313583ac698a1792833d84d0e41 (diff)
downloadtraccar-server-2eea9f7e758e116a56a58070cc0d839286e606c7.tar.gz
traccar-server-2eea9f7e758e116a56a58070cc0d839286e606c7.tar.bz2
traccar-server-2eea9f7e758e116a56a58070cc0d839286e606c7.zip
Add database methods for devices
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/Device.java51
1 files changed, 16 insertions, 35 deletions
diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java
index 1276216fc..cd1985e37 100644
--- a/src/org/traccar/model/Device.java
+++ b/src/org/traccar/model/Device.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2012 - 2015 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,53 +15,30 @@
*/
package org.traccar.model;
-/**
- * Device
- */
+import java.util.Date;
+
public class Device {
- /**
- * Id
- */
- private Long id;
+ private long id;
- public Long getId() {
+ public long getId() {
return id;
}
- public void setId(Long id) {
+ public void setId(long id) {
this.id = id;
}
+
+ private String name;
- /**
- * International mobile equipment identity (IMEI)
- */
- private String imei;
-
- public String getImei() {
- return imei;
- }
-
- public void setImei(String imei) {
- this.imei = imei;
- }
-
- /**
- * Phone number
- */
- private String phoneNumber;
-
- public String getPhoneNumber() {
- return phoneNumber;
+ public String getName() {
+ return uniqueId;
}
- public void setPhoneNumber(String phoneNumber) {
- this.phoneNumber = phoneNumber;
+ public void setName(String name) {
+ this.name = name;
}
- /**
- * Unique id (for some trackers)
- */
private String uniqueId;
public String getUniqueId() {
@@ -71,5 +48,9 @@ public class Device {
public void setUniqueId(String uniqueId) {
this.uniqueId = uniqueId;
}
+
+ private String status;
+
+ private Date lastUpdate;
}