You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Aristedes Maniatis <ar...@ish.com.au> on 2008/03/22 03:57:08 UTC

Re: performQuery generics

Interestingly, chained method calls are being considered as an  
encouraged pattern in Java 7:

http://tech.puredanger.com/java7/#chained

Ari

On 21/01/2008, at 8:00 AM, Andrus Adamchik wrote:
> There is even a name for the kind of pattern we discussed for the  
> new set of queries - "fluent interface":
>
>   http://www.martinfowler.com/bliki/FluentInterface.html
>
> Andrus
>
> On Jan 13, 2008, at 4:32 PM, Andrus Adamchik wrote:
>
>> Select<Artist> query1 = new Select<Artist>(Artist.class);
>> query1.andQualifier("artistName = 'ABC'")
>>    .orQualifier("artistName = 'XYZ'")
>>    .orderAscending(Artist.ARTIST_NAME_PROPERTY);
>> List<Artist> artists = context.performQuery(query1);
>





-------------------------->
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