Package org.springframework.jdbc.core.simple

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


    ctrlConnection.setReturnValue(mockCallable);

    ctrlResultSet.replay();
    replay();

    SimpleJdbcCall adder = new SimpleJdbcCall(mockDataSource).withFunctionName("add_invoice");
    Number newId = adder.executeFunction(Number.class, new MapSqlParameterSource()
        .addValue("amount", amount)
        .addValue("custid", custid));
    assertEquals(4, newId.intValue());

    ctrlResultSet.verify();
View Full Code Here


    if (idx != -1) {
      schemaName = spName.substring(0, idx);
      spName = spName.substring(idx + 1);
    }

    SimpleJdbcCall jdbcCall = new SimpleJdbcCall(dataSource)
        .withProcedureName(spName).declareParameters(params);

    if (schemaName != null) {
      jdbcCall.setSchemaName(schemaName);
    }

    jdbcCall.setAccessCallParameterMetaData(false);

    Map<String, Object> out = jdbcCall.execute(inParams);
    return out;
  }// ;
View Full Code Here

  @Autowired
  UserEventService userEventService;

  @Autowired
  public void setDataSource(DataSource dataSource) {
    statUpdate = new SimpleJdbcCall(dataSource).withFunctionName("stat_update");
    statUpdate2 = new SimpleJdbcCall(dataSource).withFunctionName("stat_update2");
    statMonthly = new SimpleJdbcCall(dataSource).withFunctionName("update_monthly_stats");
  }
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.core.simple.SimpleJdbcCall

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.