diff options
Diffstat (limited to 'src/main/java')
| -rw-r--r-- | src/main/java/com/stileeducation/markr/dto/ImportResponseDTO.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/main/java/com/stileeducation/markr/dto/ImportResponseDTO.java b/src/main/java/com/stileeducation/markr/dto/ImportResponseDTO.java index 8613865..11eeae5 100644 --- a/src/main/java/com/stileeducation/markr/dto/ImportResponseDTO.java +++ b/src/main/java/com/stileeducation/markr/dto/ImportResponseDTO.java @@ -1,5 +1,7 @@ package com.stileeducation.markr.dto; +import java.util.Objects; + public class ImportResponseDTO { private String status; @@ -30,6 +32,30 @@ public class ImportResponseDTO { this.data = data; } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ImportResponseDTO that = (ImportResponseDTO) o; + return Objects.equals(status, that.status) && + Objects.equals(message, that.message) && + Objects.equals(data, that.data); + } + + @Override + public int hashCode() { + return Objects.hash(status, message, data); + } + + @Override + public String toString() { + return "ImportResponseDTO{" + + "status='" + status + '\'' + + ", message='" + message + '\'' + + ", data=" + data + + '}'; + } + public static class ImportData { private int studentsCreated = 0; private int studentsUpdated = 0; @@ -111,5 +137,35 @@ public class ImportResponseDTO { public void incrementTestResultsUpdated() { this.testResultsUpdated++; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ImportData that = (ImportData) o; + return studentsCreated == that.studentsCreated && + studentsUpdated == that.studentsUpdated && + testsCreated == that.testsCreated && + testsUpdated == that.testsUpdated && + testResultsCreated == that.testResultsCreated && + testResultsUpdated == that.testResultsUpdated; + } + + @Override + public int hashCode() { + return Objects.hash(studentsCreated, studentsUpdated, testsCreated, testsUpdated, testResultsCreated, testResultsUpdated); + } + + @Override + public String toString() { + return "ImportData{" + + "studentsCreated=" + studentsCreated + + ", studentsUpdated=" + studentsUpdated + + ", testsCreated=" + testsCreated + + ", testsUpdated=" + testsUpdated + + ", testResultsCreated=" + testResultsCreated + + ", testResultsUpdated=" + testResultsUpdated + + '}'; + } } } |
