CacheKey key = query.getSession().getIdentityMapAccessorInstance().acquireDeferredLock(pk, concreteDescriptor.getJavaClass(), concreteDescriptor);
if (((XMLDescriptor)concreteDescriptor).shouldPreserveDocument()) {
key.setRecord(databaseRow);
}
key.setObject(domainObject);
key.releaseDeferredLock();
}
DocumentPreservationPolicy docPresPolicy = ((DOMRecord)row).getDocPresPolicy();
if(docPresPolicy != null) {
//EIS XML Cases won't have a doc pres policy set
((DOMRecord)row).getDocPresPolicy().addObjectToCache(domainObject, ((DOMRecord)row).getDOM());