Difference between revisions of "DBOInsertOrUpdate"

From GreenVulcano Wiki
Jump to: navigation, search
({{GVESB}} configuration)
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
 
* [[statement]]
 
* [[statement]]
  
Its attributes are:
+
The following table shows the DBOInsertOrUpdate attributes:
 
+
{|class="gvtable"
* ''type'': dbo
+
! Attribute !! Type !! Description
* ''class'': it.greenvulcano.gvesb.datahandling.dbo.DBOInsertOrUpdate
+
|-
* ''name''
+
| type || fixed || This attribute must assume the value '''dbo'''
* ''transformation''
+
|-
* ''duplicate-insert-code'': Specifies the error code when inserting with duplicate key.
+
| class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.datahandling.dbo.DBOInsertOrUpdate'''
* ''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
+
|-
* ''jdbc-connection-name'':  DataSource JNDI name. <br/>  Override connection defined in DBOBuilder.
+
| name || required || DBOUpdate name
* ''ignore-input'' (true|false):  Tell the engine do not use the input data.
+
|-
* ''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.
+
| transformation || required || Transformation to be applied on the input data to obtain the internal XML commands.
* ''output-data'':  The default is the value of @name-Output.
+
|-
 +
| duplicate-insert-code || optional || Specifies the error code when inserting with duplicate key.
 +
|-
 +
| force-mode || optional || (caller or xml2db): Force mode of the [[DBOBuilder#DBOs|DBO]], can be used in [[DBOBuilder]] whit more heterogeneous [[DBOBuilder#DBOs|DBO]]. <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):  Tell 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:

Latest revision as of 12:11, 12 November 2012

Description

The DBOInsertOrUpdate element runs the insert, and in case of collision, the corresponding update.

GreenVulcano® ESB configuration

DBOInsertOrUpdate with VulCon

DBOInsertOrUpdate might contain the following sub-elements:

The following table shows the DBOInsertOrUpdate 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.DBOInsertOrUpdate
name required DBOUpdate name
transformation required Transformation to be applied on the input data to obtain the internal XML commands.
duplicate-insert-code optional Specifies the error code when inserting with duplicate key.
force-mode optional (caller or xml2db): Force mode of the DBO, can be used in DBOBuilder whit more heterogeneous DBO.
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): Tell 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" isXA="true" jdbc-connection-name="ds.gv_cama"
         name="UpdateCDREvent" type="dbobuilder">
      <DBOInsertOrUpdate class="it.greenvulcano.gvesb.datahandling.dbo.DBOInsertOrUpdate" duplicate-insert-code="-104"
                 name="UpdateCDREvent-update" transformation="UpdateCDRData" type="dbo">
            <statement id="0" type="insert">insert into cama.cdr_event (......) values (?, ?, ?, ?, sysdate)</statement>
            <statement id="0" type="update">update cama.cdr_event set EVENT_TIME = ?, ... where MSG_ID=? and ...</statement>
      </DBOInsertOrUpdate>
 </DBOBuilder>