@Override public void saveTaxCodes(final Iterable<EasyTaxTaxCode> taxCodes) throws SQLException { final DateTime now = new DateTime(); execute(dataSource.getConnection(), new WithConnectionCallback<Void>() { @Override public Void withConnection(final Connection conn) throws SQLException { DSL.using(conn, dialect, settings).transaction(new TransactionalRunnable() { @Override public void run(final Configuration configuration) throws Exception { final DSLContext dslContext = DSL.using(configuration); for (EasyTaxTaxCode taxCode : taxCodes) { DateTime date = taxCode.getCreatedDate() != null ? taxCode.getCreatedDate() : now; saveTaxCodeInternal(taxCode, date, dslContext); } } }); return null; } }); }