You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Giacomo Pati <gi...@apache.org> on 2003/04/19 11:31:06 UTC
Hibernat2 block
Hi team
We've recently started a project that uses the Hibernat2 package from
http://hibernate.sf.net as a object to relational mapping tool. We considered
other packages and end up with Hibernate2 because of:
- has good performance
- has quite a good community
- has many project using it (http://hibernate.bluemars.net/27.html)
- has XDoclet support
(http://xdoclet.sourceforge.net/tags/hibernate-tags.html)
and some other aspects.
We have developped a logicsheet that is a mixture out of the esql and jpath
logicsheets that let you develop easily XSP pages with hibernated content.
Consider the following object model:
Project
!
+--<>* Task Staff
! !
+--<>* Mandate *<>--+
!
+--<>* Expenditure <!--+
!
+---------+---------+
! !
Activity Expense
Where
- Project : Defines a project
- Task : Defines a task of a project
- Mandate : Defines a task worked on by a staff
- Expendituere: Defines work activities as either
- Activity : Duration activity worked on a mandate
- Expense : Costs raised for a mandate
Now using the logicsheet one can build a XSP page like:
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:hbn="http://otego.com/xsp/hibernate/2.0" >
<document>
<hbn:execute-query>
<hbn:query>from project in class Project</hbn:query>
<hbn:results>
<project>
<name><hbn:value-of select="result/name"/></name>
<hbn:for-each select="result/tasks">
<task>
<name><hbn:value-of select="name"/></name>
<hbn:for-each select="mandates">
<mandate>
<staff>
<name><hbn:value-of select="staff/name"/></name>
</staff>
<hbn:for-each select="expenditures">
<expenditure>
<date><hbn:value-of select="date"/></date>
<description><hbn:value-of select="description"/></description>
<hbn:choose>
<hbn:when test="type='Activity'">
<activity>
<duration><hbn:value-of select="duration"/></duration>
</activity>
</hbn:when>
<hbn:when test="type='Expense'">
<expense>
<amount><hbn:value-of select="amount"/></amount>
</expense>
</hbn:when>
</hbn:choose>
</expenditure>
</hbn:for-each>
<sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
</mandate>
</hbn:for-each>
<sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
</task>
</hbn:for-each>
<sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
</project>
</hbn:results>
<hbn:no-results>
<project/>
</hbn:no-results>
<hbn:error-results>
<trace>
<hbn:get-stacktrace/>
</trace>
</hbn:error-results>
</hbn:execute-query>
</document>
</xsp:page>
Anybody intressted in this? Can I donnate and add a block for it?
Giacomo
Re: Hibernat2 block
Posted by Giacomo Pati <gi...@apache.org>.
On Sat, 19 Apr 2003, Stefano Mazzocchi wrote:
> on 4/19/03 4:25 PM Giacomo Pati wrote:
>
>
> > On Sat, 19 Apr 2003, Sylvain Wallez wrote:
> >
> >
> >>Giacomo Pati wrote:
> >
> >
> > <snip/>
> >
> >>>Anybody intressted in this? Can I donnate and add a block for it?
> >>>
> >>
> >>This looks very cool, but... Hibernate is LGPL, and as such cannot go
> >>into an Apache repository :-(
> >
> >
> > I know, I thought this is what the mock classes are for, right?
>
> Yeah, well, too bad the LGPL is viral to those mock classes since they
> are *derivative work* or the originals and they can't be placed under an
> apache license without violating it.
>
> So, the stall is:
>
> 1) the ASF doesn't want *GPL code in CVS (expecially for java where
> there is no clear definition of 'library')
>
> 2) *GPL code doesn't allow *any* kind of modification or derivative
> work to happen in a non-GPL license.
3) convince the Hibernate team to change license?
>
> result: we'll have to ship those blocks from outside the ASF. and I
> think cocoondev.org makes perfect sense for those things.
>
>
Re: Hibernat2 block
Posted by Stefano Mazzocchi <st...@apache.org>.
on 4/19/03 4:25 PM Giacomo Pati wrote:
> On Sat, 19 Apr 2003, Sylvain Wallez wrote:
>
>
>>Giacomo Pati wrote:
>
>
> <snip/>
>
>>>Anybody intressted in this? Can I donnate and add a block for it?
>>>
>>
>>This looks very cool, but... Hibernate is LGPL, and as such cannot go
>>into an Apache repository :-(
>
>
> I know, I thought this is what the mock classes are for, right?
Yeah, well, too bad the LGPL is viral to those mock classes since they
are *derivative work* or the originals and they can't be placed under an
apache license without violating it.
So, the stall is:
1) the ASF doesn't want *GPL code in CVS (expecially for java where
there is no clear definition of 'library')
2) *GPL code doesn't allow *any* kind of modification or derivative
work to happen in a non-GPL license.
result: we'll have to ship those blocks from outside the ASF. and I
think cocoondev.org makes perfect sense for those things.
--
Stefano.
Re: Hibernat2 block
Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Giacomo Pati wrote:
>On Sat, 19 Apr 2003, Sylvain Wallez wrote:
>
>
<snip/>
>>I wonder if, instead of having a myriad of very small projects, we could have a single "CocoLess" (or another name) project on cocoondev.org hosting all these small blocks. This would give them a greater visibility and consequently a bigger community.
>>
>>
>
>"Greater visibility and consequently a bigger community" than what?
>cocoon.apache.org?
>
>
No, certainly not ! I was referring to the projects that are currently
hosted at cocoondev.org. Gathering them under a single umbrella as an
"extension" to cocoon.apache.org rather than a scattered galaxy of small
code bases will make them more visible.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: Hibernat2 block
Posted by Luca Morandini <lu...@tin.it>.
Giacomo Pati wrote:
>
> Is this the alternative? Can't we have those blocks in cocoon.apache.org and
> have their build.xml file download the required jars from let say
> www.ibiblio.org?
>
as I sadly discovered, this cannot be: ASF policies don't allow LPGL
code (or proxy for that, like mock classes) inside an ASF project... I
suppose this prohibition extends to building instructions as well.
Regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
Re: Hibernat2 block
Posted by Giacomo Pati <gi...@apache.org>.
On Sat, 19 Apr 2003, Sylvain Wallez wrote:
> Giacomo Pati wrote:
<snip/>
> >Anybody intressted in this? Can I donnate and add a block for it?
> >
>
> This looks very cool, but... Hibernate is LGPL, and as such cannot go
> into an Apache repository :-(
I know, I thought this is what the mock classes are for, right?
> Can this go to cocoondev.org ?
>
> Considering the increasing number of Cocoon blocks that rely on LGPL'ed
> libraries (JCVS, JFreeChart, and now Hibernate),
Is this the alternative? Can't we have those blocks in cocoon.apache.org and
have their build.xml file download the required jars from let say
www.ibiblio.org?
> I wonder if, instead of
> having a myriad of very small projects, we could have a single
> "CocoLess" (or another name) project on cocoondev.org hosting all these
> small blocks. This would give them a greater visibility and consequently
> a bigger community.
"Greater visibility and consequently a bigger community" than what?
cocoon.apache.org?
Giacomo
Re: Hibernat2 block
Posted by Luca Morandini <lu...@tin.it>.
Sylvain Wallez wrote:
> Considering the increasing number of Cocoon blocks that rely on LGPL'ed
> libraries (JCVS, JFreeChart, and now Hibernate), I wonder if, instead of
> having a myriad of very small projects, we could have a single
> "CocoLess" (or another name) project on cocoondev.org hosting all these
> small blocks. This would give them a greater visibility and consequently
> a bigger community.
>
FWIW, my enthusiastic support for a project unifying all those small
projects which should be in Cocoon... if licensing was not an issue ;)
(I mean, all those blocks related to GPL, LGPL, and proprietary libraries).
Hmm... the governing of such diverse sub-projects under the same
umbrella project is an issue though... might the Cocoon PMC itself
handle it ?
Regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
Re: Hibernat2 block
Posted by Steven Noels <st...@outerthought.org>.
On 19/04/2003 12:22 Sylvain Wallez wrote:
> Thoughts ? Steven ?
(slowly waking up after an easter egg hangover ...)
I'm on call - just tell me what you want and I'll see what I can do.
From the amount of email on the various cocoondev.org lists, it looks
like both Fins (the old JFChartTransformer) & xReporter are alive and
well, even outside the ASF infrastructure.
If a Hibernate block can't be properly done inside Cocoon CVS due to
legal reasons, cocoondev.org seems like a decent alternative to me (and
will be given a proper machine name 'strider' upon popular demand - so
you'll be able to refer to strider as a shorthand syntax).
While I'm not quite ready to hot-mirror all Cocoon committer accounts on
strider, quite a few of the active committers already have access in one
form or another - and I'll be glad to set up additional accounts if the
need arises.
</Steven>
--
Steven Noels http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org stevenn at apache.org
Re: Hibernat2 block
Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Giacomo Pati wrote:
>Hi team
>
>We've recently started a project that uses the Hibernat2 package from
>http://hibernate.sf.net as a object to relational mapping tool. We considered
>other packages and end up with Hibernate2 because of:
>
> - has good performance
> - has quite a good community
> - has many project using it (http://hibernate.bluemars.net/27.html)
> - has XDoclet support
> (http://xdoclet.sourceforge.net/tags/hibernate-tags.html)
>
>and some other aspects.
>
>We have developped a logicsheet that is a mixture out of the esql and jpath
>logicsheets that let you develop easily XSP pages with hibernated content.
>
>Consider the following object model:
>
> Project
> !
> +--<>* Task Staff
> ! !
> +--<>* Mandate *<>--+
> !
> +--<>* Expenditure <!--+
> !
> +---------+---------+
> ! !
> Activity Expense
>
>
Nice ASCII art ;-)
<snip/>
>Anybody intressted in this? Can I donnate and add a block for it?
>
This looks very cool, but... Hibernate is LGPL, and as such cannot go
into an Apache repository :-(
Can this go to cocoondev.org ?
Considering the increasing number of Cocoon blocks that rely on LGPL'ed
libraries (JCVS, JFreeChart, and now Hibernate), I wonder if, instead of
having a myriad of very small projects, we could have a single
"CocoLess" (or another name) project on cocoondev.org hosting all these
small blocks. This would give them a greater visibility and consequently
a bigger community.
Thoughts ? Steven ?
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: Hibernat2 block
Posted by Christopher Oliver <re...@verizon.net>.
Sorry, I don't understand your answer. Can you explain what you mean?
Giacomo Pati wrote:
>On Sat, 19 Apr 2003, Christopher Oliver wrote:
>
>
>
>>Why not use a flowscript to call Hibernate? Then you wouldn't need a
>>special logicsheet. Jpath would be enough.
>>
>>
>
>Siply because I don't want to use a flow script any times I'd like
>to use Hibernate.
>
>Giacomo
>
>
>
>>Regards,
>>
>>Chris
>>
>>Giacomo Pati wrote:
>>
>>
>>
>>>Hi team
>>>
>>>We've recently started a project that uses the Hibernat2 package from
>>>http://hibernate.sf.net as a object to relational mapping tool. We considered
>>>other packages and end up with Hibernate2 because of:
>>>
>>> - has good performance
>>> - has quite a good community
>>> - has many project using it (http://hibernate.bluemars.net/27.html)
>>> - has XDoclet support
>>> (http://xdoclet.sourceforge.net/tags/hibernate-tags.html)
>>>
>>>and some other aspects.
>>>
>>>We have developped a logicsheet that is a mixture out of the esql and jpath
>>>logicsheets that let you develop easily XSP pages with hibernated content.
>>>
>>>Consider the following object model:
>>>
>>> Project
>>> !
>>> +--<>* Task Staff
>>> ! !
>>> +--<>* Mandate *<>--+
>>> !
>>> +--<>* Expenditure <!--+
>>> !
>>> +---------+---------+
>>> ! !
>>> Activity Expense
>>>
>>>Where
>>> - Project : Defines a project
>>> - Task : Defines a task of a project
>>> - Mandate : Defines a task worked on by a staff
>>> - Expendituere: Defines work activities as either
>>> - Activity : Duration activity worked on a mandate
>>> - Expense : Costs raised for a mandate
>>>
>>>Now using the logicsheet one can build a XSP page like:
>>>
>>> <xsp:page language="java"
>>> xmlns:xsp="http://apache.org/xsp"
>>> xmlns:hbn="http://otego.com/xsp/hibernate/2.0" >
>>> <document>
>>> <hbn:execute-query>
>>> <hbn:query>from project in class Project</hbn:query>
>>> <hbn:results>
>>> <project>
>>> <name><hbn:value-of select="result/name"/></name>
>>> <hbn:for-each select="result/tasks">
>>> <task>
>>> <name><hbn:value-of select="name"/></name>
>>> <hbn:for-each select="mandates">
>>> <mandate>
>>> <staff>
>>> <name><hbn:value-of select="staff/name"/></name>
>>> </staff>
>>> <hbn:for-each select="expenditures">
>>> <expenditure>
>>> <date><hbn:value-of select="date"/></date>
>>> <description><hbn:value-of select="description"/></description>
>>> <hbn:choose>
>>> <hbn:when test="type='Activity'">
>>> <activity>
>>> <duration><hbn:value-of select="duration"/></duration>
>>> </activity>
>>> </hbn:when>
>>> <hbn:when test="type='Expense'">
>>> <expense>
>>> <amount><hbn:value-of select="amount"/></amount>
>>> </expense>
>>> </hbn:when>
>>> </hbn:choose>
>>> </expenditure>
>>> </hbn:for-each>
>>> <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
>>> </mandate>
>>> </hbn:for-each>
>>> <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
>>> </task>
>>> </hbn:for-each>
>>> <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
>>> </project>
>>> </hbn:results>
>>> <hbn:no-results>
>>> <project/>
>>> </hbn:no-results>
>>> <hbn:error-results>
>>> <trace>
>>> <hbn:get-stacktrace/>
>>> </trace>
>>> </hbn:error-results>
>>> </hbn:execute-query>
>>> </document>
>>> </xsp:page>
>>>
>>>Anybody intressted in this? Can I donnate and add a block for it?
>>>
>>>Giacomo
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>
>
Re: Hibernat2 block
Posted by Giacomo Pati <gi...@apache.org>.
On Sat, 19 Apr 2003, Christopher Oliver wrote:
> Why not use a flowscript to call Hibernate? Then you wouldn't need a
> special logicsheet. Jpath would be enough.
Siply because I don't want to use a flow script any times I'd like
to use Hibernate.
Giacomo
>
> Regards,
>
> Chris
>
> Giacomo Pati wrote:
>
> >Hi team
> >
> >We've recently started a project that uses the Hibernat2 package from
> >http://hibernate.sf.net as a object to relational mapping tool. We considered
> >other packages and end up with Hibernate2 because of:
> >
> > - has good performance
> > - has quite a good community
> > - has many project using it (http://hibernate.bluemars.net/27.html)
> > - has XDoclet support
> > (http://xdoclet.sourceforge.net/tags/hibernate-tags.html)
> >
> >and some other aspects.
> >
> >We have developped a logicsheet that is a mixture out of the esql and jpath
> >logicsheets that let you develop easily XSP pages with hibernated content.
> >
> >Consider the following object model:
> >
> > Project
> > !
> > +--<>* Task Staff
> > ! !
> > +--<>* Mandate *<>--+
> > !
> > +--<>* Expenditure <!--+
> > !
> > +---------+---------+
> > ! !
> > Activity Expense
> >
> >Where
> > - Project : Defines a project
> > - Task : Defines a task of a project
> > - Mandate : Defines a task worked on by a staff
> > - Expendituere: Defines work activities as either
> > - Activity : Duration activity worked on a mandate
> > - Expense : Costs raised for a mandate
> >
> >Now using the logicsheet one can build a XSP page like:
> >
> > <xsp:page language="java"
> > xmlns:xsp="http://apache.org/xsp"
> > xmlns:hbn="http://otego.com/xsp/hibernate/2.0" >
> > <document>
> > <hbn:execute-query>
> > <hbn:query>from project in class Project</hbn:query>
> > <hbn:results>
> > <project>
> > <name><hbn:value-of select="result/name"/></name>
> > <hbn:for-each select="result/tasks">
> > <task>
> > <name><hbn:value-of select="name"/></name>
> > <hbn:for-each select="mandates">
> > <mandate>
> > <staff>
> > <name><hbn:value-of select="staff/name"/></name>
> > </staff>
> > <hbn:for-each select="expenditures">
> > <expenditure>
> > <date><hbn:value-of select="date"/></date>
> > <description><hbn:value-of select="description"/></description>
> > <hbn:choose>
> > <hbn:when test="type='Activity'">
> > <activity>
> > <duration><hbn:value-of select="duration"/></duration>
> > </activity>
> > </hbn:when>
> > <hbn:when test="type='Expense'">
> > <expense>
> > <amount><hbn:value-of select="amount"/></amount>
> > </expense>
> > </hbn:when>
> > </hbn:choose>
> > </expenditure>
> > </hbn:for-each>
> > <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
> > </mandate>
> > </hbn:for-each>
> > <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
> > </task>
> > </hbn:for-each>
> > <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
> > </project>
> > </hbn:results>
> > <hbn:no-results>
> > <project/>
> > </hbn:no-results>
> > <hbn:error-results>
> > <trace>
> > <hbn:get-stacktrace/>
> > </trace>
> > </hbn:error-results>
> > </hbn:execute-query>
> > </document>
> > </xsp:page>
> >
> >Anybody intressted in this? Can I donnate and add a block for it?
> >
> >Giacomo
> >
> >
> >
>
>
>
>
>
RE: Hibernat2 block
Posted by Hugo Burm <hu...@xs4all.nl>.
I ported the "samples/flow/prefs/" sample to XMLForm and I am using
Hibernate2 for persistence.
So I am using Hibernate from flowscript. No actions. No xsp.
But I need two java classes: one user bean and one registry class, just as
in the original example.
If you want to have a look at it:
http://www.datagram.nl/XMLForm-Hibernate-Avalon.zip
Don't pay attention to the Avalon thing. It is just an experiment in calling
Avalon components from flowscript.
In the zip is also a straigthforward version without Avalon.
Can you tell me what is behind the xsp approach? Also java beans and helper
classes?
Hugo
-----Original Message-----
From: Christopher Oliver [mailto:res1cf5x@verizon.net]
Sent: Saturday, April 19, 2003 9:27 PM
To: cocoon-dev@xml.apache.org
Subject: Re: Hibernat2 block
Why not use a flowscript to call Hibernate? Then you wouldn't need a
special logicsheet. Jpath would be enough.
Regards,
Chris
Giacomo Pati wrote:
>Hi team
>
>We've recently started a project that uses the Hibernat2 package from
>http://hibernate.sf.net as a object to relational mapping tool. We
considered
>other packages and end up with Hibernate2 because of:
>
> - has good performance
> - has quite a good community
> - has many project using it (http://hibernate.bluemars.net/27.html)
> - has XDoclet support
> (http://xdoclet.sourceforge.net/tags/hibernate-tags.html)
>
>and some other aspects.
>
>We have developped a logicsheet that is a mixture out of the esql and jpath
>logicsheets that let you develop easily XSP pages with hibernated content.
>
>Consider the following object model:
>
> Project
> !
> +--<>* Task Staff
> ! !
> +--<>* Mandate *<>--+
> !
> +--<>* Expenditure <!--+
> !
> +---------+---------+
> ! !
> Activity Expense
>
>Where
> - Project : Defines a project
> - Task : Defines a task of a project
> - Mandate : Defines a task worked on by a staff
> - Expendituere: Defines work activities as either
> - Activity : Duration activity worked on a mandate
> - Expense : Costs raised for a mandate
>
>Now using the logicsheet one can build a XSP page like:
>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:hbn="http://otego.com/xsp/hibernate/2.0" >
> <document>
> <hbn:execute-query>
> <hbn:query>from project in class Project</hbn:query>
> <hbn:results>
> <project>
> <name><hbn:value-of select="result/name"/></name>
> <hbn:for-each select="result/tasks">
> <task>
> <name><hbn:value-of select="name"/></name>
> <hbn:for-each select="mandates">
> <mandate>
> <staff>
> <name><hbn:value-of select="staff/name"/></name>
> </staff>
> <hbn:for-each select="expenditures">
> <expenditure>
> <date><hbn:value-of select="date"/></date>
> <description><hbn:value-of
select="description"/></description>
> <hbn:choose>
> <hbn:when test="type='Activity'">
> <activity>
> <duration><hbn:value-of select="duration"/></duration>
> </activity>
> </hbn:when>
> <hbn:when test="type='Expense'">
> <expense>
> <amount><hbn:value-of select="amount"/></amount>
> </expense>
> </hbn:when>
> </hbn:choose>
> </expenditure>
> </hbn:for-each>
> <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
> </mandate>
> </hbn:for-each>
> <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
> </task>
> </hbn:for-each>
> <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
> </project>
> </hbn:results>
> <hbn:no-results>
> <project/>
> </hbn:no-results>
> <hbn:error-results>
> <trace>
> <hbn:get-stacktrace/>
> </trace>
> </hbn:error-results>
> </hbn:execute-query>
> </document>
> </xsp:page>
>
>Anybody intressted in this? Can I donnate and add a block for it?
>
>Giacomo
>
>
>
Re: Hibernat2 block
Posted by Christopher Oliver <re...@verizon.net>.
Why not use a flowscript to call Hibernate? Then you wouldn't need a
special logicsheet. Jpath would be enough.
Regards,
Chris
Giacomo Pati wrote:
>Hi team
>
>We've recently started a project that uses the Hibernat2 package from
>http://hibernate.sf.net as a object to relational mapping tool. We considered
>other packages and end up with Hibernate2 because of:
>
> - has good performance
> - has quite a good community
> - has many project using it (http://hibernate.bluemars.net/27.html)
> - has XDoclet support
> (http://xdoclet.sourceforge.net/tags/hibernate-tags.html)
>
>and some other aspects.
>
>We have developped a logicsheet that is a mixture out of the esql and jpath
>logicsheets that let you develop easily XSP pages with hibernated content.
>
>Consider the following object model:
>
> Project
> !
> +--<>* Task Staff
> ! !
> +--<>* Mandate *<>--+
> !
> +--<>* Expenditure <!--+
> !
> +---------+---------+
> ! !
> Activity Expense
>
>Where
> - Project : Defines a project
> - Task : Defines a task of a project
> - Mandate : Defines a task worked on by a staff
> - Expendituere: Defines work activities as either
> - Activity : Duration activity worked on a mandate
> - Expense : Costs raised for a mandate
>
>Now using the logicsheet one can build a XSP page like:
>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:hbn="http://otego.com/xsp/hibernate/2.0" >
> <document>
> <hbn:execute-query>
> <hbn:query>from project in class Project</hbn:query>
> <hbn:results>
> <project>
> <name><hbn:value-of select="result/name"/></name>
> <hbn:for-each select="result/tasks">
> <task>
> <name><hbn:value-of select="name"/></name>
> <hbn:for-each select="mandates">
> <mandate>
> <staff>
> <name><hbn:value-of select="staff/name"/></name>
> </staff>
> <hbn:for-each select="expenditures">
> <expenditure>
> <date><hbn:value-of select="date"/></date>
> <description><hbn:value-of select="description"/></description>
> <hbn:choose>
> <hbn:when test="type='Activity'">
> <activity>
> <duration><hbn:value-of select="duration"/></duration>
> </activity>
> </hbn:when>
> <hbn:when test="type='Expense'">
> <expense>
> <amount><hbn:value-of select="amount"/></amount>
> </expense>
> </hbn:when>
> </hbn:choose>
> </expenditure>
> </hbn:for-each>
> <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
> </mandate>
> </hbn:for-each>
> <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
> </task>
> </hbn:for-each>
> <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
> </project>
> </hbn:results>
> <hbn:no-results>
> <project/>
> </hbn:no-results>
> <hbn:error-results>
> <trace>
> <hbn:get-stacktrace/>
> </trace>
> </hbn:error-results>
> </hbn:execute-query>
> </document>
> </xsp:page>
>
>Anybody intressted in this? Can I donnate and add a block for it?
>
>Giacomo
>
>
>
Re: Hibernat2 block
Posted by Leo Simons <le...@apache.org>.
Someone posted an avalon component wrapper for hibernate to turbine-dev
today ("Avalon Components" thread). Might want to work with those guys :D
cheers!
- Leo
Giacomo Pati wrote:
<snip/>Hibernate<snip/>