Package org.apache.tuscany.das.rdb

Examples of org.apache.tuscany.das.rdb.Parameter


    return findOrCreateParameterWithIndex(index, Parameter.IN,
        SDODataTypes.OBJECT);
  }

  public void setParameter(int index, Object value) {
    Parameter param = findOrCreateParameterWithIndex(index);
    param.setValue(value);
  }
View Full Code Here


  }

  public void setParameter(String name, Object value) {
    if (name == null)
      throw new RuntimeException("Null parameter name not allowed");
    Parameter param = findOrCreateParameterNamed(name);
    param.setValue(value);
  }
View Full Code Here

  }

  public void setParameterWithType(String name, Type sdoType) {
    if (name == null)
      throw new RuntimeException("Null parameter name not allowed");
    Parameter p = findOrCreateParameterNamed(name);
    p.setType(sdoType);
  }
View Full Code Here

  }

    public void setParameterWithType(int index, Type sdoType) {
        if (index == 0)
            throw new RuntimeException("Null parameter index not allowed");
        Parameter p = findOrCreateParameterWithIndex(index);
        p.setType(sdoType);
    }
View Full Code Here

    }
   
    public Parameter parameterWithIndex(int index) {
    Iterator i = parameters.iterator();
    while (i.hasNext()) {
      Parameter param = (Parameter) i.next();

      if (param.getIndex() == index)
        return param;
    }
    return null;
  }
View Full Code Here

  public List getParameters() {
    return parameters.parameterList();
  }

  public Object getParameterValue(String name) {
    Parameter p = parameters.get(name);
    if (p == null)
      throw new RuntimeException("Parameter with name " + name
          + " not found");

    return p;
View Full Code Here

      updateCommand = new UpdateCommandImpl(statement.toString());
   
    Iterator params = parameters.iterator();
    for (int idx = 1; params.hasNext(); idx++ ) {
      Property p = (Property)params.next();
      Parameter param = new ParameterImpl();
      param.setName(p.getName());
      param.setType(p.getType());
      param.setConverter(getConverter(t, p.getName()));
      param.setIndex(idx);
      updateCommand.addParameter(param);
    }
    DebugUtil.debugln(getClass(), debug, statement.toString());
    return updateCommand;
  }
View Full Code Here

    Iterator i = getAttributeProperties(changedObject).iterator();
    while (i.hasNext()) {
      Property attr = (Property) i.next();
      String field = attr.getName();

      Parameter p = getParameter(wrapper, type.getProperty(field));
      if (pkNames.contains(field)) {
        pkParams.add(p);
      } else {
        parameters.add(p);
      }
View Full Code Here

    return parameters;
   
  }

  private Parameter getParameter(TableWrapper wrapper, Property property) {
    Parameter param = new ParameterImpl();
    param.setName(property.getName());
    param.setType(property.getType());
    param.setConverter(getConverter(wrapper, property.getName()));
   
    return param;
  }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.das.rdb.Parameter

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.