[jboss-svn-commits] JBL Code SVN: r17500 - labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Jan 2 15:46:45 EST 2008
Author: tcunning
Date: 2008-01-02 15:46:44 -0500 (Wed, 02 Jan 2008)
New Revision: 17500
Modified:
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
Log:
bug:JBESB-1418
Do not add the upper cased column names to the message, but do comparisons
against upper cased column names.
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java 2008-01-02 18:56:40 UTC (rev 17499)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java 2008-01-02 20:46:44 UTC (rev 17500)
@@ -651,7 +651,12 @@
try {
int iParm = 1;
for (String sColName : _keys) {
- final String val = String.valueOf(_currentRow.get(sColName));
+ String val = null;
+ if (_currentRow.containsKey(sColName)) {
+ val = String.valueOf(_currentRow.get(sColName));
+ } else {
+ val = String.valueOf(_upperCurrentRow.get(sColName));
+ }
_PSdeleteRow.setString(iParm++, val);
}
@@ -710,15 +715,25 @@
for (String key : _currentRow.keySet()) {
tempKeys.add(key);
}
+ if (_upperCurrentRow != null) {
+ _upperCurrentRow.clear();
+ } else {
+ _upperCurrentRow = new HashMap<String, Object>();
+ }
+
for (String key : tempKeys) {
Object value = _currentRow.get(key);
- if (!_currentRow.containsKey(key.toUpperCase())) {
- _currentRow.put(key.toUpperCase(), value);
- }
+ _upperCurrentRow.put(key.toUpperCase(), value);
}
for (String sColName : _keys) {
- Object oVal = String.valueOf(_currentRow.get(sColName.toUpperCase()));
+ Object oVal = null;
+ if (_currentRow.containsKey(sColName)) {
+ oVal = String.valueOf(_currentRow.get(sColName.toUpperCase()));
+ } else {
+ oVal = String.valueOf(_upperCurrentRow.get(sColName.toUpperCase()));
+ }
+
_PSupdate.setObject(iParm++, oVal);
}
@@ -842,7 +857,7 @@
protected JdbcCleanConn _dbConn;
- protected Map<String, Object> _currentRow;
+ protected Map<String, Object> _currentRow, _upperCurrentRow;
public static enum ROW_STATE {
Pending, Working, Error, Done
More information about the jboss-svn-commits
mailing list