The linked post is specific to the QueryBuilder. This code does not use QueryBuilder and thus does not apply here. The code is a bit hard to read due to lack of formatting, but this is what this code should look like (making a few guesses): List<Map<String, Object> dataList = new ArrayList<>();
Res...