As I said in “Code 1 in generated java classes” there is another code snippet I would like to get some information about:
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getCurrencyCode() != null) {
_hashCode += getCurrencyCode().hashCode();
}
if (getAnnualSalary() != null) {
for (int i=0;
i<java.lang.reflect.Array.getLength(getAnnualSalary());
i++) {
java.lang.Object obj = java.lang.reflect.Array.get(getAnnualSalary(), i);
if (obj != null &&
!obj.getClass().isArray()) {
_hashCode += obj.hashCode();
}
}
}
if (getAnnualBonus() != null) {
for (int i=0;
i<java.lang.reflect.Array.getLength(getAnnualBonus());
i++) {
java.lang.Object obj = java.lang.reflect.Array.get(getAnnualBonus(), i);
if (obj != null &&
!obj.getClass().isArray()) {
_hashCode += obj.hashCode();
}
}
}
__hashCodeCalc = false;
return _hashCode;
}
Best regards Dago