public void setType(OnDemandQueryType type) {

        this.type = type;
    }
This method sets the type of given on-demand query.
modules/siddhi-query-api/src/main/java/io/siddhi/query/api/execution/query/OnDemandQuery.java