//key is keyString, value is RecordData
Map<String, RecordData> rowKeyMap = new HashMap<String, RecordData>();
List<RecordData> results = new ArrayList<RecordData>();
for (int i=0; i < totalRows; i++) {
RowData resultRow = (RowData)retrievedTableData.getRow(i);
RowData entityRow = constructRowData(resultRow, tableMappingName, entityHome);
if (entityRow == null) continue;
String keyDataString = getKeyDataString(entityRow);
if (rowKeyMap.containsKey(keyDataString)) {
RecordData recordData = (RecordData)rowKeyMap.get(keyDataString);