svn commit: r492859 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java

[email protected]
Newsgroups gmane.comp.jakarta.ojb.devel
Message-ID <[email protected]>
Author: arminw
Date: Thu Jan  4 18:25:32 2007
New Revision: 492859

URL: http://svn.apache.org/viewvc?view=rev&rev=492859
Log:
add new method, fix ClassCastException when using LOB's

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java?view=diff&rev=492859&r1=492858&r2=492859
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java Thu Jan  4 18:25:32 2007
@@ -31,6 +31,8 @@
 import org.apache.ojb.broker.PersistenceBrokerException;
 import org.apache.ojb.broker.accesslayer.JoinSyntaxTypes;
 import org.apache.ojb.broker.lob.LobHandle;
+import org.apache.ojb.broker.lob.BlobHandle;
+import org.apache.ojb.broker.lob.ClobHandle;
 import org.apache.ojb.broker.metadata.FieldDescriptor;
 import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
 import org.apache.ojb.broker.query.LikeCriteria;
@@ -357,7 +359,7 @@
                     if(detectLocatorsUpdateState(ps))
                     {
                         handle.checkActive();
-                        ps.setBlob(index, b);
+                        ps.setBlob(index, ((BlobHandle) b).getBlob());
                     }
                 }
             }
@@ -416,7 +418,7 @@
                     if(detectLocatorsUpdateState(ps))
                     {
                         handle.checkActive();
-                        ps.setClob(index, c);
+                        ps.setClob(index, ((ClobHandle) c).getClob());
                     }
                 }
             }
@@ -627,6 +629,11 @@
     protected String getQuotedName(String aString)
     {
         return '"' + aString + '"';
+    }
+
+    public String getSelectForUpdateClause() throws UnsupportedOperationException
+    {
+        return " FOR UPDATE";
     }
 
     /**
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.