use of org.obiba.mica.dataset.rest.entity.rql.RQLFieldReferences in project mica2 by obiba.
the class StudyEntitiesCountQuery method createVariableEntitiesCount.
private MicaSearch.VariableEntitiesCountDto createVariableEntitiesCount(Search.EntitiesResultDto opalResult) {
MicaSearch.VariableEntitiesCountDto.Builder builder = MicaSearch.VariableEntitiesCountDto.newBuilder();
RQLCriterionOpalConverter converter = findConverter(opalResult.getQuery());
RQLFieldReferences references = converter.getVariableReferences();
builder.setQuery(converter.getMicaQuery()).setCount(opalResult.getTotalHits()).setVariable(documentDigestDtos.asDto(references.getVariable()));
if (references.hasStudyTableName())
builder.addAllStudyTableName(localizedStringDtos.asDto(references.getStudyTableName()));
return builder.build();
}
Aggregations