Skip to content

Commit

Permalink
added ConnectionInitializer
Browse files Browse the repository at this point in the history
  • Loading branch information
llsand committed Oct 24, 2019
1 parent 9ff15c6 commit 9ec7b4d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ public static CallableStatementProviderImpl createCallableStatementProvider(
}
throw new RuntimeException(e);
}

pParameters.getConnectionInitializer().accept(lCallableStatementProvider);

return lCallableStatementProvider;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.UnaryOperator;

import org.eclipse.emf.ecore.EObject;

import de.opitzconsulting.orcas.sql.CallableStatementProvider;

public abstract class Parameters {
public Consumer<CallableStatementProvider> getConnectionInitializer() {
return connectionInitializer;
}

public static class JdbcConnectParameters {
String _jdbcDriver;
String _jdbcUrl;
Expand Down Expand Up @@ -73,6 +78,13 @@ public void setMultiSchemaConnectionManager(MultiSchemaConnectionManager pMultiS
protected Boolean _indexmovetablespace;
protected Boolean _tablemovetablespace;

public void setConnectionInitializer(Consumer<CallableStatementProvider> pConnectionInitializer) {
connectionInitializer = pConnectionInitializer;
}

private Consumer<CallableStatementProvider> connectionInitializer = p -> {
};

public int getStaticsSpoolMaxLineLength() {
return staticsSpoolMaxLineLength;
}
Expand Down

0 comments on commit 9ec7b4d

Please sign in to comment.