HHH-6758 : Test failure due to Oracle restrictions on Blob comparison and missing equals() and hashCode()

This commit is contained in:
Gail Badner 2011-10-21 14:21:19 -07:00
parent 4eca0b5e97
commit 0d007bce7c
1 changed files with 23 additions and 0 deletions

View File

@ -17,4 +17,27 @@ public class Country implements Serializable {
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if ( this == o ) {
return true;
}
if ( o == null || getClass() != o.getClass() ) {
return false;
}
Country country = (Country) o;
if ( name != null ? !name.equals( country.name ) : country.name != null ) {
return false;
}
return true;
}
@Override
public int hashCode() {
return name != null ? name.hashCode() : 0;
}
}