From 2eea9f7e758e116a56a58070cc0d839286e606c7 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 26 Apr 2015 19:17:20 +1200 Subject: Add database methods for devices --- src/org/traccar/model/Device.java | 51 ++++++++++++--------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) (limited to 'src/org/traccar/model') 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; } -- cgit v1.2.3