DatabaseMap tempDbMap = dbMap;
ColumnMap[] columnMaps = tempDbMap.getTable(tab).getColumns();
for (int j = 0; j < columnMaps.length; j++)
{
ColumnMap colMap = columnMaps[j];
if (colMap.isPrimaryKey())
{
kd.addAttrib(colMap.getColumnName());
}
String key = new StringBuffer(colMap.getTableName())
.append('.')
.append(colMap.getColumnName())
.toString();
if (selectCriteria.containsKey(key))
{
if (selectCriteria
.getComparison(key)
.equals(Criteria.CUSTOM))
{
whereClause.add(selectCriteria.getString(key));
}
else
{
whereClause.add(
SqlExpression.build(
colMap.getColumnName(),
selectCriteria.getValue(key),
selectCriteria.getComparison(key),
selectCriteria.isIgnoreCase(),
db));
}