TableMap tableMap = dbMap.getTable(table);
Object keyInfo = tableMap.getPrimaryKeyMethodInfo();
IdGenerator keyGen
= database.getIdGenerator(tableMap.getPrimaryKeyMethod());
ColumnMap pk = getPrimaryKey(criteria);
// If the keyMethod is SEQUENCE or IDBROKERTABLE, get the id
// before the insert.
if (keyGen != null && keyGen.isPriorToInsert())
{
// pk will be null if there is no primary key defined for the table
// we're inserting into.
if (pk != null && !criteria.containsKey(pk.getFullyQualifiedName()))
{
id = getId(pk, keyGen, con, keyInfo);
criteria.add(pk.getFullyQualifiedName(), id);
}
}
// Use Village to perform the insert.
TableDataSet tds = null;