Difference between revisions of "DataRetriever"
(Created page with "Defines a helper function. Can contains the following placeholders: 1 - fixed : a text string; 2 - ${{propname}} : a System property name; 3 - sp{{propn...") |
|||
Line 1: | Line 1: | ||
− | + | ''DataRetriever'' defines a helper function. Can contains the following placeholders: | |
− | + | # fixed : a text string; | |
− | + | # <nowiki>${{propname}}</nowiki> : a System property name; | |
− | + | # <nowiki>sp{{propname}}</nowiki> : a System property name; | |
− | + | # <nowiki>@{{propname}}</nowiki> : a inProperties property name; | |
− | + | # <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 | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 17:44, 22 January 2012
DataRetriever defines a helper function. Can contains the following placeholders:
- fixed : a text string;
- ${{propname}} : a System property name;
- sp{{propname}} : a System property name;
- @{{propname}} : a inProperties property name;
- timestamp{{pattern}} : return the current timestamp formatted as 'pattern'
- dateformat{{date::source-pattern::dest-pattern}} : reformat 'date' from 'source-pattern' to 'dest-pattern'
- decode{{field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}} : evaluate as if-then-else; if 'field' is equal to cond1...n, return the value of val1...n, otherwise 'default'
- decodeL{{sep::field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}} : is equivalent to 'decode', with the difference that 'condX' can be a list of values separated by 'sep'
- js{{scope::script}} : evaluate a JavaScript script, using the scope 'scope'
- sql{{conn::statement}} : execute a select sql statement sql and return the value of the first field of the first selected record.
The 'conn' parameter is the JNDI name of a DataSource - sqllist{{conn[::sep]::statement}}: execute a select sql statement sql and return the value of the first field of all selected records as a 'sep' separated list.
The 'conn' parameter is the JNDI name of a DataSource
The 'sep' parameter defaults to comma - sqltable{{conn::statement}}: executes a select sql statement and returns all values of returned cursor as an XML.
The 'conn' parameter is the JNDI name of a DataSource - ognl{{script}} : evaluate a OGNL script