throw new DatabaseMetaDataMethodException(errMessage, "populateIndexes");
}
// create index column
IndexColumn indexColumn = factory.createIndexColumn();
// check if we found the original table column
if (tableColumn != null) {
// mark original table column as part of index
tableColumn.setIndexColumn(Boolean.TRUE);
// clone properties from original table column to the index column
PropertyUtils.copyProperties(indexColumn, tableColumn);
} else { // recovery if table column is not found but we still want to create index column
// set name at least
indexColumn.setName(indexColumnName);
}
// modify ordinal position that correspond to the position in index
indexColumn.setOrdinalPosition(ordinalPosition);
// sort sequence type
indexColumn.setSortSequenceType(getSortSequenceType(ascOrDesc));
// add index column to the index
index.addColumn(indexColumn);
}