query.setFilter(new Query.FilterPredicate(TEMP_DATA_READ_PROPERTY, Query.FilterOperator.EQUAL, false));
} else {
query.addSort("timestamp", Query.SortDirection.ASCENDING);
}
PreparedQuery pq = ds.prepare(query);
Iterator<Entity> iter = pq.asIterator();
List<T> result = new ArrayList<>();
while (iter.hasNext()) {
Entity entity = iter.next();
T data = readTempData(type, entity, ds);
result.add(data);