Skip to content

Commit

Permalink
MID-3669: RFocusActivation added equals/hashCode
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Mar 1, 2021
1 parent 9ad638f commit 268cf1d
Showing 1 changed file with 16 additions and 0 deletions.
Expand Up @@ -6,6 +6,7 @@
*/
package com.evolveum.midpoint.repo.sql.data.common.embedded;

import java.util.Objects;
import javax.persistence.Embeddable;

import com.evolveum.midpoint.prism.PrismContext;
Expand Down Expand Up @@ -47,4 +48,19 @@ public static void copyToJAXB(RFocusActivation repo, ActivationType jaxb, PrismC
jaxb.setLockoutStatus(repo.getLockoutStatus().getSchemaValue());
}
}

@Override
public boolean equals(Object o) {
if (this == o) { return true; }
if (o == null || getClass() != o.getClass()) { return false; }
if (!super.equals(o)) { return false; }

RFocusActivation that = (RFocusActivation) o;
return lockoutStatus == that.lockoutStatus;
}

@Override
public int hashCode() {
return Objects.hash(super.hashCode(), lockoutStatus);
}
}

0 comments on commit 268cf1d

Please sign in to comment.