@Test public void register() { SqlGeneratorFactory.getInstance().getGenerators().clear(); assertEquals(0, SqlGeneratorFactory.getInstance().getGenerators().size()); SqlGeneratorFactory.getInstance().register(new MockSqlGenerator(1, "A1")); assertEquals(1, SqlGeneratorFactory.getInstance().getGenerators().size()); }
public void register(SqlGenerator generator) { generators.add(generator); }
SqlGeneratorFactory { public void register(SqlGenerator generator) { generators.add(generator); } }
SqlGeneratorFactory { public void register(SqlGenerator generator) { generators.add(generator); } private  SqlGeneratorFactory(); }
SqlGeneratorFactory { public void register(SqlGenerator generator) { generators.add(generator); } private  SqlGeneratorFactory(); static SqlGeneratorFactory getInstance(); static void reset(); void register(SqlGenerator generator); void unregister(SqlGenerator generator); void unregister(Class generatorClass); Sql[] generateSql(SqlStatement statement, Database database); boolean requiresCurrentDatabaseMetadata(SqlStatement statement, Database database); boolean supports(SqlStatement statement, Database database); ValidationErrors validate(SqlStatement statement, Database database); Warnings warn(SqlStatement statement, Database database); Set<DatabaseObject> getAffectedDatabaseObjects(SqlStatement statement, Database database); }
SqlGeneratorFactory { public void register(SqlGenerator generator) { generators.add(generator); } private  SqlGeneratorFactory(); static SqlGeneratorFactory getInstance(); static void reset(); void register(SqlGenerator generator); void unregister(SqlGenerator generator); void unregister(Class generatorClass); Sql[] generateSql(SqlStatement statement, Database database); boolean requiresCurrentDatabaseMetadata(SqlStatement statement, Database database); boolean supports(SqlStatement statement, Database database); ValidationErrors validate(SqlStatement statement, Database database); Warnings warn(SqlStatement statement, Database database); Set<DatabaseObject> getAffectedDatabaseObjects(SqlStatement statement, Database database);  }