Difference between revisions of "DataRetriever"

From GreenVulcano Wiki
Jump to: navigation, search
Line 1: Line 1:
''DataRetriever'' defines a helper function.  
+
The {{GVESB}} element ''DataRetriever'' defines a helper function.  
  
 
It is defined by four parameters:
 
It is defined by four parameters:
 
+
{|class="gvtable"
* '''cacheable''' (true|false): If true the calculated function value, for the given parameters set, is cached for future access during the service processing.<br/> The cache is canceled at service end. <br/>  Default false.
+
! Attribute !! Type !! Description
 
+
|-
* '''DataRetriever''': can contains the following placeholders:
+
| cacheable || optional || (true|false): If true the calculated function value, for the given parameters set, is cached for future access during the service processing.<br/> The cache is cancelled at service end. <br/>  Default false.
 
+
| DataRetriever || optional || DB query. Might contain [[placeholders]].
# fixed : a text string;
+
|-
# <nowiki>${{propname}}</nowiki>      : a System property name;
+
| method || required || Helper function name.
# <nowiki>sp{{propname}}</nowiki>    : a System property name;
+
|-
# <nowiki>@{{propname}}</nowiki>      : a inProperties property name;
+
| signature || optional || Comma-separated list of parameters name to be substituted in the function.
# <nowiki>timestamp{{pattern}}</nowiki> : return the current timestamp formatted as 'pattern'
+
|}
# <nowiki>dateformat{{date::source-pattern::dest-pattern}}</nowiki> : reformat 'date' from 'source-pattern' to 'dest-pattern'
 
# <nowiki>decode{{field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}}</nowiki> : evaluate as if-then-else; if 'field' is equal to cond1...n, return the value of val1...n, otherwise 'default'
 
# <nowiki>decodeL{{sep::field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}}</nowiki> : is equivalent to 'decode', with the difference that 'condX' can be a list of values separated by 'sep'
 
# <nowiki>js{{scope::script}}</nowiki> : evaluate a JavaScript script, using the scope 'scope'
 
# <nowiki>sql{{conn::statement}}</nowiki>  : execute a select sql statement sql and return the value of the first field of the first selected record.<br/> The 'conn' parameter is the JNDI name of a DataSource
 
# <nowiki>sqllist{{conn[::sep]::statement}}</nowiki>: execute a select sql statement sql and return the value of the first field of all selected records as a 'sep' separated list.<br/> The 'conn' parameter is the JNDI name of a DataSource<br/>  The 'sep' parameter defaults to comma
 
# <nowiki>sqltable{{conn::statement}}</nowiki>: executes a select sql statement and returns all values of returned cursor as an XML.<br/> The 'conn' parameter is the JNDI name of a DataSource
 
# <nowiki>ognl{{script}}</nowiki> : evaluate a OGNL script
 
 
 
* '''method''': Helper function name.
 
 
 
* '''signature''': Comma-separated list of parameters name to be substituted in the function.
 

Revision as of 14:45, 9 February 2012

The GreenVulcano® ESB element DataRetriever defines a helper function.

It is defined by four parameters:

Attribute Type Description
cacheable optional false): If true the calculated function value, for the given parameters set, is cached for future access during the service processing.
The cache is cancelled at service end.
Default false.
DataRetriever optional DB query. Might contain placeholders.
method required Helper function name.
signature optional Comma-separated list of parameters name to be substituted in the function.