if (od == null) { result = false; } else { ObjectType type = oid.getObjectType(); for (Iterator it = type.getRoles().iterator(); it.hasNext(); ) { Role role = (Role) it.next(); if (role.isCollection()) { clear(oid, role); }
ObjectType type = oid.getObjectType(); Collection keys = type.getKeyProperties();  for (Iterator it = type.getRoles().iterator(); it.hasNext(); ) { Role role = (Role) it.next(); if (role.isCollection()) { clear(oid, role);
    public boolean delete(OID oid) {        if (LOG.isDebugEnabled()) {            trace("delete", new Object[] {oid});        }        boolean result;        ObjectData od = fetchObjectData(oid);        if (od.isVisiting()) {            result = false;        } else {            od.setVisiting(true);            if (od == null) {                result = false;            } else {                ObjectType type = oid.getObjectType();                for (Iterator it = type.getRoles().iterator();                     it.hasNext(); ) {                    Role role = (Role) it.next();                    if (role.isCollection()) {                        clear(oid, role);                    }                }                for (Iterator it = type.getProperties().iterator();                     it.hasNext(); ) {                    Role role = (Role) it.next();                    if (!role.isCollection()) {                        set(oid, role, null);                    }                }                addEvent(new DeleteEvent(this, oid));                result = true;            }            od.setVisiting(false);        }        if (LOG.isDebugEnabled()) {            untrace("delete", result);        }        return result;    }