Package org.springframework.jdbc.core

Examples of org.springframework.jdbc.core.SqlOutParameter


  }

  @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 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())
              outParameterNames.add(returnNameToUse);
          }
        }
        else {
View Full Code Here

  @Override
  public SqlParameter createDefaultOutParameter(String parameterName, CallParameterMetaData meta) {
    if (meta.getSqlType() == Types.OTHER) {
      if (isRefCursorType(meta)){
        return new SqlOutParameter(parameterName, getRefCursorSqlType(), new OracleSQLResultsProvider());
      }else if (isPLSQLRecordType(meta)){
        throw new UnsupportedOperationException("A PL/SQL record is not currently supported as an output parameter.");
      }else if (isArrayType(meta)){
        return new SqlOutParameter(parameterName, getArrayType(), getArgumentType(meta));
      }else if (isFloatType(meta)){
        return new SqlOutParameter(parameterName, OracleTypes.FLOAT);
      }else{
        return new SqlOutParameter(parameterName, getStructType(), meta.getTypeName());
      }
    }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 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

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.