class ContextsManager {

    public Object executeQuery(UUID uuid, final Object query, final Map<String, String[]> queryParameters) {
        jrsBeanValidator.validate(query);
        final ContextDataPair contextDataPair = contextDataStorage.get(uuid);
        final Object context = contextDataPair.getContext();
        final ContextQueryExecutor<Object, Object> queryExecutor = getQueryExecutor(query, context);
        return callAndGet(uuid, new Callable<Object>() {
            @Override
            public Object call() throws Exception {
                if(log.isDebugEnabled())log.debug("Starting of query execution for context " + context.toString());
                final Object result = queryExecutor.executeQuery(query, context, queryParameters, contextDataPair.getData());
                if(log.isDebugEnabled())log.debug("Query execution is completed. Context " + context.toString());
                return result;
            }
        });
    }

}