cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: CayenneObjectManager - alternative API for using Apache Cayenne
Date Sun, 24 Feb 2008 11:18:16 GMT
Hi Ari,

thanks for pointing to that dev discussion thread. I was going to do  
the same. In fact my own interest in this approach started as a result  
of David posting his first example:

    https://issues.apache.org/cayenne/browse/CAY-877

And I hope to reuse his work if possible (and at the minimum use some  
of the ideas).

Andrus


On Feb 24, 2008, at 12:57 PM, Aristedes Maniatis wrote:

>
> On 24/02/2008, at 9:13 PM, David Marko wrote:
>
>> // find first item by property and given condition
>> co_manager
>> .find(Class).byProperty("property").BETWEEN(value1,value2).first()
>> co_manager.find(Class).byProperty("property").LIKE(value).first()
>> co_manager.find(Class).byProperty("property").IN(range).first()
>
> This looks a lot like the Fluent interface [1] Andrus has proposed  
> as a possible way to generify the query API. Have a read of the  
> relevant thread [2] for further info there. It is an interesting  
> idea but quite hard to write documentation for (such as javadocs)  
> and possibly hard for newcomers. On the other hand it is very  
> compact and readable.
>
>
> Ari Maniatis
>
>
>
> [1] http://martinfowler.com/bliki/FluentInterface.html
> [2] http://markmail.org/message/jqfjtsogixpeijsn
>
>
> -------------------------->
> ish
> http://www.ish.com.au
> Level 1, 30 Wilson Street Newtown 2042 Australia
> phone +61 2 9550 5001   fax +61 2 9550 4001
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>
>
>


Mime
View raw message