manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1153314 - /incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java
Date Wed, 03 Aug 2011 00:43:19 GMT
Author: kwright
Date: Wed Aug  3 00:43:19 2011
New Revision: 1153314

URL: http://svn.apache.org/viewvc?rev=1153314&view=rev
Log:
Partial fix for CONNECTORS-235.  The RSS functionality for dechromed content indexing was
broken on Derby and HSQLDB.

Modified:
    incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java?rev=1153314&r1=1153313&r2=1153314&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java
(original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java
Wed Aug  3 00:43:19 2011
@@ -688,7 +688,7 @@ public class Database
                 value = null;
                 if (colnum > -1)
                 {
-                  value = getObject(rs,rsmd,colnum,(spec == null)?ResultSpecification.FORM_DEFAULT:spec.getForm(key));
+                  value = getObject(rs,rsmd,colnum,(spec == null)?ResultSpecification.FORM_DEFAULT:spec.getForm(key.toLowerCase()));
                 }
                 //System.out.println(" Key = '"+resultLabels[i]+"', value = "+((value==null)?"NULL":value.toString()));
                 m.put(resultLabels[i], value);
@@ -966,12 +966,22 @@ public class Database
             }
             break;
           case java.sql.Types.CLOB :
-            if ((clob = rs.getClob(col)) != null)
+            switch (desiredForm)
             {
-              result = clob.getSubString(1, (int) clob.length());
+            case ResultSpecification.FORM_DEFAULT:
+            case ResultSpecification.FORM_STRING:
+              if ((clob = rs.getClob(col)) != null)
+              {
+                result = clob.getSubString(1, (int) clob.length());
+              }
+              break;
+            case ResultSpecification.FORM_STREAM:
+              result = new TempFileCharacterInput(rs.getCharacterStream(col));
+              break;
+            default:
+              throw new ManifoldCFException("Illegal form requested for column "+Integer.toString(col)+":
"+Integer.toString(desiredForm));
             }
             break;
-            
           case java.sql.Types.BIGINT :
             long l = rs.getLong(col);
             if (!rs.wasNull())



Mime
View raw message