Difference between revisions of "DBOUpdate"

From GreenVulcano Wiki
Jump to: navigation, search
({{GVESB}} configuration)
({{GVESB}} configuration)
Line 5: Line 5:
 
=={{GVESB}} configuration==
 
=={{GVESB}} configuration==
 
[[File:DBOUpdate.jpg|thumb|DBOUpdate with VulCon]]
 
[[File:DBOUpdate.jpg|thumb|DBOUpdate with VulCon]]
DBOUpdate allows you to make changes to (updating) the database.
+
DBOUpdate allows you to update data into the database.
  
 
Each statement is identified by the id.
 
Each statement is identified by the id.
  
 
Actions can be defined in two ways:
 
Actions can be defined in two ways:
Single execution of a statement
+
* Single execution of a statement
complex execution guided by XML
+
* Complex execution guided by XML
  
 
In the first modality any input is ignored and the code executes the first statement configured.
 
In the first modality any input is ignored and the code executes the first statement configured.
Line 22: Line 22:
 
* [[statement]]
 
* [[statement]]
  
Its attributes are:
+
The following table shows the DBOUpdate attributes:
 
+
{|class="gvtable"
* ''type'': dbo
+
! Attribute !! Type !! Description
* ''class'': it.greenvulcano.gvesb.datahandling.dbo.DBOUpdate
+
|-
* ''name''
+
| type || fixed || This attribute must assume the value '''dbo'''
* ''transformation''
+
|-
* ''force-mode (caller|xml2db)'': Force mode of the DBO, can be used in DBOBuilder whit more heterogeneous DBO. <br/> Mode:<br/> caller - inherit the mode of the caller<br/> xml2db - data entry mode
+
| class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.datahandling.dbo.DBOUpdate'''
* ''jdbc-connection-name'':  DataSource JNDI name. <br/>  Override connection defined in DBOBuilder.
+
|-
* ''ignore-input'' (true|false):  Tell the engine do not use the input data.
+
| name || required || DBOUpdate name
* ''input-data'': The default is the value of @name-Input.<br/>  Can be set as the @output-data of a preceeding DBO to use its output as input.
+
|-
* ''output-data'':  The default is the value of @name-Output.
+
| transformation || required || Transformation name
 +
|-
 +
| force-mode || optional || (caller|xml2db) Force mode of the [[DBOBuilder#DBOs|DBO]], can be used in [[DBOBuilder]] whit more heterogeneous [[DBOBuilder#DBOs|DBOs]]. <br/> Mode:<br/> caller - inherit the mode of the caller<br/> xml2db - data entry mode
 +
|-
 +
| jdbc-connection-name || optional || DataSource JNDI name. <br/>  Override connection defined in [[DBOBuilder]].
 +
|-
 +
| ignore-input || optional || (true|false) Tells the engine do not use the input data.
 +
|-
 +
| input-data || optional || The default is the value of @name-Input.<br/>  Can be set as the @output-data of a preceding [[DBOBuilder#DBOs|DBO]] to use its output as input.
 +
|-
 +
| output-data || optional || The default is the value of @name-Output.
 +
|}
  
 
For example:
 
For example:

Revision as of 11:24, 2 April 2012

Description

The DBOUpdate element represents the DBO optimized for update operations.

GreenVulcano® ESB configuration

DBOUpdate with VulCon

DBOUpdate allows you to update data into the database.

Each statement is identified by the id.

Actions can be defined in two ways:

  • Single execution of a statement
  • Complex execution guided by XML

In the first modality any input is ignored and the code executes the first statement configured.

In the second mode, the input XML (or its transformation) must contain the command (row) valid with all parameters (COL) required by the statement.

Might contain the following sub-elements:

The following table shows the DBOUpdate attributes:

Attribute Type Description
type fixed This attribute must assume the value dbo
class fixed This attribute must assume the value it.greenvulcano.gvesb.datahandling.dbo.DBOUpdate
name required DBOUpdate name
transformation required Transformation name
force-mode optional xml2db) Force mode of the DBO, can be used in DBOBuilder whit more heterogeneous DBOs.
Mode:
caller - inherit the mode of the caller
xml2db - data entry mode
jdbc-connection-name optional DataSource JNDI name.
Override connection defined in DBOBuilder.
ignore-input optional false) Tells the engine do not use the input data.
input-data optional The default is the value of @name-Input.
Can be set as the @output-data of a preceding DBO to use its output as input.
output-data optional The default is the value of @name-Output.

For example:

<?xml version="1.0" encoding="UTF-8"?>
 <DBOBuilder class="it.greenvulcano.gvesb.datahandling.dbobuilder.DBOBuilder"
              jdbc-connection-name="ds.gv_test" name="PersonInsertFull" type="dbobuilder">
       <DHVariables>
             <DHVariable name="decimal-separator" value="."/>
             <DHVariable name="grouping-separator" value=","/>
             <DHVariable name="format" value="#0.00"/>
       </DHVariables>
       <DBOUpdate class="it.greenvulcano.gvesb.datahandling.dbo.DBOUpdate"
               name="PersonInsertFull" transformation="PersonInsertFull" type="dbo">
             <statement id="0" type="update">update PERSON set ID_CITY=? where ID=?</statement>
             <statement id="1" type="update">update CREDIT_CARD  set CREDIT=?, ENABLED=? where ID=?</statement>
       </DBOUpdate>
 </DBOBuilder>