Hi Carl, What if callbacks are used for creating instances of type Blob and Clob?
The idea is, the OData JPA processor library on encountering a property with type Clob.class or Blob.class can call an application specific, registered callback class that could create an instance of type Clob.class and Blob.class that are specific to JPA provider implementations. These instances can then be set into the JPA entity properties by the OData JPA processor library. With this approach at least we can keep the JPA models clean by restraining from adding additional setter methods. For this a callback interface can be defined from OData JPA processor library and applications using Blob and Clob data types can implement these interfaces and register the call back implementation via ODataJPAContext. WDYT? Thanks, Kind Regards Chandan VA -----Original Message----- From: Carl Mosca [mailto:carljmo...@gmail.com] Sent: Monday, March 17, 2014 6:25 AM To: dev@olingo.incubator.apache.org Subject: Re: [jira] [Commented] (OLINGO-185) support for Clob This looks good but I am wondering about typical generated JPA code for Clobs and the requirement for the setter with the character array parameter. In the bit of looking I have done, there seems to be some varying in what's generated. I don't see a problem modifying as needed, I am just wondering what might be most common (despite the efficiency of the character array). Carl On Sun, Mar 16, 2014 at 4:53 AM, Chandan V.A (JIRA) <j...@apache.org> wrote: > > [ > https://issues.apache.org/jira/browse/OLINGO-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937099#comment-13937099] > > Chandan V.A commented on OLINGO-185: > ------------------------------------ > > Hi [~carljmosca], > I added a proposal for handling even Clob.class and Blob.class at - > https://wiki.apache.org/Olingo/ojp-handling-blob-proposal. The proposal > makes sure that OData JPA processor library is not bound to any specific > implementation of Clob.class or Blob.class yet support them. > > Please provide your comments. > > Regards > Chandan > > > > > support for Clob > > ---------------- > > > > Key: OLINGO-185 > > URL: https://issues.apache.org/jira/browse/OLINGO-185 > > Project: Olingo > > Issue Type: New Feature > > Components: odata2-jpa > > Affects Versions: V2 1.2.0 > > Reporter: Carl J. Mosca > > Assignee: Chandan V.A > > Priority: Blocker > > Labels: blob, clob, jpa > > Fix For: V2 1.3.0 > > > > Attachments: > org.apache.olingo.odata2.jpa.processor.core.access.model.JPATypeConverter.java.diff > > > > > > support for Clob (other BLOB types?) We have successfully processed > these as String type > > > > -- > This message was sent by Atlassian JIRA > (v6.2#6252) > -- Carl J. Mosca