docs: private Object getReferencedObject(Identity id, ObjectReferenceDescriptor rds)
      {
          Class baseClassForProxy;
  
          if (rds.isLazy())
          {
              /*
              arminw:
              use real reference class instead of the top-level class,
              because we want to use a proxy representing the real class
              not only the top-level class - right?
              */
              // referencedProxy = getClassDescriptor(referencedClass).getDynamicProxyClass();
              //referencedProxy = rds.getItemClass(); 
              
              /*
               * andrew.clute:
               * With proxy generation now handled by the ProxyFactory implementations, the class of the Item
               * is now the nessecary parameter to generate a proxy.
               */
              baseClassForProxy = rds.getItemClass();
          }
          else
          {
              /*
              * andrew.clute:
              * If the descriptor does not mark it as lazy, then the class for the proxy must be of type VirtualProxy
              */
             baseClassForProxy = rds.getItemProxyClass();
          }
  
          if (baseClassForProxy != null)
          {
              try
              {
                  return pb.createProxy(baseClassForProxy, id);
              }
              catch (Exception e)
              {
                  log.error("Error while instantiate object " + id + ", msg: "+ e.getMessage(), e);
                  if(e instanceof PersistenceBrokerException)
                  {
                      throw (PersistenceBrokerException) e;
                  }
                  else
                  {
                      throw new PersistenceBrokerException(e);
                  }
              }
          }
          else
          {
              return pb.doGetObjectByIdentity(id);
          }
      }