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


Reply via email to