aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model/User.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/model/User.java')
-rw-r--r--src/org/traccar/model/User.java47
1 files changed, 7 insertions, 40 deletions
diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java
index 02e5c0c4f..ea4617e54 100644
--- a/src/org/traccar/model/User.java
+++ b/src/org/traccar/model/User.java
@@ -15,18 +15,19 @@
*/
package org.traccar.model;
-import javax.json.Json;
-import javax.json.JsonObject;
-import javax.json.JsonObjectBuilder;
-import org.traccar.database.Convertable;
-
-public class User implements Convertable {
+public class User {
private long id;
+ public long getId() { return id; }
+ public void setId(long id) { this.id = id; }
private String email;
+ public String getEmail() { return email; }
+ public void setEmail(String email) { this.email = email; }
private String password;
+ public String getPassword() { return password; }
+ public void setPassword(String password) { this.password = password; }
private boolean readonly;
@@ -46,38 +47,4 @@ public class User implements Convertable {
private int zoom;
- @Override
- public JsonObject toJson() {
- JsonObjectBuilder json = Json.createObjectBuilder();
- json.add("id", id);
- json.add("email", email);
- json.add("password", password);
- json.add("readonly", readonly);
- json.add("admin", admin);
- json.add("map", map);
- json.add("language", language);
- json.add("distanceUnit", distanceUnit);
- json.add("speedUnit", speedUnit);
- json.add("latitude", latitude);
- json.add("longitude", longitude);
- json.add("zoom", zoom);
- return json.build();
- }
-
- @Override
- public void fromJson(JsonObject json) {
- id = json.getJsonNumber("id").longValue();
- email = json.getString("email");
- password = json.getString("password");
- readonly = json.getBoolean("readonly");
- admin = json.getBoolean("admin");
- map = json.getString("map");
- language = json.getString("language");
- distanceUnit = json.getString("distanceUnit");
- speedUnit = json.getString("speedUnit");
- latitude = json.getJsonNumber("latitude").doubleValue();
- longitude = json.getJsonNumber("longitude").doubleValue();
- zoom = json.getJsonNumber("zoom").intValue();
- }
-
}