@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || !getClass().equals(o.getClass())) return false; UserExtSource that = (UserExtSource) o; if (login != null ? !login.equals(that.login) : that.login != null) return false; if (extSource != null ? !extSource.equals(that.extSource) : that.extSource != null) return false; return true; }