use of com.bakdata.conquery.apiv1.query.concept.specific.CQDateRestriction in project conquery by bakdata.
the class FilterTest method parseQuery.
private Query parseQuery(StandaloneSupport support) throws JSONException, IOException {
rawFilterValue.put("filter", support.getDataset().getName() + ".concept.connector.filter");
FilterValue<?> result = parseSubTree(support, rawFilterValue, Jackson.MAPPER.getTypeFactory().constructType(FilterValue.class));
CQTable cqTable = new CQTable();
cqTable.setFilters(Collections.singletonList(result));
cqTable.setConnector(connector);
CQConcept cqConcept = new CQConcept();
cqTable.setConcept(cqConcept);
cqConcept.setElements(Collections.singletonList(concept));
cqConcept.setTables(Collections.singletonList(cqTable));
if (dateRange != null) {
CQDateRestriction restriction = new CQDateRestriction();
restriction.setDateRange(dateRange);
restriction.setChild(cqConcept);
return new ConceptQuery(restriction);
}
return new ConceptQuery(cqConcept);
}
Aggregations