示例#1
0
  /** Adds input and output parameter hints to odaStatement */
  private void addParameterDefns() throws DataException {
    assert odaStatement != null;

    if (this.parameterHints == null) return; // nothing to add

    // iterate thru the collection to add parameter hints
    Iterator it = this.parameterHints.iterator();
    while (it.hasNext()) {
      ParameterHint parameterHint = (ParameterHint) it.next();
      odaStatement.addParameterHint(parameterHint);

      // If the parameter is input parameter then add it to input value list.
      if (parameterHint.isInputMode()) {
        Object inputValue = getParameterInputValue(parameterHint);
        if (parameterHint.getPosition() <= 0 || odaStatement.supportsNamedParameter()) {
          this.setInputParamValue(parameterHint.getName(), parameterHint.getPosition(), inputValue);

        } else {
          this.setInputParamValue(parameterHint.getPosition(), inputValue);
        }
      }
    }
    this.setInputParameterBinding();
  }