Search in sources :

Example 1 with JdbcConnection

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;
}
Also used : JdbcStatement(org.finra.herd.model.api.xml.JdbcStatement) JdbcConnection(org.finra.herd.model.api.xml.JdbcConnection) JdbcExecutionRequest(org.finra.herd.model.api.xml.JdbcExecutionRequest)

Example 2 with JdbcConnection

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;
}
Also used : JdbcConnection(org.finra.herd.model.api.xml.JdbcConnection)

Example 3 with 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;
}
Also used : JdbcStatement(org.finra.herd.model.api.xml.JdbcStatement) JdbcConnection(org.finra.herd.model.api.xml.JdbcConnection) JdbcExecutionRequest(org.finra.herd.model.api.xml.JdbcExecutionRequest)

Aggregations

JdbcConnection (org.finra.herd.model.api.xml.JdbcConnection)3 JdbcExecutionRequest (org.finra.herd.model.api.xml.JdbcExecutionRequest)2 JdbcStatement (org.finra.herd.model.api.xml.JdbcStatement)2