State s = tx.lookup(pn);
if (s != null && s != VirtualState.instance) {
return s.getCacheEntry();
} else {
//Fetch an instance (new or from the cache)
CacheEntry ce = tpm.getObjectById(tx, pn);
//clear the state
tpm.refresh(tx, ce);
//if it exists then object loading else exception
tpm.readIntention(tx, ce, null);
return ce;