You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Robert Nicholson <ro...@elastica.com> on 2003/11/24 18:40:32 UTC

DB integration?

I'm familiar with Web Objects framework but is there anything like 
WODisplayGroups for Tapestry or does all DB code have to be hand coded 
using Hiberate et all?


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: DB integration?

Posted by Cyril Godefroy <cg...@mac.com>.
Coming from WO, you might find Cayenne more familiar. The author says 
it's really EOF-like. You won't find DisplayGroups though. Have to 
'build' your queries yourself as in:

import org.objectstyle.cayenne.query.SelectQuery;
import org.objectstyle.cayenne.access.DataContext;
import java.util.List;
...
DataContext ctxt; // assume this exists. it's like an eoediing context
SelectQuery query = new SelectQuery(Artist.class);
query.SetQualifier(aQualifier);
query.addOrdering("artistName", true);

// The query would fetch *ALL* rows from the ARTIST table
// The list returned contains Artist objects, one object per row
List artists = ctxt.performQuery(query);

Sorry, I don't know very well how to create a Qualifier in Cayenne 
though...

Cyril

> On Monday, November 24, 2003 at 11:40:32 (-0600) Robert Nicholson 
> writes:
>> I'm familiar with Web Objects framework but is there anything like
>> WODisplayGroups for Tapestry or does all DB code have to be hand coded
>> using Hiberate et all?
>>


Re: DB integration?

Posted by Bill Lear <ra...@zopyra.com>.
On Monday, November 24, 2003 at 11:40:32 (-0600) Robert Nicholson writes:
>I'm familiar with Web Objects framework but is there anything like 
>WODisplayGroups for Tapestry or does all DB code have to be hand coded 
>using Hiberate et all?

Tapestry is purely presentation-layer.  All DB code is your
responsibility.


Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: DB integration?

Posted by Eric Schneider <er...@centralparksoftware.com>.
Robert,

There is no WODisplayGroup equivalent in Tapestry.  Though, O/R frameworks
like Cayenne will get you part of the way.  You can set a page size property
on the SelectQuery object.

SelectQuery q = new SelectQuery(PlayerTotals.class);
q.setPageSize(30);

What this will do is fetch a hollow list of all objects in the PlayerTotals
entity, only faulting the first 30 objects in the list.   Each request for
additional pages in the list will cause the objects to fault as needed.

This functionality along with a pagination helper class will allow you to do
anything you could with a WODisplayGroup.  We use this in numerous places on
the nhl.com to efficiently fetch large lists.

http://www.nhl.com/nhlstats/stats?service=direct&context=Home/completePointLeaderLink

Cheers,
Eric


----- Original Message ----- 
From: "Robert Nicholson" <ro...@elastica.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, November 24, 2003 12:40 PM
Subject: DB integration?


> I'm familiar with Web Objects framework but is there anything like
> WODisplayGroups for Tapestry or does all DB code have to be hand coded
> using Hiberate et all?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: DB integration?

Posted by "Kevin C. Dorff" <kd...@kcp.com>.
Tapestry has no direct db integration unless, of course, you create db 
aware components yourself (I know, not what you were looking for). 
Personally, I do database work using Hibernate. Others use Torque, JDBC, 
and others.

Kevin

Robert Nicholson wrote:

> I'm familiar with Web Objects framework but is there anything like 
> WODisplayGroups for Tapestry or does all DB code have to be hand coded 
> using Hiberate et all?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org