use of org.hibernate.boot.model.naming.Identifier in project hibernate-orm by hibernate.
the class TableGenerator method determineGeneratorTableName.
/**
* Determine the table name to use for the generator values.
* <p/>
* Called during {@link #configure configuration}.
*
* @see #getTableName()
* @param params The params supplied in the generator config (plus some standard useful extras).
* @param jdbcEnvironment The JDBC environment
* @return The table name to use.
*/
@SuppressWarnings("UnusedParameters")
protected QualifiedName determineGeneratorTableName(Properties params, JdbcEnvironment jdbcEnvironment) {
final String tableName = ConfigurationHelper.getString(TABLE_PARAM, params, DEF_TABLE);
if (tableName.contains(".")) {
return QualifiedNameParser.INSTANCE.parse(tableName);
} else {
// todo : need to incorporate implicit catalog and schema names
final Identifier catalog = jdbcEnvironment.getIdentifierHelper().toIdentifier(ConfigurationHelper.getString(CATALOG, params));
final Identifier schema = jdbcEnvironment.getIdentifierHelper().toIdentifier(ConfigurationHelper.getString(SCHEMA, params));
return new QualifiedNameParser.NameParts(catalog, schema, jdbcEnvironment.getIdentifierHelper().toIdentifier(tableName));
}
}
Aggregations