Difference between revisions of "DBOperations"
(→DataSourceConnection) |
|||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | ==Description== | ||
+ | |||
The element DBOperations configures an interaction with a database. | The element DBOperations configures an interaction with a database. | ||
− | It has | + | =={{GVESB}} configuration== |
+ | |||
+ | DBOperations might contain the following sub-elements: | ||
+ | |||
+ | * [[Description]] | ||
+ | * [[#DataSourceConnection|DataSourceConnection]] or [[#JdbcConnection|JdbcConnection]] | ||
+ | * [[#Statement|Statement]] | ||
+ | * [[ResultSet]] | ||
+ | |||
+ | |||
+ | ===DataSourceConnection=== | ||
+ | |||
+ | Use this element if you want to retrieve a DataSource connection. This element represents the class of connection via Data Source for all those clients that use an application server. The following table shows its attributes: | ||
+ | |||
+ | {|class="gvtable" | ||
+ | ! Attribute !! Type !! Description | ||
+ | |- | ||
+ | | type || fixed || This attribute must assume the value '''db-connection''' | ||
+ | |- | ||
+ | | class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.j2ee.db.connections.DataSourceConnection''' | ||
+ | |- | ||
+ | | jndi-name || required || this attribute defines the DataSource JNDI name | ||
+ | |} | ||
+ | |||
+ | Might contain the sub-elements: | ||
+ | |||
+ | * [[Description]] | ||
+ | * [[JNDIHelper]] | ||
+ | |||
+ | ===JDBCConnection=== | ||
+ | |||
+ | Use this element for retrieving a JDBC connection. | ||
+ | |||
+ | The following table shows its attributes: | ||
+ | {|class="gvtable" | ||
+ | ! Attribute !! Type !! Description | ||
+ | |- | ||
+ | | type || fixed || This attribute must assume the value '''db-connection'''. | ||
+ | |- | ||
+ | | class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.j2ee.db.connections.JDBCDataBaseConnection | ||
+ | |- | ||
+ | | connectionName || required || this attribute defines the name of the connection to be used, must be one of the connections configured on the file ''GVAdapters.xml'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | ===Statement=== | ||
+ | |||
+ | The Statement element contains the statement to be evaluated. Those statements might contain [[placeholders]] that will be replaced at runtime. | ||
+ | |||
+ | It is used by: [[DBOperations]]. | ||
+ | |||
+ | The following table shows its attributes: | ||
+ | {|class="gvtable" | ||
+ | ! Attribute !! Type !! Description | ||
+ | |- | ||
+ | | statementType || required || This element represents the type of statement to use. | ||
+ | We recommend using a CallableStatement to process stored procedures. | ||
+ | The attribute's admitted values are: | ||
+ | * CallableStatement | ||
+ | * PreparedStatement | ||
+ | |} | ||
+ | |||
+ | Might contain the sub-elements: | ||
+ | * [[#StatementValue|StatementValue]] | ||
+ | * [[#ParamResolvers|ParamResolvers]] | ||
+ | |||
+ | ====StatementValue==== | ||
+ | |||
+ | StatementValue contains the value of the statement to be performed. | ||
+ | |||
+ | The StatementValue Element is used by: [[Statement]]. | ||
+ | |||
+ | ====ParamResolvers==== | ||
+ | |||
+ | This element contains the list of Resolver used to resolve the parameters included in the statement. | ||
+ | |||
+ | Resolvers are applied in sequence, following the order of definition, and can be of different types. | ||
+ | |||
+ | The ParamResolvers Element is used by: [[Statement]]. | ||
+ | |||
+ | Might contain more sub-elements: | ||
+ | * [[#ParamResolver|ParamResolver]] | ||
+ | |||
+ | =====ParamResolver===== | ||
+ | |||
+ | This element represents the type of a resolver to use for solving the parameters included in the statement. | ||
+ | |||
+ | The ParamResolver Element is used by: [[#ParamResolvers|ParamResolvers]] | ||
+ | |||
+ | Might contain the sub-elements: | ||
+ | * [[Description]] | ||
+ | * [[#XPathParamResolver|XPathParamResolver]] or [[#GVBufferParamResolver|GVBufferParamResolver]] | ||
+ | |||
+ | ======XPathParamResolver====== | ||
+ | |||
+ | Defines the type of Resolver based on XPath. | ||
+ | |||
+ | The XPathParamResolver Element is used by: [[#ParamResolver|ParamResolver]]. | ||
+ | The following table shows its attributes: | ||
+ | {|class="gvtable" | ||
+ | ! Attribute !! Type !! Description | ||
+ | |- | ||
+ | | type || fixed || This attribute must assume the value '''resolver'''. | ||
+ | |- | ||
+ | | class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.j2ee.db.resolver.XPathResolver'''. | ||
+ | |} | ||
+ | |||
+ | Might contain the sub-elements: | ||
+ | * [[Description]] | ||
+ | * [[#Param|Param]] | ||
+ | |||
+ | ======Param====== | ||
+ | |||
+ | This element defines the parameter to be solved according to an XPath expression applied to the [[GVBuffer]] body. | ||
+ | |||
+ | The Param Element is used by: [[#XPathParamResolver|XPathParamResolver]]. | ||
+ | |||
+ | The following table shows its attributes: | ||
+ | {|class="gvtable" | ||
+ | ! Attribute !! Type !! Description | ||
+ | |- | ||
+ | | XPath || required || This attribute defines the XPath applied to the body of GVBuffer. | ||
+ | The attribute's value cannot be null. | ||
+ | |- | ||
+ | | position || required || This attribute defines the position parameter has in the statement. | ||
+ | The attribute's value cannot be null. | ||
+ | |- | ||
+ | | type || required || This attribute defines the type of the parameter. | ||
+ | The attribute's admitted values are: | ||
+ | * string | ||
+ | * int | ||
+ | * long | ||
+ | * float | ||
+ | * date | ||
+ | * binary | ||
+ | * blob | ||
+ | * clob | ||
+ | |- | ||
+ | | format || optional || This attribute lets you configure the date format in the event that has been defined type = 'date'. | ||
+ | The attribute's value cannot be null. | ||
+ | |} | ||
+ | |||
+ | Might contain the sub-elements: | ||
+ | * [[Description]] | ||
+ | |||
+ | ======GVBufferParamResolver====== | ||
+ | |||
+ | This element defines the Resolver based GVBuffer fields. | ||
+ | |||
+ | The GVBufferParamResolver Element is used by: [[#ParamResolver|ParamResolver]]. | ||
+ | |||
+ | The following table shows its attributes: | ||
+ | {|class="gvtable" | ||
+ | ! Attribute !! Type !! Description | ||
+ | |- | ||
+ | | type || fixed || This attribute must assume the value '''resolver'''. | ||
+ | |- | ||
+ | | class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.j2ee.db.resolver.GVBufferResolver'''. | ||
+ | |} | ||
+ | |||
+ | Might contain the sub-elements: | ||
+ | * [[Description]] | ||
+ | * [[#GVBufferParam|GVBufferParam]] | ||
+ | |||
+ | ======GVBufferParam====== | ||
+ | |||
+ | This element represents the field of GVBuffer which is inserted in the statement. | ||
+ | |||
+ | The GVBufferParam Element is used by: [[#GVBufferParamResolver|GVBufferParamResolver]]. | ||
+ | The following table shows its attributes: | ||
+ | {|class="gvtable" | ||
+ | ! Attribute !! Type !! Description | ||
+ | |- | ||
+ | | type || required || This attribute defines the type of the parameter. | ||
+ | The attribute's admitted values are: | ||
+ | * string | ||
+ | * int | ||
+ | * long | ||
+ | * float | ||
+ | * date | ||
+ | * binary | ||
+ | * blob | ||
+ | * clob | ||
+ | |- | ||
+ | | position || required || This attribute defines the position parameter has in the statement. | ||
+ | The attribute's value cannot be null. | ||
+ | |- | ||
+ | | format || optional || This attribute lets you configure the date format in the event that has been defined type = 'date'. | ||
+ | The attribute's value cannot be null. | ||
+ | |- | ||
+ | | GVBufferMethod || required || The attribute defines the GVBuffer method that solves the parameter. | ||
+ | The attribute's admitted values are: | ||
+ | * getSystem | ||
+ | * getService | ||
+ | * getId | ||
+ | * getRetCode | ||
+ | * getObject | ||
+ | * getProperty | ||
+ | |- | ||
+ | | propertyName || optional || This attribute defines the name of the property if the method is getProperty(). | ||
+ | |} | ||
+ | |||
− | + | Might contain the sub-elements: | |
− | + | * [[Description]] | |
− | * [[ | ||
− |
Latest revision as of 13:10, 12 November 2012
Contents
Description
The element DBOperations configures an interaction with a database.
GreenVulcano® ESB configuration
DBOperations might contain the following sub-elements:
DataSourceConnection
Use this element if you want to retrieve a DataSource connection. This element represents the class of connection via Data Source for all those clients that use an application server. The following table shows its attributes:
Attribute | Type | Description |
---|---|---|
type | fixed | This attribute must assume the value db-connection |
class | fixed | This attribute must assume the value it.greenvulcano.gvesb.j2ee.db.connections.DataSourceConnection |
jndi-name | required | this attribute defines the DataSource JNDI name |
Might contain the sub-elements:
JDBCConnection
Use this element for retrieving a JDBC connection.
The following table shows its attributes:
Attribute | Type | Description |
---|---|---|
type | fixed | This attribute must assume the value db-connection. |
class | fixed | This attribute must assume the value it.greenvulcano.gvesb.j2ee.db.connections.JDBCDataBaseConnection |
connectionName | required | this attribute defines the name of the connection to be used, must be one of the connections configured on the file GVAdapters.xml |
Statement
The Statement element contains the statement to be evaluated. Those statements might contain placeholders that will be replaced at runtime.
It is used by: DBOperations.
The following table shows its attributes:
Attribute | Type | Description |
---|---|---|
statementType | required | This element represents the type of statement to use.
We recommend using a CallableStatement to process stored procedures. The attribute's admitted values are:
|
Might contain the sub-elements:
StatementValue
StatementValue contains the value of the statement to be performed.
The StatementValue Element is used by: Statement.
ParamResolvers
This element contains the list of Resolver used to resolve the parameters included in the statement.
Resolvers are applied in sequence, following the order of definition, and can be of different types.
The ParamResolvers Element is used by: Statement.
Might contain more sub-elements:
ParamResolver
This element represents the type of a resolver to use for solving the parameters included in the statement.
The ParamResolver Element is used by: ParamResolvers
Might contain the sub-elements:
XPathParamResolver
Defines the type of Resolver based on XPath.
The XPathParamResolver Element is used by: ParamResolver. The following table shows its attributes:
Attribute | Type | Description |
---|---|---|
type | fixed | This attribute must assume the value resolver. |
class | fixed | This attribute must assume the value it.greenvulcano.gvesb.j2ee.db.resolver.XPathResolver. |
Might contain the sub-elements:
Param
This element defines the parameter to be solved according to an XPath expression applied to the GVBuffer body.
The Param Element is used by: XPathParamResolver.
The following table shows its attributes:
Attribute | Type | Description |
---|---|---|
XPath | required | This attribute defines the XPath applied to the body of GVBuffer.
The attribute's value cannot be null. |
position | required | This attribute defines the position parameter has in the statement.
The attribute's value cannot be null. |
type | required | This attribute defines the type of the parameter.
The attribute's admitted values are:
|
format | optional | This attribute lets you configure the date format in the event that has been defined type = 'date'.
The attribute's value cannot be null. |
Might contain the sub-elements:
GVBufferParamResolver
This element defines the Resolver based GVBuffer fields.
The GVBufferParamResolver Element is used by: ParamResolver.
The following table shows its attributes:
Attribute | Type | Description |
---|---|---|
type | fixed | This attribute must assume the value resolver. |
class | fixed | This attribute must assume the value it.greenvulcano.gvesb.j2ee.db.resolver.GVBufferResolver. |
Might contain the sub-elements:
GVBufferParam
This element represents the field of GVBuffer which is inserted in the statement.
The GVBufferParam Element is used by: GVBufferParamResolver. The following table shows its attributes:
Attribute | Type | Description |
---|---|---|
type | required | This attribute defines the type of the parameter.
The attribute's admitted values are:
|
position | required | This attribute defines the position parameter has in the statement.
The attribute's value cannot be null. |
format | optional | This attribute lets you configure the date format in the event that has been defined type = 'date'.
The attribute's value cannot be null. |
GVBufferMethod | required | The attribute defines the GVBuffer method that solves the parameter.
The attribute's admitted values are:
|
propertyName | optional | This attribute defines the name of the property if the method is getProperty(). |
Might contain the sub-elements: