diff --git a/Kitodo-API/src/main/java/org/kitodo/api/dataformat/MediaPartialView.java b/Kitodo-API/src/main/java/org/kitodo/api/dataformat/MediaPartialView.java index 99cd83e17e5..58fb7949b6a 100644 --- a/Kitodo-API/src/main/java/org/kitodo/api/dataformat/MediaPartialView.java +++ b/Kitodo-API/src/main/java/org/kitodo/api/dataformat/MediaPartialView.java @@ -41,4 +41,5 @@ public String getExtent() { public void setExtent(String extent) { this.extent = extent; } + } diff --git a/Kitodo-API/src/main/java/org/kitodo/api/dataformat/View.java b/Kitodo-API/src/main/java/org/kitodo/api/dataformat/View.java index 88c011e2faf..12aca7ecca2 100644 --- a/Kitodo-API/src/main/java/org/kitodo/api/dataformat/View.java +++ b/Kitodo-API/src/main/java/org/kitodo/api/dataformat/View.java @@ -67,6 +67,14 @@ public boolean equals(Object o) { return false; } View view = (View) o; - return Objects.equals(physicalDivision.getDivId(), view.physicalDivision.getDivId()); + return Objects.equals(physicalDivision, view.physicalDivision); + } + + @Override + public int hashCode() { + final int prime = 31; + int hashCode = 1; + hashCode = prime * hashCode + ((physicalDivision == null) ? 0 : physicalDivision.hashCode()); + return hashCode; } }