Statement

From GreenVulcano Wiki
Revision as of 09:52, 4 April 2012 by Anonymous (talk) (XPathParamResolver)
Jump to: navigation, search

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 Statement element has the following parameters:

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 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 body of GVBuffer.

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:

  • 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: