code: static <E> List<E> toEntities(Class<E> entityClass, List<Entity> nativeEntities) {
      if (nativeEntities == null || nativeEntities.isEmpty()) {
        return new ArrayList<>();
      }
      List<E> entities = new ArrayList<>(nativeEntities.size());
      for (Entity nativeEntity : nativeEntities) {
        E entity = Unmarshaller.unmarshal(nativeEntity, entityClass);
        entities.add(entity);
      }
      return entities;
    }
docs: Converts the given list of native entities to a list of model objects of given type,
  <code>entityClass</code>.
  
  @param entityClass
  the entity class
  @param nativeEntities
  native entities to convert
  @return the list of model objects