Package org.springframework.jdbc.core

Examples of org.springframework.jdbc.core.SqlOutParameter


          }
          else {
            String returnNameToUse =
                ( meta.getParameterName() == null || meta.getParameterName().length() < 1 ) ?
                    this.getFunctionReturnName() : parNameToUse;
            workParameters.add(new SqlOutParameter(returnNameToUse, meta.getSqlType()));
            if (this.isFunction()) {
              this.setFunctionReturnName(returnNameToUse);
              outParameterNames.add(returnNameToUse);
            }
            if (logger.isDebugEnabled()) {
View Full Code Here


  public boolean byPassReturnParameter(String parameterName) {
    return false;
  }

  public SqlParameter createDefaultOutParameter(String parameterName, CallParameterMetaData meta) {
    return new SqlOutParameter(parameterName, meta.getSqlType());
  }
View Full Code Here

    if (this.metaDataProvider.isReturnResultSetSupported()) {
      return new SqlReturnResultSet(parameterName, rowMapper);
    }
    else {
      if (this.metaDataProvider.isRefCursorSupported()) {
        return new SqlOutParameter(parameterName, this.metaDataProvider.getRefCursorSqlType(), rowMapper);
      }
      else {
        throw new InvalidDataAccessApiUsageException("Return of a ResultSet from a stored procedure is not supported.");
      }
    }
View Full Code Here

          }
          else {
            String returnNameToUse =
                ( meta.getParameterName() == null || meta.getParameterName().length() < 1 ) ?
                    this.getFunctionReturnName() : parNameToUse;
            workParameters.add(new SqlOutParameter(returnNameToUse, meta.getSqlType()));
            if (this.isFunction())
              outParameterNames.add(returnNameToUse);
            if (logger.isDebugEnabled()) {
              logger.debug("Added metadata return parameter for: " + returnNameToUse);
            }
View Full Code Here

    if (this.metaDataProvider.isReturnResultSetSupported()) {
      return new SqlReturnResultSet(parameterName, rowMapper);
    }
    else {
      if (this.metaDataProvider.isRefCursorSupported()) {
        return new SqlOutParameter(parameterName, this.metaDataProvider.getRefCursorSqlType(), rowMapper);
      }
      else {
        throw new InvalidDataAccessApiUsageException("Return of a ResultSet from a stored procedure is not supported.");
      }
    }
View Full Code Here

          }
          else {
            String returnNameToUse =
                ( meta.getParameterName() == null || meta.getParameterName().length() < 1 ) ?
                    this.getFunctionReturnName() : parNameToUse;
            workParameters.add(new SqlOutParameter(returnNameToUse, meta.getSqlType()));
            if (this.isFunction()) {
              this.setFunctionReturnName(returnNameToUse);
              outParameterNames.add(returnNameToUse);
            }
            if (logger.isDebugEnabled()) {
View Full Code Here

    replay();

    SimpleJdbcCall adder = new SimpleJdbcCall(mockDataSource).withProcedureName("add_invoice");
    adder.declareParameters(new SqlParameter("amount", Types.INTEGER),
        new SqlParameter("custid", Types.INTEGER),
        new SqlOutParameter("newid", Types.INTEGER));
    Number newId = adder.executeObject(Number.class, new MapSqlParameterSource()
        .addValue("amount", amount)
        .addValue("custid", custid));
    assertEquals(4, newId.intValue());
  }
View Full Code Here

    ctrlConnection.setReturnValue(mockCallable);

    replay();

    SimpleJdbcCall adder = new SimpleJdbcCall(mockDataSource).withFunctionName("add_invoice");
    adder.declareParameters(new SqlOutParameter("return", Types.INTEGER),
        new SqlParameter("amount", Types.INTEGER),
        new SqlParameter("custid", Types.INTEGER));
    Number newId = adder.executeFunction(Number.class, new MapSqlParameterSource()
        .addValue("amount", amount)
        .addValue("custid", custid));
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.core.SqlOutParameter

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.