Regenerating entity, and changes in all files

This commit is contained in:
2023-04-27 12:03:53 +02:00
parent 9aa7fb0682
commit 69a0e6d271
14 changed files with 126 additions and 131 deletions

View File

@@ -0,0 +1,105 @@
package ch.progetto152.entity;
import jakarta.persistence.*;
import java.util.Objects;
@Entity
@Table(name = "Waypoints", schema = "Progetto152", catalog = "")
public class WaypointsEntity {
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Id
@Column(name = "id")
private int id;
@Basic
@Column(name = "name")
private String name;
@Basic
@Column(name = "lat")
private double lat;
@Basic
@Column(name = "lon")
private double lon;
@Basic
@Column(name = "description")
private String description;
@Basic
@Column(name = "img")
private String img;
@Basic
@Column(name = "locationName")
private String locationName;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getLat() {
return lat;
}
public void setLat(double lat) {
this.lat = lat;
}
public double getLon() {
return lon;
}
public void setLon(double lon) {
this.lon = lon;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getImg() {
return img;
}
public void setImg(String img) {
this.img = img;
}
public String getLocationName() {
return locationName;
}
public void setLocationName(String locationName) {
this.locationName = locationName;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WaypointsEntity that = (WaypointsEntity) o;
return id == that.id && Double.compare(that.lat, lat) == 0 && Double.compare(that.lon, lon) == 0 && Objects.equals(name, that.name) && Objects.equals(description, that.description) && Objects.equals(img, that.img) && Objects.equals(locationName, that.locationName);
}
@Override
public int hashCode() {
return Objects.hash(id, name, lat, lon, description, img, locationName);
}
}