*/
void processUpdatedSnapshot(Object nodeId, DataRow diff) {
// access object map directly - the method should be called in a synchronized
// context...
DataObject object = (DataObject) objectMap.get(nodeId);
// no object, or HOLLOW object require no processing
if (object != null) {
int state = object.getPersistenceState();
if (state != PersistenceState.HOLLOW) {
// perform same steps as resolveHollow()
if (state == PersistenceState.COMMITTED) {
// consult delegate if it exists
DataContextDelegate delegate = context.nonNullDelegate();
if (delegate.shouldMergeChanges(object, diff)) {
ClassDescriptor descriptor = context
.getEntityResolver()
.getClassDescriptor(((ObjectId) nodeId).getEntityName());
// TODO: andrus, 5/26/2006 - call to 'getSnapshot' is expensive,
// however my attempts to merge the 'diff' instead of snapshot
// via 'refreshObjectWithSnapshot' resulted in even worse
// performance.
// This sounds counterintuitive (Not sure if this is some HotSpot
// related glitch)... still keeping the old algorithm here until
// we
// switch from snapshot events to GraphEvents and all this code
// becomes obsolete.
DataRow snapshot = getSnapshot(object.getObjectId());
DataRowUtils.refreshObjectWithSnapshot(
descriptor,
object,
snapshot,