}
// 2 - Check if the user defined default generators, otherwise
// create them using the Table and Sequence generator metadata.
if (! sequences.containsKey(DEFAULT_TABLE_GENERATOR)) {
TableGeneratorMetadata tableGenerator = new TableGeneratorMetadata(DEFAULT_TABLE_GENERATOR);
// This will go through the same table defaulting as all other
// tables (table, secondary table, join table etc.) in the PU.
// Here the default table name should come from the platform
// in case the current one is not legal for this platform (e.g.
// SEQUENCE for Symfoware). We should always try to avoid making
// metadata changes after processing and ensure we always
// process with the correct and necessary metadata.
Sequence seq = m_session.getDatasourcePlatform().getDefaultSequence();
String defaultTableGeneratorName = (seq instanceof TableSequence) ? ((TableSequence) seq).getTableName() : DEFAULT_TABLE_GENERATOR;
// Process the default values.
processTable(tableGenerator, defaultTableGeneratorName, getPersistenceUnitDefaultCatalog(), getPersistenceUnitDefaultSchema());
sequences.put(DEFAULT_TABLE_GENERATOR, tableGenerator.process(m_logger));
}
if (! sequences.containsKey(DEFAULT_SEQUENCE_GENERATOR)) {
sequences.put(DEFAULT_SEQUENCE_GENERATOR, new SequenceGeneratorMetadata(DEFAULT_SEQUENCE_GENERATOR, getPersistenceUnitDefaultCatalog(), getPersistenceUnitDefaultSchema()).process(m_logger));
}