/** * Validates the criteria settings and then transfers them to the query object. This method * transfers the base criteria only. Override to transfer additional criteria that are specific * to the resource type. * * @param criteria Research search criteria. * @param query The query object. */ protected void buildQuery(C criteria, IQuery<Bundle> query) { criteria.validate(); if (criteria.getMaximum() > 0) { query.limitTo(criteria.getMaximum()); } if (criteria.getId() != null) { query.where(new StringClientParam(BaseResource.SP_RES_ID).matches().value(criteria.getId())); } }
.lastUpdated(new DateRangeParam("2011-01-01", null)) .sort().ascending(Patient.BIRTHDATE) .sort().descending(Patient.NAME).limitTo(123) .returnBundle(Bundle.class) .execute();