log.debug("Received request to generate report for " + caller);
}
return new StreamingOutput() {
@Override
public void write(OutputStream output) throws IOException, WebApplicationException {
Criteria criteria = new Criteria() {
@Override
public Class<?> getPersistentClass() {
return MeasurementOOBComposite.class;
}
};
criteria.setPaging(0, 5);
CriteriaQueryExecutor<MeasurementOOBComposite, Criteria> queryExecutor =
new CriteriaQueryExecutor<MeasurementOOBComposite, Criteria>() {
@Override
public PageList<MeasurementOOBComposite> execute(Criteria criteria) {
return measurementOOBMManager.getSchedulesWithOOBs(caller, null, null, null,
new PageControl(criteria.getPageNumber(), criteria.getPageSize()));
}
};
CriteriaQuery<MeasurementOOBComposite, Criteria> query =
new CriteriaQuery<MeasurementOOBComposite, Criteria>(criteria, queryExecutor);