aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/shared/model/UserSettings.java
blob: f7163a1643924d4e9f7cb59e97b2a70dcc54b5d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package org.traccar.web.shared.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

@Entity
@Table(name="user_settings")
public class UserSettings implements Serializable {

    private static final long serialVersionUID = 1;

    public UserSettings() {
        speedUnit = SpeedUnit.knots;
    }

    public enum SpeedUnit {
        knots,
        kilometersPerHour,
        milesPerHour
    }

    @Enumerated(EnumType.STRING)
    private SpeedUnit speedUnit;

    public void setSpeedUnit(SpeedUnit speedUnit) {
        this.speedUnit = speedUnit;
    }

    public SpeedUnit getSpeedUnit() {
        return speedUnit;
    }

}