Example usage for org.springframework.integration.jdbc StoredProcExecutor setSqlParameterSourceFactory

List of usage examples for org.springframework.integration.jdbc StoredProcExecutor setSqlParameterSourceFactory

Introduction

In this page you can find the example usage for org.springframework.integration.jdbc StoredProcExecutor setSqlParameterSourceFactory.

Prototype

public void setSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory) 

Source Link

Document

Provides the ability to set a custom SqlParameterSourceFactory .

Usage

From source file:org.springframework.integration.jdbc.StoredProcExecutorTests.java

@Test
public void testSetSqlParameterSourceFactoryWithNullParameter() {
    DataSource datasource = mock(DataSource.class);
    StoredProcExecutor storedProcExecutor = new StoredProcExecutor(datasource);

    try {/*from w w  w .  j  a v a 2  s .  c o m*/
        storedProcExecutor.setSqlParameterSourceFactory(null);
    } catch (IllegalArgumentException e) {
        assertEquals("sqlParameterSourceFactory must not be null.", e.getMessage());
        return;
    }

    fail("Exception expected.");

}