tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r574147 - in /incubator/tuscany/java/das/rdb/src: main/java/org/apache/tuscany/das/rdb/ main/java/org/apache/tuscany/das/rdb/config/wrapper/ main/java/org/apache/tuscany/das/rdb/generator/impl/ main/java/org/apache/tuscany/das/rdb/impl/ mai...
Date Mon, 10 Sep 2007 06:20:54 GMT
Author: lresende
Date: Sun Sep  9 23:20:52 2007
New Revision: 574147

URL: http://svn.apache.org/viewvc?rev=574147&view=rev
Log:
TUSCANY-1462 - Applying patch from Amita

Modified:
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/Command.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/ConfigHelper.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/config/wrapper/MappingWrapper.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/DeleteGenerator.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/InsertGenerator.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/UpdateGenerator.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ChangeOperation.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CollisionParameter.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CommandImpl.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DASImpl.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DeleteCommandImpl.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/InsertCommandImpl.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ManagedParameterImpl.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ReadCommandImpl.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SDODataTypeHelper.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SDODataTypes.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SPCommandImpl.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/Statement.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/UpdateCommandImpl.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/WriteCommandImpl.java
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/util/ConfigUtil.java
    incubator/tuscany/java/das/rdb/src/main/resources/config.xsd
    incubator/tuscany/java/das/rdb/src/test/java/org/apache/tuscany/das/rdb/test/ProgrammaticConfigTests.java
    incubator/tuscany/java/das/rdb/src/test/java/org/apache/tuscany/das/rdb/test/suites/AllCommonTests.java
    incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD.xml
    incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD2.xml
    incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/Command.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/Command.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/Command.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/Command.java Sun Sep  9 23:20:52 2007
@@ -63,6 +63,23 @@
     Object getParameter(int index);
 
     /**
+     * 
+     * @param name Name of parameter - should match exact name of database table column 
+     * as appearing in Command
+     * @param value 
+     * 		the value of the parameter
+     */
+    void setParameter(String name, Object value);
+    
+    /**
+     * 
+     * @param name
+     * 			the name of the parameter - should match exact name of database table column
+     * @return  the value of the parameter
+     */
+    Object getParameter(String name);
+    
+    /**
      * Returns the value of the database-generated key. This method is specific 
      * to an "insert" command and will be valid only after the command has
      * been executed.

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/ConfigHelper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/ConfigHelper.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/ConfigHelper.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/ConfigHelper.java Sun Sep  9 23:20:52 2007
@@ -25,10 +25,12 @@
 import org.apache.tuscany.das.rdb.config.Command;
 import org.apache.tuscany.das.rdb.config.Config;
 import org.apache.tuscany.das.rdb.config.ConfigFactory;
+import org.apache.tuscany.das.rdb.config.Parameters;
 import org.apache.tuscany.das.rdb.config.Relationship;
 import org.apache.tuscany.das.rdb.config.Table;
 import org.apache.tuscany.das.rdb.config.wrapper.MappingWrapper;
 import org.apache.tuscany.das.rdb.util.ConfigUtil;
+import org.apache.tuscany.das.rdb.impl.ParametersExtendedImpl;
 
 /**
  * A ConfigHelper is used as an aid in programmatic construction of Config instances.
@@ -135,19 +137,43 @@
      * Add an update statement for a given table
      * @param table
      * @param statement
-     * @param parameters
+     * @param parameters String - names separated with space
      */
-    public void addUpdateStatement(Table table, String statement, String parameters) {
-        configWrapper.addUpdateStatement(table, statement, parameters);
+    public void addUpdateStatement(Table table, String statement, String parameters) {    	
+    	ParametersExtendedImpl parametersExtendedImpl = new ParametersExtendedImpl();
+    	parametersExtendedImpl.addParameters(ParametersExtendedImpl.getParameters(parameters));
+        configWrapper.addUpdateStatement(table, statement, parametersExtendedImpl);
     }
 
     /**
+     * Add an update statement for a given table
+     * @param table
+     * @param statement
+     * @param parameters <Parameters>
+     */    
+    public void addUpdateStatement(Table table, String statement, Parameters parameters) {
+         configWrapper.addUpdateStatement(table, statement, parameters);
+     }
+    
+    /**
      * Add create statement for a given table
      * @param table
      * @param statement
-     * @param parameters
+     * @param parameters String - names separated with space
      */
     public void addCreateStatement(Table table, String statement, String parameters) {
+    	ParametersExtendedImpl parametersExtendedImpl = new ParametersExtendedImpl();
+    	parametersExtendedImpl.addParameters(ParametersExtendedImpl.getParameters(parameters));    	
+        configWrapper.addCreateStatement(table, statement, parametersExtendedImpl);
+    }
+    	
+    /**
+     * Add create statement for a given table
+     * @param table
+     * @param statement
+     * @param parameters <Parameters>
+     */    
+    public void addCreateStatement(Table table, String statement, Parameters parameters) {   	
         configWrapper.addCreateStatement(table, statement, parameters);
     }
 
@@ -155,9 +181,21 @@
      * Add delete statement for a given table
      * @param table
      * @param statement
-     * @param parameters
+     * @param parameters String - names separated with space
      */
     public void addDeleteStatement(Table table, String statement, String parameters) {
+    	ParametersExtendedImpl parametersExtendedImpl = new ParametersExtendedImpl();
+    	parametersExtendedImpl.addParameters(ParametersExtendedImpl.getParameters(parameters));    	
+        configWrapper.addDeleteStatement(table, statement, parametersExtendedImpl);
+    }
+
+    /**
+     * Add delete statement for a given table
+     * @param table
+     * @param statement
+     * @param parameters <Parameters>
+     */    
+    public void addDeleteStatement(Table table, String statement, Parameters parameters) {
         configWrapper.addDeleteStatement(table, statement, parameters);
     }
 

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/config/wrapper/MappingWrapper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/config/wrapper/MappingWrapper.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/config/wrapper/MappingWrapper.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/config/wrapper/MappingWrapper.java Sun Sep  9 23:20:52 2007
@@ -37,6 +37,7 @@
 import org.apache.tuscany.das.rdb.config.Create;
 import org.apache.tuscany.das.rdb.config.Delete;
 import org.apache.tuscany.das.rdb.config.KeyPair;
+import org.apache.tuscany.das.rdb.config.Parameters;
 import org.apache.tuscany.das.rdb.config.Relationship;
 import org.apache.tuscany.das.rdb.config.Table;
 import org.apache.tuscany.das.rdb.config.Update;
@@ -652,7 +653,7 @@
         throw new RuntimeException("Could not find relationship " + name + " in the configuration");
     }
 
