You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by bd...@apache.org on 2006/10/16 22:15:58 UTC
svn commit: r464650 - in /incubator/tuscany/java/das/rdb/src:
main/java/org/apache/tuscany/das/rdb/impl/SPCommandImpl.java
test/resources/storedProcTest.xml
Author: bdaniel
Date: Mon Oct 16 13:15:58 2006
New Revision: 464650
URL: http://svn.apache.org/viewvc?view=rev&rev=464650
Log:
TUSCANY-820 Include an "index" attribute on "Parameter"
Modified:
incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/SPCommandImpl.java
incubator/tuscany/java/das/rdb/src/test/resources/storedProcTest.xml
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?view=diff&rev=464650&r1=464649&r2=464650
==============================================================================
--- 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 Mon Oct 16 13:15:58 2006
@@ -37,7 +37,7 @@
public SPCommandImpl(String sqlString, MappingWrapper config, List params) {
super(sqlString, config, null);
Iterator i = params.iterator();
- for (int idx = 1; i.hasNext(); idx++) {
+ while (i.hasNext()) {
Parameter p = (Parameter) i.next();
int index = p.getColumnType().lastIndexOf('.');
@@ -52,7 +52,7 @@
} else if ("INOUT".equalsIgnoreCase(p.getDirection())) {
direction = ParameterImpl.IN_OUT;
}
- parameters.findOrCreateParameterWithIndex(idx, direction, sdoType);
+ parameters.findOrCreateParameterWithIndex(p.getIndex(), direction, sdoType);
}
}
Modified: incubator/tuscany/java/das/rdb/src/test/resources/storedProcTest.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/test/resources/storedProcTest.xml?view=diff&rev=464650&r1=464649&r2=464650
==============================================================================
--- incubator/tuscany/java/das/rdb/src/test/resources/storedProcTest.xml (original)
+++ incubator/tuscany/java/das/rdb/src/test/resources/storedProcTest.xml Mon Oct 16 13:15:58 2006
@@ -19,9 +19,8 @@
-->
<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <Command name="getNamedCustomers" SQL="{call GETNAMEDCUSTOMERS(?,?)}" kind="procedure">
- <Parameter direction="IN" columnType="commonj.sdo.String"/>
- <Parameter direction="OUT" columnType="commonj.sdo.IntObject"/>
+ <Command name="getNamedCustomers" SQL="{call GETNAMEDCUSTOMERS(?,?)}" kind="procedure">
+ <Parameter direction="OUT" index="2" columnType="commonj.sdo.IntObject"/>
</Command>
</Config>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org