code: public boolean isMaterialized(Object object)
      {
          IndirectionHandler handler = getIndirectionHandler(object);
  
          return handler == null || handler.alreadyMaterialized();
      }
docs: Determines whether the object is a materialized object, i.e. no proxy or a
  proxy that has already been loaded from the database.
  
  @param object The object to test
  @return <code>true</code> if the object is materialized