cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikaël Cluseau <mik...@isinc.dyndns.org>
Subject Re: Tutorial Mapping Query
Date Sat, 27 Oct 2007 00:27:08 GMT
Le samedi 27 octobre 2007 à 09:40 +1000, Aristedes Maniatis a écrit :
> At the moment, Cayenne 3 still supports JDK1.4 but the above code is  
> Java 5 specific.

Didn't knew that, since 3.0 should implement JPA one day... so I though
it was the first Cayenne to take advantage of Java 5, avoiding many
casts like :

      * MyClass newObject =
        context.createAndRegisterNewObject(MyClass.class)
      * for (MyClass obj : context.performQuery(new
        SelectQuery(MyClass.class, qualifier)) ...
      * List<InvoceLine> lines = invoice.getLines();
      * etc...

So now I know I'll have to keep my helper classes and my custom
'@SuppressWarning("unchecked") List<XXX>' templates...

> Cayenne 1 and 2 will always continue to support Java 1.4.

I know that. This quick start was in the 3.0 doc.

> Also, the main point of the tutorial is not to demonstrate Java  
> coding style choices, but to focus on the Cayenne commands that are  
> important. Someone else might create a list of NamedQueries to  
> iterate through and someone else might have a map of tablenames  
> generated elsewhere.

My case is not about all the ways to empty tables... but about
demonstrating at the very beginning that Cayenne allows you to be very
generic. And I wrote that that I may be going to far.

> As for the original poster, it sounds like you haven't got Cayenne on  
> your classpath.

I'm not telling the original poster that his coding style isn't good,
I'm just sending my point of view. This is the very reason why I'm
posting this in user and not dev... Anyway, Cayenne is on my classpath
since 1.2 betas, just look at the mailing list archives in maybe 2k4 (my
case about cayenne in Tapestry-users :
http://mail-archives.apache.org/mod_mbox/tapestry-users/200501.mbox/%
3C1107213773.17348.52.camel@nwrk.nwrk%3E). 

I did a lot of work with the Cayenne's model to build tools like
Dia-UML-to-Cayenne mapper, database synchronizer
(http://www.mail-archive.com/user@cayenne.apache.org/msg01257.html) and
automated CRUD tests
(http://objectstyle.org/cayenne/lists/cayenne-devel/2005/06/0036.html).
All this posted on the ML.

-- 
Mikaël Cluseau <mc.isi.nc@gmail.com>
ISI.NC

Mime
View raw message