Hash code methods for domain objects.