// Path: src/main/java/it/richkmeli/rms/data/entity/user/model/User.java
// @Entity
// public class User{
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     private Long id;
//     @Column(unique = true)
//     @NotNull
//     @Length(max = 50)
//     private String email;
//     @NotNull
//     @Length(max = 100)
//     private String password;
//     @NotNull
//     private Boolean admin;
// 
//     @OneToMany(mappedBy = "associatedUser", cascade = {CascadeType.REMOVE}, fetch = FetchType.LAZY)
//     // OR if you want in json object also the device list when it isn't load at that time
//     //@OneToMany(mappedBy = "associatedUser", cascade={CascadeType.REMOVE}, fetch = FetchType.EAGER)
//     @JsonManagedReference
//     private Set<Device> devices;
// 
//     @OneToMany(mappedBy = "associatedUser", cascade = {CascadeType.REMOVE}, fetch = FetchType.LAZY)
//     @JsonManagedReference
//     private Set<Rmc> rmcs;
// 
//     public User() {
//     }
// 
//     public User(String email, String password) throws ModelException {
//         this(email, password, false);
//     }
// 
//     public User(@Length(max = 50) String email, @NotNull @Length(max = 100) String password, @NotNull Boolean admin) throws ModelException {
//         checkUserIntegrity(email, password, admin);
//         this.email = email;
//         this.password = password;
//         this.admin = admin;
//     }
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public void setEmail(String email) {
//         this.email = email;
//     }
// 
//     public String getPassword() {
//         return password;
//     }
// 
//     public void setPassword(String password) {
//         this.password = password;
//     }
// 
//     public Boolean getAdmin() {
//         return admin;
//     }
// 
//     public void setAdmin(Boolean admin) {
//         this.admin = admin;
//     }
// 
//     public Set<Device> getDevices() {
//         return devices;
//     }
// 
//     public void setDevices(Set<Device> devices) {
//         this.devices = devices;
//     }
// 
//     public Set<Rmc> getRmcs() {
//         return rmcs;
//     }
// 
//     public void setRmcs(Set<Rmc> rmcs) {
//         this.rmcs = rmcs;
//     }
// 
//     public static void checkUserIntegrity(String email, String password, Boolean admin) throws ModelException {
//         try {
//             RegexManager.checkEmailIntegrity(email);
//         } catch (RegexException e) {
//             throw new ModelException("Email is not valid");
//         }
//         // ...
//     }
// 
//     @Override
//     public String toString() {
//         String output = "";
//         output = "{" + getEmail() + ", "
//                 + getPassword() + ", "
//                 + getAdmin()
//                 + "}";
// 
//         return output;
//     }
// }
// 
// Path: src/main/java/it/richkmeli/rms/util/GeoLocation.java
// public class GeoLocation {
// 
//     public static final String POSITION_NOT_FOUND = "position not found";
// 
//     public static String getPositionFromCoordinates(double longitude, double latitude, double altitude) {
// 
//         String mapboxAccessToken = ConfigurationManager.getValue(ConfigurationEnum.MAPBOX_ACCESS_TOKEN);
// 
//         MapboxGeocoding reverseGeocode = new MapboxGeocoding.Builder()
//                 .setAccessToken(mapboxAccessToken)
//                 .setCoordinates(Position.fromCoordinates(longitude, latitude, altitude))
//                 .setGeocodingType(GeocodingCriteria.TYPE_ADDRESS)
//                 .build();
//         try {
//             GeocodingResponse response = reverseGeocode.executeCall().body();
//             List<CarmenFeature> results = response.getFeatures();
//             if (results.size() > 0) {
//                 // Get the first Feature from the successful geocoding response
//                 CarmenFeature feature = results.get(0);
//                 // Get the address string from the CarmenFeature
//                 String place = feature.getPlaceName();
//                 //Logger.info(place);
//                 return place;
//             } else {
//                 return POSITION_NOT_FOUND;
//             }
//         } catch (IOException e) {
//             Logger.error(e);
//             return POSITION_NOT_FOUND;
//         }
// 
//     }
// }


import com.fasterxml.jackson.annotation.JsonBackReference;
import it.richkmeli.rms.data.entity.user.model.User;
import it.richkmeli.rms.util.GeoLocation;
import org.hibernate.validator.constraints.Length;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
    }

    public String getInstallationId() {
        return installationId;
    }

    public void setInstallationId(String installationId) {
        this.installationId = installationId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getServerPort() {
        return serverPort;
    }

// Path: src/main/java/it/richkmeli/rms/data/entity/user/model/User.java
// @Entity
// public class User{
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     private Long id;
//     @Column(unique = true)
//     @NotNull
//     @Length(max = 50)
//     private String email;
//     @NotNull
//     @Length(max = 100)
//     private String password;
//     @NotNull
//     private Boolean admin;
// 
//     @OneToMany(mappedBy = "associatedUser", cascade = {CascadeType.REMOVE}, fetch = FetchType.LAZY)
//     // OR if you want in json object also the device list when it isn't load at that time
//     //@OneToMany(mappedBy = "associatedUser", cascade={CascadeType.REMOVE}, fetch = FetchType.EAGER)
//     @JsonManagedReference
//     private Set<Device> devices;
// 
//     @OneToMany(mappedBy = "associatedUser", cascade = {CascadeType.REMOVE}, fetch = FetchType.LAZY)
//     @JsonManagedReference
//     private Set<Rmc> rmcs;
// 
//     public User() {
//     }
// 
//     public User(String email, String password) throws ModelException {
//         this(email, password, false);
//     }
// 
//     public User(@Length(max = 50) String email, @NotNull @Length(max = 100) String password, @NotNull Boolean admin) throws ModelException {
//         checkUserIntegrity(email, password, admin);
//         this.email = email;
//         this.password = password;
//         this.admin = admin;
//     }
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public void setEmail(String email) {
//         this.email = email;
//     }
// 
//     public String getPassword() {
//         return password;
//     }
// 
//     public void setPassword(String password) {
//         this.password = password;
//     }
// 
//     public Boolean getAdmin() {
//         return admin;
//     }
// 
//     public void setAdmin(Boolean admin) {
//         this.admin = admin;
//     }
// 
//     public Set<Device> getDevices() {
//         return devices;
//     }
// 
//     public void setDevices(Set<Device> devices) {
//         this.devices = devices;
//     }
// 
//     public Set<Rmc> getRmcs() {
//         return rmcs;
//     }
// 
//     public void setRmcs(Set<Rmc> rmcs) {
//         this.rmcs = rmcs;
//     }
// 
//     public static void checkUserIntegrity(String email, String password, Boolean admin) throws ModelException {
//         try {
//             RegexManager.checkEmailIntegrity(email);
//         } catch (RegexException e) {
//             throw new ModelException("Email is not valid");
//         }
//         // ...
//     }
// 
//     @Override
//     public String toString() {
//         String output = "";
//         output = "{" + getEmail() + ", "
//                 + getPassword() + ", "
//                 + getAdmin()
//                 + "}";
// 
//         return output;
//     }
// }
// 
// Path: src/main/java/it/richkmeli/rms/util/GeoLocation.java
// public class GeoLocation {
// 
//     public static final String POSITION_NOT_FOUND = "position not found";
// 
//     public static String getPositionFromCoordinates(double longitude, double latitude, double altitude) {
// 
//         String mapboxAccessToken = ConfigurationManager.getValue(ConfigurationEnum.MAPBOX_ACCESS_TOKEN);
// 
//         MapboxGeocoding reverseGeocode = new MapboxGeocoding.Builder()
//                 .setAccessToken(mapboxAccessToken)
//                 .setCoordinates(Position.fromCoordinates(longitude, latitude, altitude))
//                 .setGeocodingType(GeocodingCriteria.TYPE_ADDRESS)
//                 .build();
//         try {
//             GeocodingResponse response = reverseGeocode.executeCall().body();
//             List<CarmenFeature> results = response.getFeatures();
//             if (results.size() > 0) {
//                 // Get the first Feature from the successful geocoding response
//                 CarmenFeature feature = results.get(0);
//                 // Get the address string from the CarmenFeature
//                 String place = feature.getPlaceName();
//                 //Logger.info(place);
//                 return place;
//             } else {
//                 return POSITION_NOT_FOUND;
//             }
//         } catch (IOException e) {
//             Logger.error(e);
//             return POSITION_NOT_FOUND;
//         }
// 
//     }
// }


// Path: src/main/java/it/richkmeli/rms/data/entity/device/model/Device.java
import com.fasterxml.jackson.annotation.JsonBackReference;
import it.richkmeli.rms.data.entity.user.model.User;
import it.richkmeli.rms.util.GeoLocation;
import org.hibernate.validator.constraints.Length;
import javax.persistence.*;
import javax.validation.constraints.NotNull;

    }

    public String getInstallationId() {
        return installationId;
    }

    public void setInstallationId(String installationId) {
        this.installationId = installationId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getServerPort() {
        return serverPort;
    }

    public void setServerPort(String serverPort) {