TableRetriever

From GreenVulcano Wiki
Revision as of 14:19, 22 May 2012 by G.dimaio (talk | contribs) (Created page with "==Description== The TableRetriever element allows you to define a helper to use into the XSL transformations. We define the functions that run SQL select and return the result ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

The TableRetriever element allows you to define a helper to use into the XSL transformations.

We define the functions that run SQL select and return the result as an XML string in the following form:

<?xml version="1.0" encoding="UTF-8"?>
<RowSet>
  <data>
     <row>
        <col>value1</col>
        <col>value2</col>
        <col>value3</col>
     </row>
     <row>
        <col>value4</col>
        <col>value5</col>
        <col>value6</col>
     </row>
        ..
     <row>
        <col>valuex</col>
        <col>valuey</col>
        <col>valuez</col>
     </row>
  </data>
</RowSet>

The statement to be executed can contain metadata resolved at runtime.

GreenVulcano® ESB configuration

TableRetriever element is used by RetrieverConfig.

The following table shows its attributes:

Attribute Type Description
type fixed retriever (unmodifiable)
class fixed it.greenvulcano.gvesb.datahandling.utils.TableRetriever

Might contain the sub-elements:


An example

Define the following TableRetriever:

    <TableRetriever class="it.greenvulcano.gvesb.datahandling.utils.TableRetriever" type="retriever">
        <DataRetriever cacheable="true" method="..."   signature="...">
             ...
        </DataRetriever>
        <DataRetriever method="..." signature="...">
             ...
        </DataRetriever>
    </TableRetriever>

to be applied to the transformation:

......
    <xsl:element name="col">
        <xsl:value-of select="java:it.greenvulcano.gvesb.datahandling.utils.TableRetriever.getData('....',.....)"/>
    </xsl:element>