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

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


      statement.append(" = ?");
      parameters.add(type.getProperty(t.getCollisionColumnPropertyName()));
    }

   
    UpdateCommandImpl updateCommand;
    if ( t.getCollisionColumn() != null )
      updateCommand = new OptimisticWriteCommandImpl(statement.toString());
    else
      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


            statement.append(t.getCollisionColumn().getColumnName());
            statement.append(" = ?");
            whereClauseProperties.add(type.getProperty(t.getCollisionColumnPropertyName()));
        }

        UpdateCommandImpl updateCommand;
        if (t.getCollisionColumn() != null) {
            updateCommand = new OptimisticWriteCommandImpl(statement.toString());
        } else {
            updateCommand = new UpdateCommandImpl(statement.toString());
        }

        int idx = 1;
        Iterator params = updatedProperties.iterator();
        while (params.hasNext()) {
            Property p = (Property) params.next();
            updateCommand.addParameter(createParameter(t, p, idx++));
        }

        params = managedProperties.iterator();
        while (params.hasNext()) {
            Property p = (Property) params.next();
            updateCommand.addParameter(createManagedParameter(t, p, idx++));
        }

        params = whereClauseProperties.iterator();
        while (params.hasNext()) {
            Property p = (Property) params.next();
            updateCommand.addParameter(createParameter(t, p, idx++));
        }

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

            statement.append(" = ?");
            parameters.add(createParameter(tableWrapper,
                    type.getProperty(tableWrapper.getCollisionColumnPropertyName()), idx++));                      
        }                 

        UpdateCommandImpl updateCommand = new OptimisticWriteCommandImpl(statement.toString());
       
        Iterator params = parameters.iterator();
        while (params.hasNext()) {          
          updateCommand.addParameter((ParameterExtendedImpl) params.next());
        }
          
        if (this.logger.isDebugEnabled()) {
            this.logger.debug(statement.toString());
        }
View Full Code Here

            statement.append(" = ?");
            parameters.add(createParameter(tableWrapper,
                    type.getProperty(tableWrapper.getCollisionColumnPropertyName()), idx++));                      
        }                 

        UpdateCommandImpl updateCommand = new OptimisticWriteCommandImpl(statement.toString());
       
        Iterator params = parameters.iterator();
        while (params.hasNext()) {          
            updateCommand.addParameter((ParameterImpl) params.next());
        }
          
        if (this.logger.isDebugEnabled()) {
            this.logger.debug(statement.toString());
        }
View Full Code Here

TOP

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

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.