HHH-6823 - Short-name config values

This commit is contained in:
Steve Ebersole 2012-08-29 11:16:17 -05:00
parent 37542fe1f1
commit 759620cecb
1 changed files with 50 additions and 42 deletions

View File

@ -151,48 +151,56 @@ public class StrategySelectorBuilder {
} }
private void addDialects(StrategySelectorImpl strategySelector) { private void addDialects(StrategySelectorImpl strategySelector) {
strategySelector.registerStrategyImplementor( Dialect.class, "Cache71", Cache71Dialect.class ); addDialect( strategySelector, Cache71Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "CUBRID", CUBRIDDialect.class ); addDialect( strategySelector, CUBRIDDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "DB2", DB2Dialect.class ); addDialect( strategySelector, DB2Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "DB2-390", DB2390Dialect.class ); addDialect( strategySelector, DB2390Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "DB2-400", DB2400Dialect.class ); addDialect( strategySelector, DB2400Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Derby10.5", DerbyTenFiveDialect.class ); addDialect( strategySelector, DerbyTenFiveDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Derby10.6", DerbyTenSixDialect.class ); addDialect( strategySelector, DerbyTenSixDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Derby10.7", DerbyTenSevenDialect.class ); addDialect( strategySelector, DerbyTenSevenDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Firebird", FirebirdDialect.class ); addDialect( strategySelector, FirebirdDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "FrontBase", FrontBaseDialect.class ); addDialect( strategySelector, FrontBaseDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "H2", H2Dialect.class ); addDialect( strategySelector, H2Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "HSQL", HSQLDialect.class ); addDialect( strategySelector, HSQLDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Informix", InformixDialect.class ); addDialect( strategySelector, InformixDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Ingres", IngresDialect.class ); addDialect( strategySelector, IngresDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Ingres9", Ingres9Dialect.class ); addDialect( strategySelector, Ingres9Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Ingres10", Ingres10Dialect.class ); addDialect( strategySelector, Ingres10Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Interbase", InterbaseDialect.class ); addDialect( strategySelector, InterbaseDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "JDataStore", JDataStoreDialect.class ); addDialect( strategySelector, JDataStoreDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Mckoi", MckoiDialect.class ); addDialect( strategySelector, MckoiDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "MimerSQL", MimerSQLDialect.class ); addDialect( strategySelector, MimerSQLDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "MySQL5", MySQL5Dialect.class ); addDialect( strategySelector, MySQL5Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "MySQL5-InnoDB", MySQL5InnoDBDialect.class ); addDialect( strategySelector, MySQL5InnoDBDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "MySQL", MySQL5Dialect.class ); addDialect( strategySelector, MySQL5Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "MySQL-InnoDB", MySQL5InnoDBDialect.class ); addDialect( strategySelector, MySQL5InnoDBDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Oracle8i", Oracle8iDialect.class ); addDialect( strategySelector, Oracle8iDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Oracle9i", Oracle9iDialect.class ); addDialect( strategySelector, Oracle9iDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Oracle10g", Oracle10gDialect.class ); addDialect( strategySelector, Oracle10gDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Pointbase", PointbaseDialect.class ); addDialect( strategySelector, PointbaseDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "PostgresPlus", PostgresPlusDialect.class ); addDialect( strategySelector, PostgresPlusDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "PostgreSQL81", PostgreSQL81Dialect.class ); addDialect( strategySelector, PostgreSQL81Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "PostgreSQL82", PostgreSQL82Dialect.class ); addDialect( strategySelector, PostgreSQL82Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Progress", ProgressDialect.class ); addDialect( strategySelector, ProgressDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "SAP", SAPDBDialect.class ); addDialect( strategySelector, SAPDBDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "SQLServer", SQLServerDialect.class ); addDialect( strategySelector, SQLServerDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "SQLServer2005", SQLServer2005Dialect.class ); addDialect( strategySelector, SQLServer2005Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "SQLServer2008", SQLServer2008Dialect.class ); addDialect( strategySelector, SQLServer2008Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Sybase11", Sybase11Dialect.class ); addDialect( strategySelector, Sybase11Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "SybaseAnywhere", SybaseAnywhereDialect.class ); addDialect( strategySelector, SybaseAnywhereDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "SybaseASE15", SybaseASE15Dialect.class ); addDialect( strategySelector, SybaseASE15Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "SybaseASE157", SybaseASE157Dialect.class ); addDialect( strategySelector, SybaseASE157Dialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "Teradata", TeradataDialect.class ); addDialect( strategySelector, TeradataDialect.class );
strategySelector.registerStrategyImplementor( Dialect.class, "TimesTen", TimesTenDialect.class ); addDialect( strategySelector, TimesTenDialect.class );
}
private void addDialect(StrategySelectorImpl strategySelector, Class<? extends Dialect> dialectClass) {
String simpleName = dialectClass.getSimpleName();
if ( simpleName.endsWith( "Dialect" ) ) {
simpleName = simpleName.substring( 0, simpleName.length() - "Dialect".length() );
}
strategySelector.registerStrategyImplementor( Dialect.class, simpleName, dialectClass );
} }
private void addJtaPlatforms(StrategySelectorImpl strategySelector) { private void addJtaPlatforms(StrategySelectorImpl strategySelector) {