clearInternal(obj, role);
clearInternal(obj, role, pending);
    private boolean deleteInternal(Object obj) {        if (LOG.isDebugEnabled()) {            trace("delete", new Object[] {obj});        }        boolean result;        ObjectData od = fetchObjectData(obj);        if (od == null) {            result = false;        } else if (m_visiting.contains(od)) {            result = false;        } else {            m_visiting.add(od);            ObjectType type = getObjectType(obj);            for (Iterator it = type.getRoles().iterator();                 it.hasNext(); ) {                Role role = (Role) it.next();                if (role.isCollection()) {                    clearInternal(obj, role);                }            }            for (Iterator it = type.getRoles().iterator();                 it.hasNext(); ) {                Role role = (Role) it.next();                if (!role.isCollection() && get(obj, role) != null) {                    setInternal(obj, role, null);                }            }            m_visiting.remove(od);            addEvent(new DeleteEvent(this, obj));            result = true;        }        if (LOG.isDebugEnabled()) {            untrace("delete", result);        }        return result;    }