Package org.apache.tuscany.das.rdb.impl

Examples of org.apache.tuscany.das.rdb.impl.ParameterImpl


    InsertCommandImpl cmd = new InsertCommandImpl(statement.toString());
    Iterator params = parameters.iterator();
    for (int idx = 1; params.hasNext(); idx++) {
      Property property = (Property) params.next();
      Parameter p = new ParameterImpl();
      p.setName(property.getName());
      p.setType(property.getType());
      p.setConverter(getConverter(table, property.getName()));
      p.setIndex(idx);
      cmd.addParameter(p);

    }
    DebugUtil.debugln(getClass(), debug, statement.toString());
    return cmd;
View Full Code Here


    DeleteCommandImpl deleteCommand = new DeleteCommandImpl(getDeleteStatement(t));
   
    Iterator i = getDeleteParameters(t).iterator();
    for(int idx=1; i.hasNext(); idx++) {
      String property = (String) i.next();
      Parameter p = new ParameterImpl();
      p.setName(property);
      p.setType(SDODataTypes.OBJECT);
      p.setConverter(getConverter(t, property));
      p.setIndex(idx);
      deleteCommand.addParameter(p);
    }
    return deleteCommand;
  }
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

    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

        }
        return changes;
    }

    private ParameterImpl createManagedParameter(TableWrapper table, Property property, int idx) {
        ParameterImpl param = new ManagedParameterImpl();
        param.setName(property.getName());
        param.setType(property.getType());
        param.setConverter(getConverter(table.getConverter(property.getName())));
        if (idx != -1) {
            param.setIndex(idx);
        }

        return param;
    }
View Full Code Here

        return param;
    }

    private ParameterImpl createParameter(TableWrapper table, Property property, int idx) {
        ParameterImpl param = new ParameterImpl();
        param.setName(property.getName());
        param.setType(property.getType());
        param.setConverter(getConverter(table.getConverter(property.getName())));
        if (idx != -1) {
            param.setIndex(idx);
        }

        return param;
    }
View Full Code Here

        InsertCommandImpl cmd = new InsertCommandImpl(statement.toString(),
                (String[]) generatedKeys.toArray(new String[0]));
        Iterator params = parameters.iterator();
        for (int idx = 1; params.hasNext(); idx++) {
            Property property = (Property) params.next();
            ParameterImpl p = new ParameterImpl();
            p.setName(property.getName());
            p.setType(property.getType());
            p.setConverter(getConverter(table.getConverter(property.getName())));
            p.setIndex(idx);
            cmd.addParameter(p);

        }
        if (this.logger.isDebugEnabled()) {
            this.logger.debug(statement.toString());
View Full Code Here

        DeleteCommandImpl deleteCommand = new DeleteCommandImpl(getDeleteStatement(t));

        Iterator i = tw.getPrimaryKeyProperties().iterator();
        for (int idx = 1; i.hasNext(); idx++) {
            String property = (String) i.next();
            ParameterImpl p = new ParameterImpl();
            p.setName(property);
            p.setType(SDODataTypes.OBJECT);
            p.setConverter(getConverter(tw.getConverter(property)));
            p.setIndex(idx);
            deleteCommand.addParameter(p);
        }
        return deleteCommand;
    }
View Full Code Here

                }
               
                if (value == null) {                  
                    statement.append(" is null");                   
                } else {
                    ParameterImpl param = createCollisionParameter(tableWrapper, changedProperty, idx++);
                    statement.append(" = ?");
                    param.setValue(value);
                    parameters.add(param);
                }
               
              
            }
View Full Code Here

        }

        return param;
    }
    private ParameterImpl createCollisionParameter(TableWrapper tableWrapper, Property property, int i) {
        ParameterImpl param = new CollisionParameter();
        return fillParameter(param, tableWrapper, property, i);
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.das.rdb.impl.ParameterImpl

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.