package org.gcube.common.storagehub.model.types; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @JsonIgnoreProperties(ignoreUnknown = true) @AllArgsConstructor @NoArgsConstructor @Data public class SHUBUser implements Comparable { private String userName; private long homeVersion; @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SHUBUser other = (SHUBUser) obj; if (userName == null) { if (other.userName != null) return false; } else if (!userName.equals(other.userName)) return false; return true; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((userName == null) ? 0 : userName.hashCode()); return result; } @Override public int compareTo(SHUBUser user) { return userName.compareTo(user.getUserName()); } }