Java Code Examples for org.springframework.jdbc.core.simple.SimpleJdbcCall

The following examples show how to use org.springframework.jdbc.core.simple.SimpleJdbcCall. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: spring-boot   Source File: StoredFunction.java    License: MIT License 5 votes vote down vote up
@PostConstruct
public void init() {

    jdbcTemplate.setResultsMapCaseInsensitive(true);

    simpleJdbcCallFunction1 = new SimpleJdbcCall(jdbcTemplate).withFunctionName("get_price_by_id");
    simpleJdbcCallFunction2 = new SimpleJdbcCall(jdbcTemplate).withFunctionName("get_database_time");
}
 
Example 2
Source Project: spring-boot   Source File: StoredProcedure1.java    License: MIT License 5 votes vote down vote up
@PostConstruct
void init() {
    // o_name and O_NAME, same
    jdbcTemplate.setResultsMapCaseInsensitive(true);

    simpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)
            .withProcedureName("get_book_by_id");

}
 
Example 3
Source Project: spring-boot   Source File: StoredProcedure2.java    License: MIT License 5 votes vote down vote up
@PostConstruct
public void init() {
    // o_name and O_NAME, same
    jdbcTemplate.setResultsMapCaseInsensitive(true);

    // Convert o_c_book SYS_REFCURSOR to List<Book>
    simpleJdbcCallRefCursor = new SimpleJdbcCall(jdbcTemplate)
            .withProcedureName("get_book_by_name")
            .returningResultSet("o_c_book",
                    BeanPropertyRowMapper.newInstance(Book.class));

}
 
Example 4
Source Project: maven-framework-project   Source File: JdbcCustomerDAO.java    License: MIT License 4 votes vote down vote up
public SimpleJdbcCall getSimpleJdbcCall() {
	return simpleJdbcCall;
}
 
Example 5
Source Project: maven-framework-project   Source File: JdbcCustomerDAO.java    License: MIT License 4 votes vote down vote up
public void setSimpleJdbcCall(SimpleJdbcCall simpleJdbcCall) {
	this.simpleJdbcCall = simpleJdbcCall;
}