private String mapCollectionName(String collectionName,boolean dest){
  if ((collectionRules.size() == 0) && (StringUtils.isBlank(defaultCollectionAppend))) {
    return collectionName;
  }
  for (  String[] rule : collectionRules) {
    String match=(dest) ? rule[0] : rule[1];
    String replace=(dest) ? rule[1] : rule[0];
    if (collectionName.contains(match)) {
      return collectionName.replace(match,replace);
    }
  }
  if (dest) {
    return collectionName + defaultCollectionAppend;
  }
 else {
    return collectionName.replace(defaultCollectionAppend,"");
  }
}

private String mapCollectionName ( String collectionName , boolean dest ) { if ( ( collectionRules . size ( ) == 0 ) && ( StringUtils . isBlank ( defaultCollectionAppend ) ) ) { return collectionName ; } for ( String [ ] rule : collectionRules ) { String match = ( dest ) ? rule [ 0 ] : rule [ 1 ] ; String replace = ( dest ) ? rule [ 1 ] : rule [ 0 ] ; if ( collectionName . contains ( match ) ) { return collectionName . replace ( match , replace ) ; } } if ( dest ) { return collectionName + defaultCollectionAppend ; } else { return collectionName . replace ( defaultCollectionAppend , "" ) ; } }
given a collection name and a flag ( reverse of forward mapping ) , return the new collection name based on the mapping
