@Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof Entity)) return false;

    Entity entity = (Entity) o;

    if (id != null ? !id.equals(entity.id) : entity.id != null) return false;

    return true;
  }