final hashcode equals fix

This commit is contained in:
Ken Stevens 2019-11-03 15:52:32 -05:00
parent ea21b59fde
commit 779366ccad
1 changed files with 22 additions and 0 deletions

View File

@ -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<ExecuteRawSqlTask> {
}
}
@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();
}
}