-    public void addUpdateStatement(Table table, String statement, String parameters) {
+    public void addUpdateStatement(Table table, String statement, Parameters parameters) {
 
         Update update = ConfigFactory.INSTANCE.createUpdate();
         update.setSql(statement);
@@ -661,7 +662,7 @@
 
     }
 
-    public void addDeleteStatement(Table table, String statement, String parameters) {
+    public void addDeleteStatement(Table table, String statement, Parameters parameters) {
 
         Delete delete = ConfigFactory.INSTANCE.createDelete();
         delete.setSql(statement);
@@ -670,7 +671,7 @@
 
     }
 
-    public void addCreateStatement(Table table, String statement, String parameters) {
+    public void addCreateStatement(Table table, String statement, Parameters parameters) {
 
         Create create = ConfigFactory.INSTANCE.createCreate();
         create.setSql(statement);

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/DeleteGenerator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/DeleteGenerator.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/DeleteGenerator.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/DeleteGenerator.java Sun Sep  9 23:20:52 2007
@@ -25,7 +25,8 @@
 import org.apache.tuscany.das.rdb.config.wrapper.MappingWrapper;
 import org.apache.tuscany.das.rdb.config.wrapper.TableWrapper;
 import org.apache.tuscany.das.rdb.impl.DeleteCommandImpl;
-import org.apache.tuscany.das.rdb.impl.ParameterImpl;
+import org.apache.tuscany.das.rdb.impl.ParameterExtendedImpl;
+import org.apache.tuscany.das.rdb.impl.SDODataTypeHelper;
 import org.apache.tuscany.das.rdb.impl.SDODataTypes;
 
 public final class DeleteGenerator extends BaseGenerator {
@@ -77,9 +78,9 @@
         Iterator i = tw.getPrimaryKeyProperties().iterator();
         for (int idx = 1; i.hasNext(); idx++) {
             String property = (String) i.next();
-            ParameterImpl p = new ParameterImpl();
+            ParameterExtendedImpl p = new ParameterExtendedImpl();
             p.setName(property);
-            p.setType(SDODataTypes.OBJECT);
+            p.setColumnType(SDODataTypeHelper.columnTypeForSDOType(SDODataTypes.OBJECT));
             p.setConverter(getConverter(tw.getConverter(property)));
             p.setIndex(idx);
             deleteCommand.addParameter(p);

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/InsertGenerator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/InsertGenerator.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/InsertGenerator.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/InsertGenerator.java Sun Sep  9 23:20:52 2007
@@ -31,7 +31,8 @@
 import org.apache.tuscany.das.rdb.config.wrapper.RelationshipWrapper;
 import org.apache.tuscany.das.rdb.config.wrapper.TableWrapper;
 import org.apache.tuscany.das.rdb.impl.InsertCommandImpl;
-import org.apache.tuscany.das.rdb.impl.ParameterImpl;
+import org.apache.tuscany.das.rdb.impl.ParameterExtendedImpl;
+import org.apache.tuscany.das.rdb.impl.SDODataTypeHelper;
 import org.apache.tuscany.das.rdb.util.CollectionsUtil;
 
 import commonj.sdo.DataObject;
@@ -109,9 +110,10 @@
         Iterator params = parameters.iterator();
         for (int idx = 1; params.hasNext(); idx++) {
             Property property = (Property) params.next();
-            ParameterImpl p = new ParameterImpl();
+            ParameterExtendedImpl p = new ParameterExtendedImpl();
             p.setName(property.getName());
             p.setType(property.getType());
+            p.setColumnType(SDODataTypeHelper.columnTypeForSDOType(property.getType()));
             p.setConverter(getConverter(table.getConverter(property.getName())));
             p.setIndex(idx);
             cmd.addParameter(p);

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/UpdateGenerator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/UpdateGenerator.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/UpdateGenerator.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/UpdateGenerator.java Sun Sep  9 23:20:52 2007
@@ -32,7 +32,8 @@
 import org.apache.tuscany.das.rdb.impl.CollisionParameter;
 import org.apache.tuscany.das.rdb.impl.ManagedParameterImpl;
 import org.apache.tuscany.das.rdb.impl.OptimisticWriteCommandImpl;
-import org.apache.tuscany.das.rdb.impl.ParameterImpl;
+import org.apache.tuscany.das.rdb.impl.ParameterExtendedImpl;
+import org.apache.tuscany.das.rdb.impl.SDODataTypeHelper;
 import org.apache.tuscany.das.rdb.impl.UpdateCommandImpl;
 
 import commonj.sdo.ChangeSummary;
@@ -123,7 +124,7 @@
                 if (value == null) {                   
                     statement.append(" is null");                    
                 } else {
-                    ParameterImpl param = createCollisionParameter(tableWrapper, changedProperty, idx++);
+                	ParameterExtendedImpl param = createCollisionParameter(tableWrapper, changedProperty, idx++);
                     statement.append(" = ?");
                     param.setValue(value);
                     parameters.add(param);
@@ -144,7 +145,7 @@
         
         Iterator params = parameters.iterator();
         while (params.hasNext()) {           
-            updateCommand.addParameter((ParameterImpl) params.next());
+        	updateCommand.addParameter((ParameterExtendedImpl) params.next());
         }
            
         if (this.logger.isDebugEnabled()) {
@@ -200,28 +201,28 @@
         return changes;
     }
 
-    private ParameterImpl fillParameter(ParameterImpl param, TableWrapper table, Property property, int idx) {
+    private ParameterExtendedImpl fillExtendedParameter(ParameterExtendedImpl param, TableWrapper table, Property property, int idx) {
         param.setName(property.getName());
         param.setType(property.getType());
         param.setConverter(getConverter(table.getConverter(property.getName())));
         if (idx != -1) {
             param.setIndex(idx);
         }
-
+        param.setColumnType(SDODataTypeHelper.columnTypeForSDOType(property.getType()));
         return param;
     }
-    private ParameterImpl createCollisionParameter(TableWrapper tableWrapper, Property property, int i) {
-        ParameterImpl param = new CollisionParameter();
-        return fillParameter(param, tableWrapper, property, i);
+    private ParameterExtendedImpl createCollisionParameter(TableWrapper tableWrapper, Property property, int i) {
+    	ParameterExtendedImpl param = new CollisionParameter();
+    	return fillExtendedParameter(param, tableWrapper, property, i);
     }
     
-    private ParameterImpl createManagedParameter(TableWrapper table, Property property, int idx) {
-        ParameterImpl param = new ManagedParameterImpl();
-        return fillParameter(param, table, property, idx);
+    private ParameterExtendedImpl createManagedParameter(TableWrapper table, Property property, int idx) {
+    	ParameterExtendedImpl param = new ManagedParameterImpl();
+    	return fillExtendedParameter(param, table, property, idx);
     }
 
-    private ParameterImpl createParameter(TableWrapper table, Property property, int idx) {
-        ParameterImpl param = new ParameterImpl();
-        return fillParameter(param, table, property, idx);
+    private ParameterExtendedImpl createParameter(TableWrapper table, Property property, int idx) {
+    	ParameterExtendedImpl param = new ParameterExtendedImpl();
+    	return fillExtendedParameter(param, table, property, idx);
     }
 }

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ChangeOperation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ChangeOperation.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ChangeOperation.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ChangeOperation.java Sun Sep  9 23:20:52 2007
@@ -60,8 +60,8 @@
 
         Iterator i = writeCommand.getParameters().iterator();
         while (i.hasNext()) {
-            ParameterImpl parm = (ParameterImpl) i.next();
-
+        	ParameterExtendedImpl parm = (ParameterExtendedImpl) i.next();
+            
             if (this.logger.isDebugEnabled()) {
                 this.logger.debug("setting " + parm.getName() + " to " + dObject.get(parm.getName()));
             }

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CollisionParameter.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CollisionParameter.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CollisionParameter.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CollisionParameter.java Sun Sep  9 23:20:52 2007
@@ -18,7 +18,7 @@
  */
 package org.apache.tuscany.das.rdb.impl;
 
-public class CollisionParameter extends ParameterImpl {
+public class CollisionParameter extends ParameterExtendedImpl {
 
     private boolean isSet;
 

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CommandImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CommandImpl.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CommandImpl.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/CommandImpl.java Sun Sep  9 23:20:52 2007
@@ -21,6 +21,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
+import java.util.Iterator;
 import java.util.List;
 
 import org.apache.tuscany.das.rdb.Command;
@@ -32,12 +33,10 @@
     
     protected Statement statement;
 
-    protected Parameters parameters = new Parameters();
-
-   
+    protected ParametersExtendedImpl parameters = new ParametersExtendedImpl();
 
     protected ResultSetShape resultSetShape;
-
+    
     public CommandImpl(String sqlString) {
         statement = new Statement(sqlString);
 
@@ -56,24 +55,74 @@
 
     }
 
+    public CommandImpl(org.apache.tuscany.das.rdb.config.Command command) {
+        this(command.getSQL());
+        
+        if(command.getParameter() != null && command.getParameter().size() > 0) {
+    		Iterator itr = command.getParameter().iterator();
+    		int index = 1;
+    		while(itr.hasNext()){
+    			org.apache.tuscany.das.rdb.config.impl.ParameterImpl param = (org.apache.tuscany.das.rdb.config.impl.ParameterImpl)itr.next();
+    			if(param.getIndex() <= 0){
+    				param.setIndex(index);
+    				index++;
+    			}
+    			ParameterExtendedImpl paramExt = new ParameterExtendedImpl(param);
+    			addToParameters(paramExt);
+    		}
+    	}
+    }
+
+    private void addToParameters(ParameterExtendedImpl paramExt) {
+		this.parameters.getParameter().add(paramExt);
+		if(paramExt.getDirection().equals(ParameterExtendedImpl.IN)){
+			parameters.getInParameters().add(paramExt);
+		}
+		else{
+			parameters.getOutParameters().add(paramExt);
+		}
+    }
+    
     public abstract void execute();
 
     public abstract DataObject executeQuery();
 
     public void setParameter(int index, Object value) {
-        parameters.setParameter(index, value);
-    }
-
-    public void addParameter(ParameterImpl param) {
-        parameters.add(param);
+    	ParameterExtendedImpl param = parameters.getParameter(index);
+    	if(param != null){
+    		param.setValue(value);
+    		return;
+    	}
+    		
+    	param = new ParameterExtendedImpl();
+    	param.setIndex(index);
+    	param.setValue(value);
+    	param.setDirection(ParameterExtendedImpl.IN);
+    	parameters.getParameter().add(param);
+    	parameters.getInParameters().add(param);    	    		
+    }
+
+    public void addParameter(ParameterExtendedImpl param) {
+    	//eliminate/replace duplicate params, index is filled, so can check it for duplicate
+    	ParameterExtendedImpl paramExt = parameters.getParameter(param.getIndex());
+    	if(paramExt != null)
+    		paramExt = new ParameterExtendedImpl(param);
+    	
+    	paramExt = parameters.getParameter(param.getIndex(), param.getDirection());
+    	if(paramExt != null){
+    		paramExt = new ParameterExtendedImpl(param);
+    		return;
+    	}
+    	
+    	addToParameters(param);
     }
 
     public List getParameters() {
-        return parameters.parameterList();
+    	return parameters.getParameter();
     }
 
     public Object getParameter(int index) {
-        return parameters.parameterWithIndex(index).getValue();
+    	return parameters.getParameter(index).getValue();
     }
 
     public void setConnection(ConnectionImpl connection) {
@@ -96,4 +145,34 @@
         statement.close();
     }
 
+    //default direction IN assumed
+    public void setParameter(String name, Object value) {
+    	ParameterExtendedImpl param = parameters.getParameter(name);
+    	if(param != null){
+			param.setValue(value);
+			return;
+    	}
+    		
+    	param = new ParameterExtendedImpl();
+    	param.setIndex(parameters.getParameter().size()+1);
+    	param.setName(name);
+    	param.setValue(value);
+    	param.setDirection(ParameterExtendedImpl.IN);
+    	parameters.getParameter().add(param);
+    	parameters.getInParameters().add(param);
+	}
+
+    //default direction IN assumed
+    public Object getParameter(String name) {
+		Iterator itr = this.parameters.getInParameters().iterator();
+		while(itr.hasNext()){
+			ParameterExtendedImpl param = ((ParameterExtendedImpl)itr.next());
+			
+			if(param.getName() != null && param.getName().equalsIgnoreCase(name)){				
+				return param.value;
+			}
+		}
+		return null;
+	}
+    
 }

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DASImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DASImpl.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DASImpl.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DASImpl.java Sun Sep  9 23:20:52 2007
@@ -74,13 +74,13 @@
                 (org.apache.tuscany.das.rdb.config.Command) i.next();
             String kind = commandConfig.getKind();
             if (kind.equalsIgnoreCase("select")) {
-                commands.put(commandConfig.getName(), new ReadCommandImpl(commandConfig.getSQL(), configWrapper, commandConfig.getResultDescriptor()));
+                commands.put(commandConfig.getName(), new ReadCommandImpl(commandConfig, configWrapper, commandConfig.getResultDescriptor()));
             } else if (kind.equalsIgnoreCase("update")) {
-                commands.put(commandConfig.getName(), new UpdateCommandImpl(commandConfig.getSQL()));
+                commands.put(commandConfig.getName(), new UpdateCommandImpl(commandConfig));
             } else if (kind.equalsIgnoreCase("insert")) {
-                commands.put(commandConfig.getName(), new InsertCommandImpl(commandConfig.getSQL(), new String[0]));
+                commands.put(commandConfig.getName(), new InsertCommandImpl(commandConfig, new String[0]));
             } else if (kind.equalsIgnoreCase("delete")) {
-                commands.put(commandConfig.getName(), new DeleteCommandImpl(commandConfig.getSQL()));
+                commands.put(commandConfig.getName(), new DeleteCommandImpl(commandConfig));
             } else if (kind.equalsIgnoreCase("procedure")) {
                 commands.put(commandConfig.getName(), new SPCommandImpl(commandConfig.getSQL(), configWrapper, commandConfig.getParameter()));
             } else {
@@ -310,4 +310,4 @@
         getApplyChangesCommand().execute(root);
     }
 
-}
\ No newline at end of file
+}

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DeleteCommandImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DeleteCommandImpl.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DeleteCommandImpl.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DeleteCommandImpl.java Sun Sep  9 23:20:52 2007
@@ -21,14 +21,17 @@
 import org.apache.tuscany.das.rdb.config.Delete;
 
 public class DeleteCommandImpl extends WriteCommandImpl {
-
+	public DeleteCommandImpl(org.apache.tuscany.das.rdb.config.Command command) {
+		super(command);
+	}
+	
     public DeleteCommandImpl(String sqlString) {
         super(sqlString);
     }
 
     public DeleteCommandImpl(Delete delete) {
         super(delete.getSql());
-        addParameters(delete.getParameters());
+        this.addParameters(delete.getParameters());
     }
 
 }

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/InsertCommandImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/InsertCommandImpl.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/InsertCommandImpl.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/InsertCommandImpl.java Sun Sep  9 23:20:52 2007
@@ -26,6 +26,11 @@
 
     private String[] keys;
 
+    public InsertCommandImpl(org.apache.tuscany.das.rdb.config.Command command, String[] generatedKeys) {
+    	super(command);
+    	keys = generatedKeys;
+    }
+    
     public InsertCommandImpl(String sqlString, String[] generatedKeys) {
         super(sqlString);
         keys = generatedKeys;
@@ -33,7 +38,7 @@
 
     public InsertCommandImpl(Create create) {
         super(create.getSql());
-        addParameters(create.getParameters());
+        this.addParameters(create.getParameters());
         this.keys = new String[0];
     }
 

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ManagedParameterImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ManagedParameterImpl.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ManagedParameterImpl.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ManagedParameterImpl.java Sun Sep  9 23:20:52 2007
@@ -20,7 +20,7 @@
 
 import java.math.BigDecimal;
 
-public class ManagedParameterImpl extends ParameterImpl {
+public class ManagedParameterImpl extends ParameterExtendedImpl {
 
     public void setValue(Object oldValue) {
         this.value = updateValue(oldValue);

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ReadCommandImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ReadCommandImpl.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ReadCommandImpl.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/ReadCommandImpl.java Sun Sep  9 23:20:52 2007
@@ -44,6 +44,15 @@
 
     private List resultDescriptors = null;
     
+    public ReadCommandImpl(org.apache.tuscany.das.rdb.config.Command command, MappingWrapper mapping, List resultDescriptor) {
+        super(command);
+        this.configWrapper = mapping;
+        
+        if (resultDescriptor != null && !resultDescriptor.isEmpty()) {
+            this.resultSetShape = new ResultSetShape(resultDescriptor, configWrapper.getConfig());//JIRA-952
+        }
+    }
+    
     public ReadCommandImpl(String sqlString, MappingWrapper mapping, List resultDescriptor) {
         super(sqlString);
         this.configWrapper = mapping;

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SDODataTypeHelper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SDODataTypeHelper.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SDODataTypeHelper.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SDODataTypeHelper.java Sun Sep  9 23:20:52 2007
@@ -28,6 +28,84 @@
         
     }
     
+    public static String columnTypeForSDOType(Type sdoType){
+    	if(sdoType == null){
+    		return null;
+    	}
+    	
+    	if (sdoType == SDODataTypes.BOOLEAN) {
+            return SDODataTypes.BOOLEAN_STR;
+        } else if (sdoType == SDODataTypes.STRING) {
+            return SDODataTypes.STRING_STR;
+        } else if (sdoType == SDODataTypes.BYTE) {
+            return SDODataTypes.BYTE_STR;
+        } else if (sdoType == SDODataTypes.BYTES) {
+            return SDODataTypes.BYTES_STR;
+        } else if (sdoType == SDODataTypes.CHARACTER) {
+            return SDODataTypes.CHARACTER_STR;
+        } else if (sdoType == SDODataTypes.DATE) {
+            return SDODataTypes.DATE_STR;
+        } else if (sdoType == SDODataTypes.DATETIME) {
+            return SDODataTypes.DATETIME_STR;
+        } else if (sdoType == SDODataTypes.DAY) {
+            return SDODataTypes.DAY_STR;
+        } else if (sdoType == SDODataTypes.DECIMAL) {
+            return SDODataTypes.DECIMAL_STR;
+        } else if (sdoType == SDODataTypes.DOUBLE) {
+            return SDODataTypes.DOUBLE_STR;
+        } else if (sdoType == SDODataTypes.DURATION) {
+            return SDODataTypes.DURATION_STR;
+        } else if (sdoType == SDODataTypes.FLOAT) {
+            return SDODataTypes.FLOAT_STR;
+        } else if (sdoType == SDODataTypes.INT) {
+            return SDODataTypes.INT_STR;
+        } else if (sdoType == SDODataTypes.INTEGER) {
+            return SDODataTypes.INTEGER_STR;
+        } else if (sdoType == SDODataTypes.LONG) {
+            return SDODataTypes.LONG_STR;
+        } else if (sdoType == SDODataTypes.MONTH) {
+            return SDODataTypes.MONTH_STR;
+        } else if (sdoType == SDODataTypes.MONTHDAY) {
+            return SDODataTypes.MONTHDAY_STR;
+        } else if (sdoType == SDODataTypes.OBJECT) {
+            return SDODataTypes.OBJECT_STR;            
+        } else if (sdoType == SDODataTypes.SHORT) {
+            return SDODataTypes.SHORT_STR;
+        } else if (sdoType == SDODataTypes.STRING) {
+            return SDODataTypes.STRING_STR;
+        } else if (sdoType == SDODataTypes.STRINGS) {
+            return SDODataTypes.STRINGS_STR;
+        } else if (sdoType == SDODataTypes.TIME) {
+            return SDODataTypes.TIME_STR;
+        } else if (sdoType == SDODataTypes.URI) {
+            return SDODataTypes.URI_STR;
+        } else if (sdoType == SDODataTypes.YEAR) {
+            return SDODataTypes.YEAR_STR;
+        } else if (sdoType == SDODataTypes.YEARMONTH) {
+            return SDODataTypes.YEARMONTH_STR;
+        } else if (sdoType == SDODataTypes.YEARMONTHDAY) {
+            return SDODataTypes.YEARMONTHDAY_STR;
+        } else if (sdoType == SDODataTypes.BOOLEANOBJECT) {
+            return SDODataTypes.BOOLEANOBJECT_STR;
+        } else if (sdoType == SDODataTypes.BYTEOBJECT) {
+            return SDODataTypes.BYTEOBJECT_STR;
+        } else if (sdoType == SDODataTypes.CHARACTEROBJECT) {
+            return SDODataTypes.CHARACTEROBJECT_STR;
+        } else if (sdoType == SDODataTypes.DOUBLEOBJECT) {
+            return SDODataTypes.DOUBLEOBJECT_STR;
+        } else if (sdoType == SDODataTypes.FLOATOBJECT) {
+            return SDODataTypes.FLOATOBJECT_STR;
+        } else if (sdoType == SDODataTypes.INTEGEROBJECT) {
+            return SDODataTypes.INTEGEROBJECT_STR;
+        } else if (sdoType == SDODataTypes.LONGOBJECT) {
+            return SDODataTypes.LONGOBJECT_STR;
+        } else if (sdoType == SDODataTypes.SHORTOBJECT) {
+            return SDODataTypes.SHORTOBJECT_STR;
+        } else {
+            throw new RuntimeException("Not a valid SDO Type " + sdoType);
+        }    	
+    }
+    
     public static int sqlTypeFor(Type sdoType) {
         if (sdoType == null) {
             return Types.OTHER;

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SDODataTypes.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SDODataTypes.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SDODataTypes.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SDODataTypes.java Sun Sep  9 23:20:52 2007
@@ -30,69 +30,102 @@
     public static final TypeHelper TYPE_HELPER = TypeHelper.INSTANCE;
 
     public static final Type BOOLEAN = TYPE_HELPER.getType("commonj.sdo", "Boolean");
-
+    public static final String BOOLEAN_STR = "commonj.sdo.Boolean";
+    
     public static final Type BYTE = TYPE_HELPER.getType("commonj.sdo", "Byte");
-
+    public static final String BYTE_STR = "commonj.sdo.Byte";
+    
     public static final Type BYTES = TYPE_HELPER.getType("commonj.sdo", "Bytes");
-
+    public static final String BYTES_STR = "commonj.sdo.Bytes";
+    
     public static final Type CHARACTER = TYPE_HELPER.getType("commonj.sdo", "Character");
-
+    public static final String CHARACTER_STR = "commonj.sdo.Character";
+    
     public static final Type DATE = TYPE_HELPER.getType("commonj.sdo", "Date");
-
+    public static final String DATE_STR = "commonj.sdo.Date";
+    
     public static final Type DATETIME = TYPE_HELPER.getType("commonj.sdo", "Date");
-
+    public static final String DATETIME_STR = "commonj.sdo.Date";
+    
     public static final Type DAY = TYPE_HELPER.getType("commonj.sdo", "Date");
-
+    public static final String DAY_STR = "commonj.sdo.Day";
+    
     public static final Type DECIMAL = TYPE_HELPER.getType("commonj.sdo", "Float");
-
+    public static final String DECIMAL_STR = "commonj.sdo.Float";
+    
     public static final Type DOUBLE = TYPE_HELPER.getType("commonj.sdo", "Double");
-
+    public static final String DOUBLE_STR = "commonj.sdo.Double";
+    
     public static final Type DURATION = TYPE_HELPER.getType("commonj.sdo", "Date");
-
+    public static final String DURATION_STR = "commonj.sdo.Date";
+    
     public static final Type FLOAT = TYPE_HELPER.getType("commonj.sdo", "Float");
-
+    public static final String FLOAT_STR = "commonj.sdo.Float";
+    
     public static final Type INT = TYPE_HELPER.getType("commonj.sdo", "Int");
-
+    public static final String INT_STR = "commonj.sdo.Int";
+    
     public static final Type INTEGER = TYPE_HELPER.getType("commonj.sdo", "Integer");
-
+    public static final String INTEGER_STR = "commonj.sdo.Integer";
+    
     public static final Type LONG = TYPE_HELPER.getType("commonj.sdo", "Long");
-
+    public static final String LONG_STR = "commonj.sdo.Long";
+    
     public static final Type MONTH = TYPE_HELPER.getType("commonj.sdo", "Date");
-
+    public static final String MONTH_STR = "commonj.sdo.Date";
+    
     public static final Type MONTHDAY = TYPE_HELPER.getType("commonj.sdo", "Date");
-
+    public static final String MONTHDAY_STR = "commonj.sdo.Date";
+    
     public static final Type OBJECT = TYPE_HELPER.getType("commonj.sdo", "Object");
-
+    public static final String OBJECT_STR = "commonj.sdo.Object";
+    
     public static final Type SHORT = TYPE_HELPER.getType("commonj.sdo", "Short");
-
+    public static final String SHORT_STR = "commonj.sdo.Short";
+    
     public static final Type STRING = TYPE_HELPER.getType("commonj.sdo", "String");
-
+    public static final String STRING_STR = "commonj.sdo.String";
+    
     public static final Type STRINGS = TYPE_HELPER.getType("commonj.sdo", "String");
-
+    public static final String STRINGS_STR = "commonj.sdo.String";
+    
     public static final Type TIME = TYPE_HELPER.getType("commonj.sdo", "Date");
-
+    public static final String TIME_STR = "commonj.sdo.Date";
+    
     public static final Type URI = TYPE_HELPER.getType("commonj.sdo", "String");
-
+    public static final String URI_STR = "commonj.sdo.String";
+    
     public static final Type YEAR = TYPE_HELPER.getType("commonj.sdo", "Date");
-
+    public static final String YEAR_STR = "commonj.sdo.Date";
+    
     public static final Type YEARMONTH = TYPE_HELPER.getType("commonj.sdo", "Date");
-
+    public static final String YEARMONTH_STR = "commonj.sdo.Date";
+    
     public static final Type YEARMONTHDAY = TYPE_HELPER.getType("commonj.sdo", "Date");
-
+    public static final String YEARMONTHDAY_STR = "commonj.sdo.Date";
+    
     public static final Type BOOLEANOBJECT = TYPE_HELPER.getType("commonj.sdo", "BooleanObject");
-
+    public static final String BOOLEANOBJECT_STR = "commonj.sdo.BooleanObject";
+    
     public static final Type BYTEOBJECT = TYPE_HELPER.getType("commonj.sdo", "ByteObject");
-
+    public static final String BYTEOBJECT_STR = "commonj.sdo.ByteObject";
+    
     public static final Type CHARACTEROBJECT = TYPE_HELPER.getType("commonj.sdo", "CharacterObject");
-
+    public static final String CHARACTEROBJECT_STR = "commonj.sdo.CharacterObject";
+    
     public static final Type DOUBLEOBJECT = TYPE_HELPER.getType("commonj.sdo", "DoubleObject");
-
+    public static final String DOUBLEOBJECT_STR = "commonj.sdo.DoubleObject";
+    
     public static final Type FLOATOBJECT = TYPE_HELPER.getType("commonj.sdo", "FloatObject");
-
+    public static final String FLOATOBJECT_STR = "commonj.sdo.FloatObject";
+    
     public static final Type INTEGEROBJECT = TYPE_HELPER.getType("commonj.sdo", "IntObject");
-
+    public static final String INTEGEROBJECT_STR = "commonj.sdo.IntObject";
+    
     public static final Type LONGOBJECT = TYPE_HELPER.getType("commonj.sdo", "LongObject");
-
+    public static final String LONGOBJECT_STR = "commonj.sdo.LongObject";
+    
     public static final Type SHORTOBJECT = TYPE_HELPER.getType("commonj.sdo", "ShortObject");
-
+    public static final String SHORTOBJECT_STR = "commonj.sdo.ShortObject";
+    
 }

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SPCommandImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SPCommandImpl.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SPCommandImpl.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SPCommandImpl.java Sun Sep  9 23:20:52 2007
@@ -32,7 +32,7 @@
 
 public class SPCommandImpl extends ReadCommandImpl {
     private final Logger logger = Logger.getLogger(SPCommandImpl.class);
-
+   
     public SPCommandImpl(String sqlString, MappingWrapper config, List params) {
         super(sqlString, config, null);
         Iterator i = params.iterator();
@@ -45,11 +45,11 @@
 
             Type sdoType = TypeHelper.INSTANCE.getType(pkg, typeName);
 
-            int direction = ParameterImpl.IN;
-            if ("OUT".equalsIgnoreCase(p.getDirection())) {
-                direction = ParameterImpl.OUT;
-            } else if ("INOUT".equalsIgnoreCase(p.getDirection())) {
-                direction = ParameterImpl.IN_OUT;
+            String direction = ParameterExtendedImpl.IN;
+            if (ParameterExtendedImpl.OUT.equalsIgnoreCase(p.getDirection())) {
+                direction = ParameterExtendedImpl.OUT;
+            } else if (ParameterExtendedImpl.IN_OUT.equalsIgnoreCase(p.getDirection())) {
+                direction = ParameterExtendedImpl.IN_OUT;
             }
             parameters.findOrCreateParameterWithIndex(p.getIndex(), direction, sdoType);
         }

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/Statement.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/Statement.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/Statement.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/Statement.java Sun Sep  9 23:20:52 2007
@@ -47,7 +47,7 @@
         this.queryString = sqlString;
     }
 
-    public List executeQuery(Parameters parameters) throws SQLException {
+    public List executeQuery(ParametersExtendedImpl parameters) throws SQLException {
 
         PreparedStatement ps = getPreparedStatement(new String[0]);
         ps = setParameters(ps, parameters);
@@ -56,20 +56,20 @@
         return Collections.singletonList(rs);
     }
 
-    public List executeCall(Parameters parameters) throws SQLException {
+    public List executeCall(ParametersExtendedImpl parameters) throws SQLException {
 
         CallableStatement cs = jdbcConnection.prepareCall(queryString);
 
-        Iterator inParams = parameters.inParams().iterator();
+        Iterator inParams = parameters.getInParameters().iterator();
         while (inParams.hasNext()) {
-            ParameterImpl param = (ParameterImpl) inParams.next();
+        	ParameterExtendedImpl param = (ParameterExtendedImpl) inParams.next();
             cs.setObject(param.getIndex(), param.getValue());
         }
 
         // register out parameters
-        Iterator outParams = parameters.outParams().iterator();
+        Iterator outParams = parameters.getOutParameters().iterator();
         while (outParams.hasNext()) {
-            ParameterImpl param = (ParameterImpl) outParams.next();
+        	ParameterExtendedImpl param = (ParameterExtendedImpl) outParams.next();
             if (this.logger.isDebugEnabled()) {
                 this.logger.debug("Registering parameter " + param.getName());
             }
@@ -87,9 +87,9 @@
             results.add(cs.getResultSet());
         }
 
-        Iterator i = parameters.outParams().iterator();
+        Iterator i = parameters.getOutParameters().iterator();
         while (i.hasNext()) {
-            ParameterImpl param = (ParameterImpl) i.next();
+        	ParameterExtendedImpl param = (ParameterExtendedImpl) i.next();
             param.setValue(cs.getObject(param.getIndex()));
         }
 
@@ -97,19 +97,19 @@
 
     }
 
-    public void executeUpdateCall(Parameters parameters) throws SQLException {
+    public void executeUpdateCall(ParametersExtendedImpl parameters) throws SQLException {
         CallableStatement cs = jdbcConnection.prepareCall(queryString);
 
-        Iterator inParams = parameters.inParams().iterator();
+        Iterator inParams = parameters.getInParameters().iterator();
         while (inParams.hasNext()) {
-            ParameterImpl param = (ParameterImpl) inParams.next();
+        	ParameterExtendedImpl param = (ParameterExtendedImpl) inParams.next();
             cs.setObject(param.getIndex(), param.getValue());
         }
 
         // register out parameters
-        Iterator outParams = parameters.outParams().iterator();
+        Iterator outParams = parameters.getOutParameters().iterator();
         while (outParams.hasNext()) {
-            ParameterImpl param = (ParameterImpl) outParams.next();
+        	ParameterExtendedImpl param = (ParameterExtendedImpl) outParams.next();
 
             if (this.logger.isDebugEnabled()) {
                 this.logger.debug("Registering parameter " + param.getName());
@@ -120,19 +120,19 @@
 
         cs.execute();
 
-        Iterator out = parameters.outParams().iterator();
+        Iterator out = parameters.getOutParameters().iterator();
         while (out.hasNext()) {
-            ParameterImpl param = (ParameterImpl) out.next();
+        	ParameterExtendedImpl param = (ParameterExtendedImpl) out.next();
             param.setValue(cs.getObject(param.getIndex()));
         }
 
     }
 
-    public int executeUpdate(Parameters parameters, String[] generatedKeys) throws SQLException {
+    public int executeUpdate(ParametersExtendedImpl parameters, String[] generatedKeys) throws SQLException {
         return executeUpdate(getPreparedStatement(generatedKeys), parameters);
     }
 
-    public int executeUpdate(Parameters parameters) throws SQLException {
+    public int executeUpdate(ParametersExtendedImpl parameters) throws SQLException {
         return executeUpdate(parameters, new String[0]);
     }
 
@@ -140,14 +140,14 @@
      * TODO - We need to look at using specific ps.setXXX methods when a type
      * has been specified and try setObject otherwise.
      */
-    private int executeUpdate(PreparedStatement ps, Parameters parameters) throws SQLException {
+    private int executeUpdate(PreparedStatement ps, ParametersExtendedImpl parameters) throws SQLException {
         if (this.logger.isDebugEnabled()) {
             this.logger.debug("Executing statement " + queryString);
         }
 
-        Iterator i = parameters.inParams().iterator();
+        Iterator i = parameters.getInParameters().iterator();
         while (i.hasNext()) {
-            ParameterImpl param = (ParameterImpl) i.next();
+        	ParameterExtendedImpl param = (ParameterExtendedImpl) i.next();
 
             Object value = param.getValue();
             if (this.logger.isDebugEnabled()) {
@@ -172,10 +172,10 @@
         return ps.executeUpdate();
     }
 
-    protected PreparedStatement setParameters(PreparedStatement ps, Parameters parameters) throws SQLException {
-        Iterator i = parameters.inParams().iterator();
+    protected PreparedStatement setParameters(PreparedStatement ps, ParametersExtendedImpl parameters) throws SQLException {
+        Iterator i = parameters.getInParameters().iterator();
         while (i.hasNext()) {
-            ParameterImpl param = (ParameterImpl) i.next();
+        	ParameterExtendedImpl param = (ParameterExtendedImpl) i.next();
             ps.setObject(param.getIndex(), param.getValue());
         }
         return ps;

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/UpdateCommandImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/UpdateCommandImpl.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/UpdateCommandImpl.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/UpdateCommandImpl.java Sun Sep  9 23:20:52 2007
@@ -21,14 +21,17 @@
 import org.apache.tuscany.das.rdb.config.Update;
 
 public class UpdateCommandImpl extends WriteCommandImpl {
-
+	public UpdateCommandImpl(org.apache.tuscany.das.rdb.config.Command command) {
+		super(command);
+	}
+	
     public UpdateCommandImpl(String sqlString) {
         super(sqlString);
     }
 
     public UpdateCommandImpl(Update update) {
         super(update.getSql());
-        addParameters(update.getParameters());
+        this.addParameters(update.getParameters());
     }
 
 }

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/WriteCommandImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/WriteCommandImpl.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/WriteCommandImpl.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/WriteCommandImpl.java Sun Sep  9 23:20:52 2007
@@ -22,15 +22,21 @@
 import java.io.OutputStream;
 import java.sql.SQLException;
 import java.util.List;
-import java.util.StringTokenizer;
+import java.util.TreeMap;
 
 import org.apache.tuscany.das.rdb.config.Config;
 import org.apache.tuscany.das.rdb.config.ResultDescriptor;
+import org.apache.tuscany.das.rdb.config.impl.ParameterImpl;
+import org.apache.tuscany.das.rdb.config.Parameters;
 
 import commonj.sdo.DataObject;
 
 public abstract class WriteCommandImpl extends CommandImpl {
 
+	public WriteCommandImpl(org.apache.tuscany.das.rdb.config.Command command) {
+		super(command);
+	}
+	
     public WriteCommandImpl(String sqlString) {
         super(sqlString);
     }
@@ -109,14 +115,51 @@
         throw new RuntimeException("No generated key is available");
     }
 
-    public void addParameters(String parameters) {
-        StringTokenizer tokenizer = new StringTokenizer(parameters);
-        for (int idx = 1; tokenizer.hasMoreTokens(); idx++) {
-            ParameterImpl p = new ParameterImpl();
-            p.setName(tokenizer.nextToken());
-            p.setIndex(idx);
-            addParameter(p);
-        }
-    }
-
+    //it is acceptable if params having index set by caller are listed in any order in Parameters
+    //but, if index is not set by caller, the order of parameters in Parameters should be in sync
+    //with the Command string parameters
+    protected void addParameters(Parameters parameters) {
+    	List params = parameters.getParameter();
+    	if(params == null) 
+    		return;
+
+    	boolean paramsIndexed = true;
+    	TreeMap sortedParams = null;
+    	for(int i=0; i<params.size(); i++){
+    		if(((ParameterImpl)params.get(i)).getIndex() <= 0){
+    			paramsIndexed=false; //any index not set, ignore all externally set indexes and do auto indexing
+    			break;
+    		}    		
+    	}
+    
+    	//auto-indexing
+    	if(!paramsIndexed) {
+    		for(int i=0; i<params.size(); i++){
+    			ParameterExtendedImpl param = new ParameterExtendedImpl((ParameterImpl)params.get(i));
+    			param.setIndex(i+1);
+    			this.addParameter(param);
+    		}
+    		return;
+    	}
+    	else {//dont allow duplicates and check indexing with +1 increment from 1st to last param
+    		sortedParams = new TreeMap();
+    		for(int i=0; i<params.size(); i++){    			
+    			ParameterImpl existingParam = (ParameterImpl)sortedParams.put( new Integer(((ParameterImpl)params.get(i)).getIndex()), ((ParameterImpl)params.get(i)));
+    			if(existingParam != null) {
+    				throw new RuntimeException("Parameters with duplicate indexes!");
+    			}
+    		}
+
+    		if( ((Integer)sortedParams.firstKey()).intValue() + sortedParams.size() -1 != 
+    			((Integer)sortedParams.lastKey()).intValue()) {
+    			throw new RuntimeException("Parameters with improper indexes!");
+    		}
+    	}
+    	    	
+    	for(int i=0; i<params.size(); i++) {
+    		ParameterExtendedImpl param = new ParameterExtendedImpl((ParameterImpl)params.get(i));    		
+    		param.setIndex(((ParameterImpl)params.get(i)).getIndex());
+    		this.addParameter(param);
+    	}
+    }    
 }

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/util/ConfigUtil.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/util/ConfigUtil.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/util/ConfigUtil.java (original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/util/ConfigUtil.java Sun Sep  9 23:20:52 2007
@@ -20,9 +20,16 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.Iterator;
+import java.util.List;
 
+import org.apache.tuscany.das.rdb.config.Command;
 import org.apache.tuscany.das.rdb.config.Config;
 import org.apache.tuscany.das.rdb.config.ConfigFactory;
+import org.apache.tuscany.das.rdb.config.Create;
+import org.apache.tuscany.das.rdb.config.Delete;
+import org.apache.tuscany.das.rdb.config.Parameter;
+import org.apache.tuscany.das.rdb.config.Update;
 
 import commonj.sdo.helper.HelperContext;
 import commonj.sdo.helper.XMLHelper;
@@ -57,4 +64,67 @@
         }
     }
 
+    public static String getParameters(Create createCommand) {
+    	List parameters = createCommand.getParameters().getParameter();
+    	if(parameters != null) {
+	    	Iterator itr = parameters.iterator();
+	    	StringBuffer serializedParameters = new StringBuffer();
+	    	
+	    	while(itr.hasNext()) {
+	    		serializedParameters.append(((Parameter)itr.next()).getName()+" ");
+	    	}
+	    	return serializedParameters.toString().trim();
+    	}
+    	else {
+    		return null;
+    	}
+    }
+    
+    public static String getParameters(Update updateCommand) {
+    	List parameters = updateCommand.getParameters().getParameter();
+    	if(parameters != null) {
+	    	Iterator itr = parameters.iterator();
+	    	StringBuffer serializedParameters = new StringBuffer();
+	    	
+	    	while(itr.hasNext()) {
+	    		serializedParameters.append(((Parameter)itr.next()).getName()+" ");
+	    	}
+	    	return serializedParameters.toString().trim();
+    	}
+    	else {
+    		return null;
+    	}
+    }
+    
+    public static String getParameters(Delete deleteCommand) {
+    	List parameters = deleteCommand.getParameters().getParameter();
+    	if(parameters != null) {
+	    	Iterator itr = parameters.iterator();
+	    	StringBuffer serializedParameters = new StringBuffer();
+	    	
+	    	while(itr.hasNext()) {
+	    		serializedParameters.append(((Parameter)itr.next()).getName()+" ");
+	    	}
+	    	return serializedParameters.toString().trim();
+    	}
+    	else {
+    		return null;
+    	}
+    }
+    
+    public static String getParameters(Command command) {
+    	List parameters = command.getParameter();
+    	if(parameters != null) {
+	    	Iterator itr = parameters.iterator();
+	    	StringBuffer serializedParameters = new StringBuffer();
+	    	
+	    	while(itr.hasNext()) {
+	    		serializedParameters.append(((Parameter)itr.next()).getName()+" ");
+	    	}
+	    	return serializedParameters.toString().trim();
+    	}
+    	else {
+    		return null;
+    	}
+    }    
 }

Modified: incubator/tuscany/java/das/rdb/src/main/resources/config.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/resources/config.xsd?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/resources/config.xsd (original)
+++ incubator/tuscany/java/das/rdb/src/main/resources/config.xsd Sun Sep  9 23:20:52 2007
@@ -77,10 +77,16 @@
       <xsd:attribute name="kind" type="xsd:string"/>
    </xsd:complexType>
    <xsd:complexType name="Parameter">     
+	  <xsd:attribute name="name" type="xsd:string"/> 
       <xsd:attribute name="columnType" type="xsd:string"/>
-      <xsd:attribute name="direction" type="xsd:string"/>
+      <xsd:attribute name="direction" type="xsd:string" default="IN"/>
       <xsd:attribute name="index" type="xsd:int"/>
    </xsd:complexType>
+	<xsd:complexType name="Parameters">
+		<xsd:sequence>
+			<xsd:element  maxOccurs="unbounded" minOccurs="0" name="Parameter" type="config:Parameter"/>
+		</xsd:sequence>
+	</xsd:complexType>   
    <xsd:complexType name="Relationship">
       <xsd:sequence>
          <xsd:element  maxOccurs="unbounded" minOccurs="0" name="KeyPair"
@@ -105,16 +111,22 @@
       <xsd:attribute name="schemaName" type="xsd:string" default=""/> 
    </xsd:complexType>
    <xsd:complexType name="Create">
+	<xsd:sequence>
+         <xsd:element  maxOccurs="1" minOccurs="0" name="Parameters" type="config:Parameters"/>
+     </xsd:sequence>   
    	  <xsd:attribute name="sql" type="xsd:string"/>
-   	  <xsd:attribute name="parameters" type="xsd:string"/>
    </xsd:complexType>
     <xsd:complexType name="Update">
+	 <xsd:sequence>
+         <xsd:element  maxOccurs="1" minOccurs="0" name="Parameters" type="config:Parameters"/>
+     </xsd:sequence>    
    	  <xsd:attribute name="sql" type="xsd:string"/>
-   	  <xsd:attribute name="parameters" type="xsd:string"/>
    </xsd:complexType>
     <xsd:complexType name="Delete">
+	  <xsd:sequence>
+         <xsd:element  maxOccurs="1" minOccurs="0" name="Parameters" type="config:Parameters"/>
+      </xsd:sequence>    
    	  <xsd:attribute name="sql" type="xsd:string"/>
-   	  <xsd:attribute name="parameters" type="xsd:string"/>
    </xsd:complexType>
    <xsd:complexType name="KeyPair">
       <xsd:attribute name="primaryKeyColumn" type="xsd:string"/>

Modified: incubator/tuscany/java/das/rdb/src/test/java/org/apache/tuscany/das/rdb/test/ProgrammaticConfigTests.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/test/java/org/apache/tuscany/das/rdb/test/ProgrammaticConfigTests.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/test/java/org/apache/tuscany/das/rdb/test/ProgrammaticConfigTests.java (original)
+++ incubator/tuscany/java/das/rdb/src/test/java/org/apache/tuscany/das/rdb/test/ProgrammaticConfigTests.java Sun Sep  9 23:20:52 2007
@@ -31,6 +31,7 @@
 import org.apache.tuscany.das.rdb.test.data.CustomerData;
 import org.apache.tuscany.das.rdb.test.data.OrderData;
 import org.apache.tuscany.das.rdb.test.framework.DasTest;
+import org.apache.tuscany.das.rdb.util.ConfigUtil;
 
 import commonj.sdo.DataObject;
 
@@ -353,7 +354,7 @@
         Table widgets = (Table) cfg.getTable().get(0);
         assertEquals("delete from widgets where id = ?", widgets.getDelete().getSql());
         assertEquals("WIDGETS", widgets.getTypeName());
-        assertEquals("ID", widgets.getDelete().getParameters());
+        assertEquals("ID", ConfigUtil.getParameters(widgets.getDelete()));
 
     }
 
@@ -371,7 +372,7 @@
         Table widgets = (Table) cfg.getTable().get(0);
         assertEquals("insert into widgets values (?,?)", widgets.getCreate().getSql());
         assertEquals("WIDGETS", widgets.getTypeName());
-        assertEquals("ID NAME", widgets.getCreate().getParameters());
+        assertEquals("ID NAME", ConfigUtil.getParameters(widgets.getCreate()));
 
     }
     

Modified: incubator/tuscany/java/das/rdb/src/test/java/org/apache/tuscany/das/rdb/test/suites/AllCommonTests.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/test/java/org/apache/tuscany/das/rdb/test/suites/AllCommonTests.java?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/test/java/org/apache/tuscany/das/rdb/test/suites/AllCommonTests.java (original)
+++ incubator/tuscany/java/das/rdb/src/test/java/org/apache/tuscany/das/rdb/test/suites/AllCommonTests.java Sun Sep  9 23:20:52 2007
@@ -41,6 +41,7 @@
 import org.apache.tuscany.das.rdb.test.MissingPKTests;
 import org.apache.tuscany.das.rdb.test.LOBTests;
 import org.apache.tuscany.das.rdb.test.MultiSchemaTests;
+import org.apache.tuscany.das.rdb.test.NamedParameterTests;
 import org.apache.tuscany.das.rdb.test.OCCTests;
 import org.apache.tuscany.das.rdb.test.OneToOneRelationshipTests;
 import org.apache.tuscany.das.rdb.test.OperationOrderingTests;
@@ -116,6 +117,7 @@
 
         suite.addTest(new TestSuite(DynamicResultDescriptorTests.class));
         suite.addTest(new TestSuite(LOBTests.class));
+        suite.addTest(new TestSuite(NamedParameterTests.class));
         //$JUnit-END$
         return suite;
     }

Modified: incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD.xml?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD.xml (original)
+++ incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD.xml Sun Sep  9 23:20:52 2007
@@ -20,9 +20,25 @@
 <Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd"> 
 
   <Table tableName="CUSTOMER">  		 
-	  <create sql="insert into customer values (?, ?, ?)" parameters="ID LASTNAME ADDRESS"/>
-	  <update sql="update customer set lastname = ?, address = ? where ID = ?" parameters="LASTNAME ADDRESS ID"/>
-      <delete sql="delete from customer where ID = ?" parameters="ID"/>
+	  <create sql="insert into customer values (?, ?, ?)" >
+	  	<Parameters>
+		  	<Parameter name="ID" index="1"/>
+		  	<Parameter name="LASTNAME" index="2"/>
+		  	<Parameter name="ADDRESS" index="3"/>		  			  	
+	  	 </Parameters>
+	  </create>
+	  <update sql="update customer set lastname = ?, address = ? where ID = ?" >
+	  	<Parameters>
+		  	<Parameter name="ID" index="3"/>
+		  	<Parameter name="LASTNAME" index="1"/>
+		  	<Parameter name="ADDRESS" index="2"/>		  			  	
+	  	 </Parameters>	  
+	  </update>
+      <delete sql="delete from customer where ID = ?" >
+	  	<Parameters>
+		  	<Parameter name="ID" index="1"/>
+	  	 </Parameters>      
+      </delete>
   </Table>
 	
 </Config>

Modified: incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD2.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD2.xml?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD2.xml (original)
+++ incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD2.xml Sun Sep  9 23:20:52 2007
@@ -20,9 +20,24 @@
 <Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd"> 
 	
   <Table tableName="CUSTOMER">
-	  <create sql="insert into customer values (?, ?, ?)" parameters="ID LASTNAME ADDRESS"/>
-	  <update sql="update customer set lastname = ? where ID = ?" parameters="LASTNAME ID"/>
-      <delete sql="delete from customer where ID = ?" parameters="ID"/>
+	  <create sql="insert into customer values (?, ?, ?)" >
+	  	<Parameters>
+		  	<Parameter name="ID" index="1"/>
+		  	<Parameter name="LASTNAME" index="2"/>
+		  	<Parameter name="ADDRESS" index="3"/>		  			  	
+	  	 </Parameters>	  
+	  </create>
+	  <update sql="update customer set lastname = ? where ID = ?" >
+	  	<Parameters>
+		  	<Parameter name="ID" index="2"/>
+		  	<Parameter name="LASTNAME" index="1"/>
+	  	 </Parameters>	  
+	  </update>
+      <delete sql="delete from customer where ID = ?" >
+	  	<Parameters>
+		  	<Parameter name="ID" index="1"/>
+	  	 </Parameters>
+      </delete>
       <Column columnName="ID" primaryKey="true"/>
       <Column columnName="LASTNAME"/>
       <Column columnName="ADDRESS"/> 

Modified: incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml?rev=574147&r1=574146&r2=574147&view=diff
==============================================================================
--- incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml (original)
+++ incubator/tuscany/java/das/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml Sun Sep  9 23:20:52 2007
@@ -20,9 +20,25 @@
 <Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd"> 
 
   <Table tableName="CUSTOMER">
-	  <create sql="isnert into customer blah values (?, ?, ?)" parameters="ID LASTNAME ADDRESS"/>
-	  <update sql="udpate customer blah set lastname = ?, address = ? where ID = ?" parameters="LASTNAME ADDRESS ID"/>
-      <delete sql="dleete from customer blah where ID = ?" parameters="ID"/>
+	  <create sql="isnert into customer blah values (?, ?, ?)" >
+	  	<Parameters>
+		  	<Parameter name="ID" index="1"/>
+		  	<Parameter name="LASTNAME" index="2"/>
+		  	<Parameter name="ADDRESS" index="3"/>		  			  	
+	  	 </Parameters>	  
+	  </create>
+	  <update sql="udpate customer blah set lastname = ?, address = ? where ID = ?" >
+	  	<Parameters>
+		  	<Parameter name="ID" index="3"/>
+		  	<Parameter name="LASTNAME" index="1"/>
+		  	<Parameter name="ADDRESS" index="2"/>		  			  	
+	  	 </Parameters>
+	  </update>
+      <delete sql="dleete from customer blah where ID = ?" >
+	  	<Parameters>
+		  	<Parameter name="ID" index="1"/>
+	  	 </Parameters>      
+      </delete>
      
     <Column columnName="ID" primaryKey="true"/>
     <Column columnName="LASTNAME"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message