You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by de...@apache.org on 2014/07/01 09:53:09 UTC
svn commit: r1607001 -
/olingo/site/trunk/content/doc/tutorials/HandlingClobAndBlob.mdtext
Author: deepa
Date: Tue Jul 1 07:53:08 2014
New Revision: 1607001
URL: http://svn.apache.org/r1607001
Log:
CMS commit to olingo by deepa
Modified:
olingo/site/trunk/content/doc/tutorials/HandlingClobAndBlob.mdtext
Modified: olingo/site/trunk/content/doc/tutorials/HandlingClobAndBlob.mdtext
URL: http://svn.apache.org/viewvc/olingo/site/trunk/content/doc/tutorials/HandlingClobAndBlob.mdtext?rev=1607001&r1=1607000&r2=1607001&view=diff
==============================================================================
--- olingo/site/trunk/content/doc/tutorials/HandlingClobAndBlob.mdtext (original)
+++ olingo/site/trunk/content/doc/tutorials/HandlingClobAndBlob.mdtext Tue Jul 1 07:53:08 2014
@@ -28,12 +28,12 @@ entities. Following is the proposal on h
Based on the JPA entity property type, the pseudocode for generating the EDM is as below.
-For java.sql.Blob:
+**For java.sql.Blob**:
1. Check if JPA entity property is of type byte[] or of type java.sql.Blob and annotated with @Lob annotation.
2. If Step 1 is true, then generate an EDM property with type as Edm.Binary
-For java.sql.Clob:
+**For java.sql.Clob**:
1. Check if JPA entity property is of type java.sql.Clob and annotated with @Lob annotation.
2. If Step 1 is true, then generate an EDM property with type as Edm.String (with no max length unless a max length is specified).
@@ -41,6 +41,7 @@ For java.sql.Clob:
### Runtime Processing
**Prerequisite:**
+
1. It is mandatory to implement the callback interface org.apache.olingo.odata2.jpa.processor.api.OnJPAWriteContent.
2. The implemented interface needs to be registered with the service via the method 'setOnJPAWriteContent' part of 'ODataJPAServiceFactory'.
@@ -94,6 +95,7 @@ Following is the pseudocode for handling
}
OData JPA Processor Library internally does the following:
+
1. Checks if the JPA entity property is of type java.sql.Blob or java.sql.Clob.
2. If Step 1 is true, then it invokes the registered callback method 'getJPABlob' or 'getJPAClob' respectively.
3. If callback method is not defined, it throws an exception.