Hi Tim,

OpenCMIS provides a QueryStatement interface [1][2] which is comparable to the JDBC PreparedStatement. But that is not the abstraction level you are talking about. Something like QueryDSL should be doable. If you have concrete ideas, please open an improvement issue [1]. You can also attach source code to this issue, if you want to contribute something.

Thanks,

Florian


[1] http://chemistry.apache.org/java/0.8.0/maven/apidocs/org/apache/chemistry/opencmis/client/api/Session.html#createQueryStatement(java.lang.String)
[2] 
http://chemistry.apache.org/java/0.8.0/maven/apidocs/org/apache/chemistry/opencmis/client/api/QueryStatement.html
[3] https://issues.apache.org/jira/browse/CMIS


Hi,

I was thinking of just a small API/implementation that would generate
CMIS-compliant SQL for querying the repository (not persistence).

I thought I might be able to reuse existing ORM tools like Spring Data, Query DSL, JPA, etc and just 'lift' the generated SQL to use against the CMIS repository, but these are all statically typed and basically need to execute against a 'real' database. They need type code generated by a database scheme and are abstractions over JDBC. This won't work. We just
need the SQL.

One option is to implement something like QueryDSL for CMIS and maybe
generate types against CMIS property definitions (instead of scheme
definition)?

Or if we don't care about type safety just something to generate SQL? I ended up using this option and wrote my own library - it's simple and just supports the main SQL clauses and operators and will work for my project (happy to share it). It would be good to have our own option for the CMIS
community or else everyone might have to do this....

Tim


On Mon, Jun 3, 2013 at 8:31 AM, Huebel, Jens <[email protected]> wrote:

Hi Tim,

as far as I know nothing like this is currently available or planned. If you have something to share please do (not necessarily code, can even be ideas, pseudo-code, proof of concept, etc). I am sure we will have some
interesting discussions on the list.

JPA is around persisting Java objects. Do you have a use case in mind
doing this via CMIS?

Jens


On 30.05.13 10:37, "Tim Webster" <[email protected]> wrote:

>Hi,
>
>I was wondering if anyone uses an abstraction layer for generating CMIS >SQL? Something like a Java API like JPA. Is there an equivalent of a
>JDBC
>driver for CMIS so we could do this?
>
>I basically need to write my own, as our queries are getting more complex,
>and cobbling together the SQL is getting messy.
>
>Any advice?
>
>Thanks,
>
>Tim
>
>
>--
>Check out my wine blog: http://timswineblog.blogspot.com/



Reply via email to