AbstractSession session = context.getSession(obj);
XMLDescriptor xmlDescriptor = (XMLDescriptor)session.getDescriptor(obj);
DOMRecord row = new DOMRecord((Element)node);
row.setSession(session);
Object pk = xmlDescriptor.getObjectBuilder().extractPrimaryKeyFromRow(row, session);
if (xmlDescriptor.shouldPreserveDocument() || xmlDescriptor.getPrimaryKeyFieldNames().size() > 0) {
if ((pk == null) || (((CacheId)pk).getPrimaryKey().length == 0)) {
pk = new CacheId(new Object[]{ new WeakObjectWrapper(obj) });
}
CacheKey key = session.getIdentityMapAccessorInstance().acquireDeferredLock(pk, xmlDescriptor.getJavaClass(), xmlDescriptor);
if ((xmlDescriptor).shouldPreserveDocument()) {