Difference between revisions of "Statement"

From GreenVulcano Wiki
Jump to: navigation, search
(Created page with "This section contains the statement to be evaluated which can contains the following placeholders: # fixed : a text string; # <nowiki>${{propname}} </nowiki> : a System propert...")
 
Line 1: Line 1:
This section contains the statement to be evaluated which can contains the following placeholders:
+
This section contains the statement to be evaluated which can contains one or more [[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, if not defined is used the current connection
 
# <nowiki>sqllist{{[conn::]statement}}</nowiki>: execute a select sql statement sql and return the value of the first field of all selected records as a comma separated list. <br/> The ''conn'' parameter is the JNDI name of a DataSource, if not defined is used the current connection
 
# <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
 
 
 
  
  
 
The Statement element has the following parameters:
 
The Statement element has the following parameters:
  
* type:  
+
* ''type'': Must be:
 
+
** DBOSelect          : select
  Must be:
+
** DBOInsert          : insert
 
+
** DBOUpdate          : update
    DBOSelect          : select
+
** DBOInsertOrUpdate  : insert|update
    DBOInsert          : insert
+
** DBOUpdateOrInsert  : insert|update
    DBOUpdate          : update
+
** DBOCallSP          : callsp
    DBOInsertOrUpdate  : insert|update
+
** Excel Sheet        : select
    DBOUpdateOrInsert  : insert|update
 
    DBOCallSP          : callsp
 
 
 
    Excel Sheet        : select
 
  
* id: Pattern: ! [0-9]* ! set a integer value
+
* ''id'': Pattern: ! [0-9]* ! set a integer value

Revision as of 10:42, 26 January 2012

This section contains the statement to be evaluated which can contains one or more placeholders.


The Statement element has the following parameters:

  • type: Must be:
    • DBOSelect  : select
    • DBOInsert  : insert
    • DBOUpdate  : update
    • DBOInsertOrUpdate  : insert|update
    • DBOUpdateOrInsert  : insert|update
    • DBOCallSP  : callsp
    • Excel Sheet  : select
  • id: Pattern: ! [0-9]* ! set a integer value