code: @Override
      public List<?> getResultList()
      {
          if (log.isDebugEnabled())
              log.info("On getResultList() executing query: " + getJPAQuery());
  
          // as per JPA post event should happen before fetching data from
          // database.
          List results = null;
  
          if (getEntityMetadata() == null)
          {
              // Scalar Query
              if (kunderaQuery.isDeleteUpdate())
              {
                  executeUpdate();
              }
              else
              {
                  Client client = persistenceDelegeator.getClient(kunderaQuery.getPersistenceUnit());
                  results = populateEntities(null, client);
              }
          }
          else
          {
              handlePostEvent();
  
              if (kunderaQuery.isDeleteUpdate())
              {
                  executeUpdate();
              }
              else
              {
                  results = fetch();
                  assignReferenceToProxy(results);
              }
          }
          return results != null ? results : new ArrayList();
      }
docs: /*
  (non-Javadoc)
  
  @see javax.persistence.Query#getResultList()