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

The following examples show how to use org.springframework.jdbc.core.simple.SimpleJdbcCall. 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 File: StoredFunction.java    From spring-boot with 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 File: StoredProcedure1.java    From spring-boot with 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 File: StoredProcedure2.java    From spring-boot with 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 File: JdbcCustomerDAO.java    From maven-framework-project with MIT License 4 votes vote down vote up
public SimpleJdbcCall getSimpleJdbcCall() {
	return simpleJdbcCall;
}
 
Example #5
Source File: JdbcCustomerDAO.java    From maven-framework-project with MIT License 4 votes vote down vote up
public void setSimpleJdbcCall(SimpleJdbcCall simpleJdbcCall) {
	this.simpleJdbcCall = simpleJdbcCall;
}