package de.is24.infrastructure.gridfs.http.jaxb; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlValue; public class Checksum { private String type; private String checksum; @XmlAttribute public String getType() { return type; } public void setType(String type) { this.type = type; } @XmlValue public String getChecksum() { return checksum; } public void setChecksum(String checksum) { this.checksum = checksum; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || this.getClass() != o.getClass()) { return false; } Checksum other = (Checksum) o; return new EqualsBuilder() .append(checksum, other.checksum) .append(type, other.type) .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder(17, 37) .append(checksum) .append(type) .toHashCode(); } }