74 lines
1.4 KiB
Java
74 lines
1.4 KiB
Java
package eu.eudat.migration.entities;
|
|
|
|
import javax.persistence.*;
|
|
|
|
@Entity
|
|
@Table(name = "regions")
|
|
public class Region {
|
|
|
|
@Id
|
|
private Long id;
|
|
private String abbreviation;
|
|
private String description;
|
|
private String name;
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
@JoinColumn(name = "super_region_id")
|
|
private Region superRegion;
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "Region{" +
|
|
"id=" + id +
|
|
", abbreviation='" + abbreviation + '\'' +
|
|
", description='" + description + '\'' +
|
|
", name='" + name + '\'' +
|
|
", superRegion=" + superRegion +
|
|
'}';
|
|
}
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
|
|
public String getAbbreviation() {
|
|
return abbreviation;
|
|
}
|
|
|
|
public void setAbbreviation(String abbreviation) {
|
|
this.abbreviation = abbreviation;
|
|
}
|
|
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
|
|
public Region getSuperRegion() {
|
|
return superRegion;
|
|
}
|
|
|
|
public void setSuperRegion(Region superRegion) {
|
|
this.superRegion = superRegion;
|
|
}
|
|
|
|
}
|