}
}
}
// Execute the statement for each table
TableDataSet tds = null;
try
{
String tableName = SQLBuilder.getFullTableName(table, dbName);
// Get affected records.
tds = new TableDataSet(con, tableName, kd);
String sqlSnippet = StringUtils.join(whereClause.iterator(), " AND ");
if (log.isDebugEnabled())
{
log.debug("BasePeer: whereClause=" + sqlSnippet);
}
tds.where(sqlSnippet);
tds.fetchRecords();
if (tds.size() > 1 && crit.isSingleRecord())
{
handleMultipleRecords(tds);
}
for (int j = 0; j < tds.size(); j++)
{
Record rec = tds.getRecord(j);
if (pc != null)
{
// Table name _without_ schema!
pc.process(table, dbName, rec);