package service.data.domain.entity; import org.springframework.data.neo4j.annotation.GraphId; import org.springframework.data.neo4j.annotation.Indexed; import org.springframework.data.neo4j.annotation.NodeEntity; @NodeEntity public class User { @GraphId private Long id; public User() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Indexed private String knownId; public String getKnownId() { return knownId; } public void setKnownId(String knownId) { this.knownId = knownId; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; if (id != null ? !id.equals(user.id) : user.id != null) return false; return true; } @Override public int hashCode() { return id != null ? id.hashCode() : 0; } @Override public String toString() { return "User{" + "id=" + id + '}'; } }