class CachedRunningQuery extends AbstractRunningQuery {

    private boolean isFunction(String field) {
        if (field.contains(LPAREN) && field.contains(RPAREN) && field.indexOf(LPAREN) > 0) {
            boolean matches = false;
            for (String pattern : allowedFunctions) {
                matches = field.matches(pattern);
                if (matches)
                    break;
            }
            if (!matches)
                throw new IllegalArgumentException("Function not allowed. Allowed functions are: " + StringUtils.join(allowedFunctions, ","));
            return true;
        }
        return false;
    }

    private  CachedRunningQuery(QueryMetricFactory metricFactory);
    public  CachedRunningQuery(Query query, QueryLogic<?> queryLogic, String queryId, String alias, String user, String view, int pagesize,
                    String originalQueryId, Set<String> variableFields, Set<String> fixedFieldsInEvent, QueryMetricFactory metricFactory);
    public  CachedRunningQuery(Connection connection, Query query, QueryLogic<?> queryLogic, String queryId, String alias, String user, String view,
                    String fields, String conditions, String grouping, String order, int pagesize, Set<String> variableFields, Set<String> fixedFieldsInEvent,
                    QueryMetricFactory metricFactory);

}