protected Collection<CommunicationSummaryStatistics> doGetCommunicationSummaryStatistics(String tenantId,Criteria criteria){
  String index=client.getIndex(tenantId);
  Map<String,CommunicationSummaryStatistics> stats=new HashMap<>();
  if (!criteria.transactionWide()) {
    Criteria txnWideCriteria=criteria.deriveTransactionWide();
    buildCommunicationSummaryStatistics(stats,index,txnWideCriteria,false);
  }
  buildCommunicationSummaryStatistics(stats,index,criteria,true);
  return stats.values();
}

protected Collection < CommunicationSummaryStatistics > doGetCommunicationSummaryStatistics ( String tenantId , Criteria criteria ) { String index = client . getIndex ( tenantId ) ; Map < String , CommunicationSummaryStatistics > stats = new HashMap < > ( ) ; if ( ! criteria . transactionWide ( ) ) { Criteria txnWideCriteria = criteria . deriveTransactionWide ( ) ; buildCommunicationSummaryStatistics ( stats , index , txnWideCriteria , false ) ; } buildCommunicationSummaryStatistics ( stats , index , criteria , true ) ; return stats . values ( ) ; }
this method returns the flat list of communication summary stats .
