@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ScheduleEntityPK that = (ScheduleEntityPK) o; if (idStation != null ? !idStation.equals(that.idStation) : that.idStation != null) return false; if (idTrain != null ? !idTrain.equals(that.idTrain) : that.idTrain != null) return false; return nextStation != null ? nextStation.equals(that.nextStation) : that.nextStation == null; }