final Class clazz = getClass();
final Class<? extends AbstractModelObject> clazz = getClass();
    public boolean equals(Object obj) {        if (obj == this) {            return true;        }        final Class clazz = getClass();        if (obj == null || !(clazz.isAssignableFrom(obj.getClass()))) {            return false;        }        final EqualsBuilder equalsBuilder = new EqualsBuilder();        final Class superClazz = clazz.getSuperclass();        if (superClazz != null && !superClazz.equals(Object.class)                && !superClazz.equals(AbstractModelObject.class)) {            // the upper class is not Object not AbstractModelObject            equalsBuilder.appendSuper(super.equals(obj));        }        try {            for (final Field field : getValuableFields()) {                equalsBuilder.append(field.get(this), field.get(obj));            }        } catch (Exception e) {            throw new UnhandledException(e);        }        return equalsBuilder.isEquals();    }