Database database = Torque.getDatabase(databaseNameFromInsertValues);
Object keyInfo = getIdMethodInfo();
IdGenerator keyGen = database.getIdGenerator(
getTableMap().getPrimaryKeyMethod());
SimpleKey id = null;
// can currently generate only single column pks, therefore a single
// columnMap is ok
ColumnMap primaryKey = null;
if (keyGen != null)
{
// fail on multiple pks
primaryKey = getTableMap().getPrimaryKey();
// primaryKey will be null if there is no primary key
// defined for the table we're inserting into.
if (keyGen.isPriorToInsert() && primaryKey != null
&& !insertValues.containsKey(
primaryKey))
{
id = getId(primaryKey, keyGen, connection, keyInfo);
insertValues.put(
primaryKey,
new JdbcTypedValue(id.getValue(), id.getJdbcType()));
}
}
List<String> columnNames = new ArrayList<String>();
List<JdbcTypedValue> replacementObjects