use of org.finra.herd.model.api.xml.JdbcConnection in project herd by FINRAOS.
the class JdbcServiceTestHelper method createDefaultUpdateJdbcExecutionRequest.
/**
* Creates a default JDBC execution request which is guaranteed to work. The request contains a single statement of UPDATE type.
*
* @return a valid JDBC request
*/
public JdbcExecutionRequest createDefaultUpdateJdbcExecutionRequest() {
JdbcConnection jdbcConnection = createDefaultJdbcConnection();
List<JdbcStatement> jdbcStatements = createDefaultUpdateJdbcStatements();
JdbcExecutionRequest jdbcExecutionRequest = createJdbcExecutionRequest(jdbcConnection, jdbcStatements);
return jdbcExecutionRequest;
}
use of org.finra.herd.model.api.xml.JdbcConnection in project herd by FINRAOS.
the class JdbcServiceTestHelper method createDefaultJdbcConnection.
/**
* Creates a default test JDBC connection which is guaranteed to work. The connection points to the in-memory database setup as part of DAO mocks.
*
* @return a valid JDBC connection
*/
public JdbcConnection createDefaultJdbcConnection() {
JdbcConnection jdbcConnection = new JdbcConnection();
jdbcConnection.setUrl("jdbc:h2:mem:herdTestDb");
jdbcConnection.setUsername("");
jdbcConnection.setPassword("");
jdbcConnection.setDatabaseType(JdbcDatabaseType.POSTGRES);
return jdbcConnection;
}
use of org.finra.herd.model.api.xml.JdbcConnection in project herd by FINRAOS.
the class JdbcServiceTestHelper method createDefaultQueryJdbcExecutionRequest.
/**
* Creates a default JDBC execution request which is guaranteed to work. The request contains a single statement of QUERY type.
*
* @return a valid JDBC request
*/
public JdbcExecutionRequest createDefaultQueryJdbcExecutionRequest() {
JdbcConnection jdbcConnection = createDefaultJdbcConnection();
List<JdbcStatement> jdbcStatements = createDefaultQueryJdbcStatements();
JdbcExecutionRequest jdbcExecutionRequest = createJdbcExecutionRequest(jdbcConnection, jdbcStatements);
return jdbcExecutionRequest;
}
Aggregations