diff --git a/src/main/java/org/folio/models/TemplateProcessingRequest.java b/src/main/java/org/folio/models/TemplateProcessingRequest.java index ef01972dd..73df78e4e 100644 --- a/src/main/java/org/folio/models/TemplateProcessingRequest.java +++ b/src/main/java/org/folio/models/TemplateProcessingRequest.java @@ -1,6 +1,7 @@ package org.folio.models; import java.util.List; +import java.util.Objects; import java.util.UUID; import lombok.Getter; @@ -62,5 +63,20 @@ public Item setName(String name) { return this; } } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof TemplateProcessingRequest that)) return false; + return Objects.equals(templateId, that.templateId) + && Objects.equals(lang, that.lang) + && Objects.equals(outputFormat, that.outputFormat) + && Objects.equals(context, that.context); + } + + @Override + public int hashCode() { + return Objects.hash(templateId, lang, outputFormat, context); + } }