if (this.hashCode == null) {
// Get the primary key annotated with ID
List<Field> fields = ReflectUtils.getDeclaredFieldsByAnnotation(this.getClass(), Id.class);
if (fields.size() != 1) {
throw new JuRuntimeException("Expected exactly one @Id annotaded field");
}
// Get the value of the ID field
this.idFieldValue = ReflectUtils.getFieldValue(this, fields.get(0));
if (this.idFieldValue == null) {
throw new JuRuntimeException("Id of EntityBean must not be null when first hashCode is computed");
}
// Compute the hashcode
this.hashCode = this.idFieldValue.hashCode();
}