Utils.Function<Entity, Object> func = new Utils.Function<Entity, Object>() {
public Object apply(Entity from) {
return DatastoreQuery.entityToPojo(from, acmd, clr, om, true, om.getFetchPlan().getCopy());
}
};
AbstractJavaQuery query = new DummyQuery(om);
DatastoreManager dm = (DatastoreManager) om.getStoreManager();
ManagedConnection mconn = om.getStoreManager().getConnection(om);
try {
return (List<T>) DatastoreQuery.newStreamingQueryResultForEntities(
queryResultIterable, func, mconn, endCursor, query, dm.isJPA());