Search in sources :

Example 1 with CQDateRestriction

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);
}
Also used : CQDateRestriction(com.bakdata.conquery.apiv1.query.concept.specific.CQDateRestriction) CQTable(com.bakdata.conquery.apiv1.query.concept.filter.CQTable) CQConcept(com.bakdata.conquery.apiv1.query.concept.specific.CQConcept) ConceptQuery(com.bakdata.conquery.apiv1.query.ConceptQuery) FilterValue(com.bakdata.conquery.apiv1.query.concept.filter.FilterValue)

Aggregations

ConceptQuery (com.bakdata.conquery.apiv1.query.ConceptQuery)1 CQTable (com.bakdata.conquery.apiv1.query.concept.filter.CQTable)1 FilterValue (com.bakdata.conquery.apiv1.query.concept.filter.FilterValue)1 CQConcept (com.bakdata.conquery.apiv1.query.concept.specific.CQConcept)1 CQDateRestriction (com.bakdata.conquery.apiv1.query.concept.specific.CQDateRestriction)1