My comments on equals:
The same attributes you take into account in equals() you must take into account in hashCode(). However in your hashCode() you use machineTypeId, but you did not in you equals() method. There is not need to check for the object being null. Instanceof operator will return false if the object is null. Test first for object equality (same instance) and avoid further complications in the algorithm. My comments on hashCode:
You can use the members hashCode, but always test for nullability first. I hope that helps!
[ December 21, 2006: Message edited by: Edwin Dalorzo ]