package quba.models;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.util.Date;
@Embeddable
public class QubaSubjectivePK {
public Long stationid;
public Integer pindexid;
@Column(name = "run")
public Date runDate ;
@Column(name = "valid")
public Date validDate ;
public int levelid;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
QubaSubjectivePK that = (QubaSubjectivePK) o;
if (levelid != that.levelid) return false;
if (stationid != null ? !stationid.equals(that.stationid) : that.stationid != null) return false;
if (pindexid != null ? !pindexid.equals(that.pindexid) : that.pindexid != null) return false;
if (runDate != null ? !runDate.equals(that.runDate) : that.runDate != null) return false;
return validDate != null ? validDate.equals(that.validDate) : that.validDate == null;
}
@Override
public int hashCode() {
int result = stationid != null ? stationid.hashCode() : 0;
result = 31 * result + (pindexid != null ? pindexid.hashCode() : 0);
result = 31 * result + (runDate != null ? runDate.hashCode() : 0);
result = 31 * result + (validDate != null ? validDate.hashCode() : 0);
result = 31 * result + levelid;
return result;
}
}