@Override public int compareTo(Smearstation smearstation) { long primaryKey = smearstation.getPrimaryKey(); if (getPrimaryKey() < primaryKey) { return -1; } else if (getPrimaryKey() > primaryKey) { return 1; } else { return 0; } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Smearstation)) { return false; } Smearstation smearstation = (Smearstation) obj; long primaryKey = smearstation.getPrimaryKey(); if (getPrimaryKey() == primaryKey) { return true; } else { return false; } }