code: private List<Object> formatResults(SelectResults<?> selectResults) {
  	List<Object> results = new ArrayList<Object>(selectResults.size() + 1);
  
  	results.addAll(selectResults.asList());
  	results.add(selectResults.getCollectionType().getElementType());
  
  	return results;
      }
docs: Formats results of query execution.
  
  @param selectResults of type SelectResults
  @return List<Object>