All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bitbucket.bradleysmithllc.etlunit.feature.database.JDBCClient Maven / Gradle / Ivy

There is a newer version: 4.6.0-eu
Show newest version
package org.bitbucket.bradleysmithllc.etlunit.feature.database;

import org.bitbucket.bradleysmithllc.etlunit.TestExecutionError;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.Statement;

public interface JDBCClient
{
	interface ConnectionClient
	{
		void connection(Connection conn, DatabaseConnection connection, String mode, int id) throws Exception;
	}

	void useConnection(DatabaseConnection connection, String mode, ConnectionClient client) throws TestExecutionError;
	void useConnection(DatabaseConnection connection, String mode, ConnectionClient client, int id) throws TestExecutionError;

	interface StatementClient
	{
		void connection(Connection conn, Statement st, DatabaseConnection connection, String mode, int id) throws Exception;
	}

	void useStatement(DatabaseConnection connection, String mode, StatementClient client) throws TestExecutionError;
	void useStatement(DatabaseConnection connection, String mode, StatementClient client, int id) throws TestExecutionError;

	interface PreparedStatementClient
	{
		String prepareText();
		void connection(Connection conn, PreparedStatement st, DatabaseConnection connection, String mode, int id) throws Exception;
	}

	void usePreparedStatement(DatabaseConnection connection, String mode, PreparedStatementClient client) throws TestExecutionError;
	void usePreparedStatement(DatabaseConnection connection, String mode, PreparedStatementClient client, int id) throws TestExecutionError;

	interface CallableStatementClient
	{
		String callText();
		void connection(Connection conn, CallableStatement st, DatabaseConnection connection, String mode, int id) throws Exception;
	}

	void useCallableStatement(DatabaseConnection connection, String mode, CallableStatementClient client) throws TestExecutionError;
	void useCallableStatement(DatabaseConnection connection, String mode, CallableStatementClient client, int id) throws TestExecutionError;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy