@Test public void generateSql_nullGenerators() { SqlGeneratorChain chain = new SqlGeneratorChain(null); assertNull(chain.generateSql(new MockSqlStatement(), new MockDatabase())); }
public Sql[] generateSql(SqlStatement statement, Database database) { if (sqlGenerators == null) { return null; } if (!sqlGenerators.hasNext()) { return new Sql[0]; } return sqlGenerators.next().generateSql(statement, database, this); }
SqlGeneratorChain { public Sql[] generateSql(SqlStatement statement, Database database) { if (sqlGenerators == null) { return null; } if (!sqlGenerators.hasNext()) { return new Sql[0]; } return sqlGenerators.next().generateSql(statement, database, this); } }
SqlGeneratorChain { public Sql[] generateSql(SqlStatement statement, Database database) { if (sqlGenerators == null) { return null; } if (!sqlGenerators.hasNext()) { return new Sql[0]; } return sqlGenerators.next().generateSql(statement, database, this); } SqlGeneratorChain(SortedSet<SqlGenerator> sqlGenerators); }
SqlGeneratorChain { public Sql[] generateSql(SqlStatement statement, Database database) { if (sqlGenerators == null) { return null; } if (!sqlGenerators.hasNext()) { return new Sql[0]; } return sqlGenerators.next().generateSql(statement, database, this); } SqlGeneratorChain(SortedSet<SqlGenerator> sqlGenerators); Sql[] generateSql(SqlStatement statement, Database database); Warnings warn(SqlStatement statement, Database database); ValidationErrors validate(SqlStatement statement, Database database); }
SqlGeneratorChain { public Sql[] generateSql(SqlStatement statement, Database database) { if (sqlGenerators == null) { return null; } if (!sqlGenerators.hasNext()) { return new Sql[0]; } return sqlGenerators.next().generateSql(statement, database, this); } SqlGeneratorChain(SortedSet<SqlGenerator> sqlGenerators); Sql[] generateSql(SqlStatement statement, Database database); Warnings warn(SqlStatement statement, Database database); ValidationErrors validate(SqlStatement statement, Database database);  }