cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject Hibernat2 block
Date Sat, 19 Apr 2003 09:31:06 GMT

Hi team

We've recently started a project that uses the Hibernat2 package from 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 (
  - has XDoclet support

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:

   +--<>* Task                Staff
           !                   !
           +--<>* Mandate *<>--+
                   +--<>* Expenditure <!--+
                                !                   !
                              Activity            Expense

  - 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:hbn="" >
    <hbn:query>from project in class Project</hbn:query>
       <name><hbn:value-of select="result/name"/></name>
       <hbn:for-each select="result/tasks">
         <name><hbn:value-of select="name"/></name>
          <hbn:for-each select="mandates">
             <name><hbn:value-of select="staff/name"/></name>
            <hbn:for-each select="expenditures">
              <date><hbn:value-of select="date"/></date>
              <description><hbn:value-of select="description"/></description>
               <hbn:when test="type='Activity'">
                 <duration><hbn:value-of select="duration"/></duration>
               <hbn:when test="type='Expense'">
                 <amount><hbn:value-of select="amount"/></amount>
           <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
          <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>
       <sum><hbn:value-of select="sumAmountOfAllExpenditure"/></sum>

Anybody intressted in this? Can I donnate and add a block for it?


View raw message