DataRetriever

From GreenVulcano Wiki
Revision as of 16:22, 22 January 2012 by Anonymous (talk) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Defines a helper function.

   Can contains the following placeholders:
    1 - fixed : a text string;
    2 - $Template:Propname      : a System property name;
    3 - spTemplate:Propname     : a System property name;
    4 - @Template:Propname      : a inProperties property name;
    5 - timestampTemplate:Pattern : return the current timestamp formatted as 'pattern'
    6 - dateformatTemplate:Date::source-pattern::dest-pattern : reformat 'date' from 'source-pattern' to 'dest-pattern'
    7 - 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'
    8 - 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'
    9 - jsTemplate:Scope::script : evaluate a JavaScript script, using the scope 'scope'
   10  - sqlTemplate: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
   11  - 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
   12 - sqltableTemplate: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
   13 - ognlTemplate:Script : evaluate a OGNL script