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())
              outParameterNames.add(returnNameToUse);
            if (logger.isDebugEnabled()) {
              logger.debug("Added metadata return parameter for: " + returnNameToUse);
            }
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

  }

  @Override
  public SqlParameter createDefaultOutParameter(String parameterName, CallParameterMetaData meta) {
    if (meta.getSqlType() == Types.OTHER && "refcursor".equals(meta.getTypeName())) {
      return new SqlOutParameter(parameterName, getRefCursorSqlType(), new ColumnMapRowMapper());
    }
    else {
      return super.createDefaultOutParameter(parameterName, meta);
    }
  }
View Full Code Here

  }

  @Override
  public SqlParameter createDefaultOutParameter(String parameterName, CallParameterMetaData meta) {
    if (meta.getSqlType() == Types.OTHER && REF_CURSOR_NAME.equals(meta.getTypeName())) {
      return new SqlOutParameter(parameterName, getRefCursorSqlType(), new ColumnMapRowMapper());
    }
    else {
      return super.createDefaultOutParameter(parameterName, meta);
    }
  }
View Full Code Here

    public AddInvoice(DataSource ds) {
      setDataSource(ds);
      setSql(SQL);
      declareParameter(new SqlParameter("amount", Types.INTEGER));
      declareParameter(new SqlParameter("custid", Types.INTEGER));
      declareParameter(new SqlOutParameter("newid", Types.INTEGER));
      compile();
    }
View Full Code Here

    public ParameterMapperStoredProcedure(DataSource ds) {
      setDataSource(ds);
      setSql(SQL);
      declareParameter(new SqlParameter("in", Types.VARCHAR));
      declareParameter(new SqlOutParameter("out", Types.VARCHAR));
      compile();
    }
View Full Code Here

    public SqlTypeValueStoredProcedure(DataSource ds) {
      setDataSource(ds);
      setSql(SQL);
      declareParameter(new SqlParameter("in", Types.ARRAY, "NUMBERS"));
      declareParameter(new SqlOutParameter("out", Types.VARCHAR));
      compile();
    }
View Full Code Here

    public static final String SQL = "numeric_with_scale_sp";

    public NumericWithScaleStoredProcedure(DataSource ds) {
      setDataSource(ds);
      setSql(SQL);
      declareParameter(new SqlOutParameter("out", Types.DECIMAL, 4));
      compile();
    }
View Full Code Here

  public void testValidateInOutParameter() {
    TestRdbmsOperation operation = new TestRdbmsOperation();
    operation.setDataSource(new DriverManagerDataSource());
    operation.setSql("DUMMY_PROC");
    operation.declareParameter(new SqlOutParameter("DUMMY_OUT_PARAM", Types.VARCHAR));
    operation.declareParameter(new SqlInOutParameter("DUMMY_IN_OUT_PARAM", Types.VARCHAR));
    operation.validateParameters(new Object[] {"DUMMY_VALUE1", "DUMMY_VALUE2"});
  }
View Full Code Here

    public StoredProcedureConfiguredViaJdbcTemplate(JdbcTemplate t) {
      setJdbcTemplate(t);
      setSql(SQL);
      declareParameter(new SqlParameter("intIn", Types.INTEGER));
      declareParameter(new SqlOutParameter("intOut", Types.INTEGER));
      compile();
    }
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.