code: public Object lookup(Identity oid)
      {
          Object result = null;
          // 1. lookup an instance in session cache
          CacheEntry entry = (CacheEntry) sessionCache.get(oid);
          if(entry != null)
          {
              result = entry.get();
          }
          if(result == null)
          {
              result = lookupFromApplicationCache(oid);
              // 4. if we have a match
              // put object in session cache
              if(result != null)
              {
                  doInternalCache(oid, result, TYPE_CACHED_READ);
                  materializeFullObject(result);
                  if(log.isDebugEnabled()) log.debug("Materialized object from second level cache: " + oid);
              }
          }
          if(result != null && log.isDebugEnabled())
          {
              log.debug("Match for: " + oid);
          }
          return result;
      }
docs: Lookup corresponding object from session cache or if not found from
  the underlying real {@link ObjectCache} - Return <em>null</em> if no
  object was found.