I had a thought, perhaps my hashcode and/or equals override was not correct, but it looks good to me.
Here they are.
for memberComposite
Code:
public String toString() {
return new ToStringBuilder(this)
.append("subscriberNo", getSubscriberNo())
.append("personNo", getPersonNo())
.toString();
}
public boolean equals(Object other) {
if ( (this == other ) ) return true;
if ( !(other instanceof memberComposite) ) return false;
memberComposite castOther = (memberComposite) other;
return new EqualsBuilder()
.append(this.getSubscriberNo(), castOther.getSubscriberNo())
.append(this.getPersonNo(), castOther.getPersonNo())
.isEquals();
}
public int hashCode() {
return new HashCodeBuilder()
.append(getSubscriberNo())
.append(getPersonNo())
.toHashCode();
}
for eligibleComposite
Code:
public String toString() {
return new ToStringBuilder(this)
.append("subscriberNo", getSubscriberNo())
.append("personNo", getPersonNo())
.append("eligStartDate", getEligStartDate())
.append("eligEndDate", getEligEndDate())
.toString();
}
public boolean equals(Object other) {
if ( (this == other ) ) return true;
if ( !(other instanceof eligibleComposite) ) return false;
eligibleComposite castOther = (eligibleComposite) other;
return new EqualsBuilder()
.append(this.getSubscriberNo(), castOther.getSubscriberNo())
.append(this.getPersonNo(), castOther.getPersonNo())
.append(this.getEligStartDate(), castOther.getEligStartDate())
.append(this.getEligEndDate(), castOther.getEligEndDate())
.isEquals();
}
public int hashCode() {
return new HashCodeBuilder()
.append(getSubscriberNo())
.append(getPersonNo())
.append(getEligStartDate())
.append(getEligEndDate())
.toHashCode();
}