public OnDemandQueryType getType() {

        return type;
    }
This method returns the type of given on-demand query.

@return type of given on-demand query
modules/siddhi-query-api/src/main/java/io/siddhi/query/api/execution/query/OnDemandQuery.java