model.Spatial Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of db-api Show documentation
Show all versions of db-api Show documentation
EPOS Database APIs useful to interact with EPOS Metadata Catalogue
package model;
import jakarta.persistence.*;
import java.util.Collection;
@Entity
public class Spatial {
@Id
@Column(name = "instance_id", nullable = false, length = 100)
private String instanceId;
@Basic
@Column(name = "meta_id", nullable = true, length = 100)
private String metaId;
@Basic
@Column(name = "uid", nullable = true, length = 100)
private String uid;
@Basic
@Column(name = "version_id", nullable = true, length = 100)
private String versionId;
@Basic
@Column(name = "location", nullable = false, length = -1)
private String location;
@OneToMany(mappedBy = "spatialBySpatialInstanceId")
private Collection dataproductSpatialsByInstanceId;
@OneToMany(mappedBy = "spatialBySpatialInstanceId")
private Collection equipmentSpatialsByInstanceId;
@OneToMany(mappedBy = "spatialBySpatialInstanceId")
private Collection facilitySpatialsByInstanceId;
@OneToMany(mappedBy = "spatialBySpatialInstanceId")
private Collection serviceSpatialsByInstanceId;
@ManyToOne
@PrimaryKeyJoinColumn(name = "version_id", referencedColumnName = "version_id")
private Versioningstatus versioningstatusByVersionId;
@OneToMany(mappedBy = "spatialBySpatialInstanceId")
private Collection webserviceSpatialsByInstanceId;
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public String getMetaId() {
return metaId;
}
public void setMetaId(String metaId) {
this.metaId = metaId;
}
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
public String getVersionId() {
return versionId;
}
public void setVersionId(String versionId) {
this.versionId = versionId;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Spatial spatial = (Spatial) o;
if (instanceId != null ? !instanceId.equals(spatial.instanceId) : spatial.instanceId != null) return false;
if (metaId != null ? !metaId.equals(spatial.metaId) : spatial.metaId != null) return false;
if (uid != null ? !uid.equals(spatial.uid) : spatial.uid != null) return false;
if (versionId != null ? !versionId.equals(spatial.versionId) : spatial.versionId != null) return false;
if (location != null ? !location.equals(spatial.location) : spatial.location != null) return false;
return true;
}
@Override
public int hashCode() {
int result = instanceId != null ? instanceId.hashCode() : 0;
result = 31 * result + (metaId != null ? metaId.hashCode() : 0);
result = 31 * result + (uid != null ? uid.hashCode() : 0);
result = 31 * result + (versionId != null ? versionId.hashCode() : 0);
result = 31 * result + (location != null ? location.hashCode() : 0);
return result;
}
public Collection getDataproductSpatialsByInstanceId() {
return dataproductSpatialsByInstanceId;
}
public void setDataproductSpatialsByInstanceId(Collection dataproductSpatialsByInstanceId) {
this.dataproductSpatialsByInstanceId = dataproductSpatialsByInstanceId;
}
public Collection getEquipmentSpatialsByInstanceId() {
return equipmentSpatialsByInstanceId;
}
public void setEquipmentSpatialsByInstanceId(Collection equipmentSpatialsByInstanceId) {
this.equipmentSpatialsByInstanceId = equipmentSpatialsByInstanceId;
}
public Collection getFacilitySpatialsByInstanceId() {
return facilitySpatialsByInstanceId;
}
public void setFacilitySpatialsByInstanceId(Collection facilitySpatialsByInstanceId) {
this.facilitySpatialsByInstanceId = facilitySpatialsByInstanceId;
}
public Collection getServiceSpatialsByInstanceId() {
return serviceSpatialsByInstanceId;
}
public void setServiceSpatialsByInstanceId(Collection serviceSpatialsByInstanceId) {
this.serviceSpatialsByInstanceId = serviceSpatialsByInstanceId;
}
public Versioningstatus getVersioningstatusByVersionId() {
return versioningstatusByVersionId;
}
public void setVersioningstatusByVersionId(Versioningstatus versioningstatusByVersionId) {
this.versioningstatusByVersionId = versioningstatusByVersionId;
}
public Collection getWebserviceSpatialsByInstanceId() {
return webserviceSpatialsByInstanceId;
}
public void setWebserviceSpatialsByInstanceId(Collection webserviceSpatialsByInstanceId) {
this.webserviceSpatialsByInstanceId = webserviceSpatialsByInstanceId;
}
}