if (this.queryResult.equals(ResultType.ENTITY)){
query = new ReadAllQuery(this.queryType);
}else if (this.queryResult.equals(ResultType.PARTIAL)){
ReadAllQuery raq = new ReadAllQuery(this.queryType);
for (Selection selection: this.selection.getCompoundSelectionItems()){
raq.addPartialAttribute(((SelectionImpl)selection).currentNode);
}
query = raq;
}else{
if (this.roots == null || this.roots.isEmpty()) throw new IllegalStateException(ExceptionLocalization.buildMessage("CRITERIA_NO_ROOT_FOR_COMPOUND_QUERY"));
ReportQuery reportQuery = null;