diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ExecuteRawSqlTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ExecuteRawSqlTask.java index 857fd6207bc..f0cce4be291 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ExecuteRawSqlTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ExecuteRawSqlTask.java @@ -22,6 +22,8 @@ package ca.uhn.fhir.jpa.migrate.taskdef; import ca.uhn.fhir.jpa.migrate.DriverTypeEnum; import org.apache.commons.lang3.Validate; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import org.intellij.lang.annotations.Language; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -75,4 +77,24 @@ public class ExecuteRawSqlTask extends BaseTask { } } + + @Override + public boolean equals(Object theO) { + if (this == theO) return true; + + if (!(theO instanceof ExecuteRawSqlTask)) return false; + + ExecuteRawSqlTask that = (ExecuteRawSqlTask) theO; + + return new EqualsBuilder() + .append(myDriverNeutralSqls, that.myDriverNeutralSqls) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37) + .append(myDriverNeutralSqls) + .toHashCode(); + } }