- Home
- About
- Testimonials
- Demos
- Download
- Documentation
- Blogs
- Forum
- Support

Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml
Classes:
TDiscriminator
TInlineParameterMapParser
TParameterMap
TParameterProperty
TResultMap
TResultProperty
TSimpleDynamicParser
TSqlMapCacheKey
TSqlMapCacheModel
TSqlMapCacheTypes
TSqlMapDelete
TSqlMapInsert
TSqlMapSelectKey
TSqlMapStatement
TSqlMapUpdate
TSqlMapXmlConfigBuilder
TSqlMapXmlConfiguration
TSqlMapXmlMappingConfiguration
TSubMap

Keyword

# Class TSqlMapXmlMappingConfiguration

    TSqlMapXmlConfigBuilder
       |
       --TSqlMapXmlMappingConfiguration

Loads the statements, result maps, parameters maps from xml configuration.

description

Since: 3.1
Author: Wei Zhuo <weizho[at]gmail[dot]com>

Constructor Summary
public | __construct Array

Method Summary
protected void | applyInlineParameterMap ( TSqlMapStatement $statement, string $sqlStatement, SimpleXmlElement $node) Extract inline parameter maps.
void | configure ( string $filename) Configure an XML mapping.
protected TSqlMapInsert | createInsertStatement ( SimpleXmlElement $node) Create new insert statement from xml node.
protected TParameterMap | createParameterMap ( SimpleXmlElement $node) Create a new parameter map from xml node.
protected TResultMap | createResultMap ( SimpleXmlElement $node) Create a new result map and its associated result properties, disciminiator and sub maps.
protected void | getConfigFile ()
protected void | loadCacheModel ( SimpleXmlElement $node) Load cache models from xml mapping.
protected void | loadDeleteTag ( SimpleXmlElement $node) Load delete statement from xml mapping.
protected void | loadFlushInterval ( TSqlMapCacheModel $cacheModel, SimpleXmlElement $node) Load the flush interval
protected void | loadFlushOnCache ( TSqlMapCacheModel $cacheModel, SimpleXmlElement $parent, SimpleXmlElement $node) Load the flush on cache properties.
protected void | loadInsertTag ( SimpleXmlElement $node) Load insert statement from xml mapping.
protected void | loadParameterMap ( SimpleXmlElement $node) Load parameter map from xml.
protected void | loadProcedureTag ( SimpleXmlElement $node) Load procedure statement from xml mapping.
protected void | loadResultMap ( SimpleXmlElement $node) Load the result maps.
protected void | loadSelectKeyTag ( SimpleXmlElement $insert, mixed $node) Load the selectKey statement from xml mapping.
protected void | loadSelectTag ( SimpleXmlElement $node) Load select statement from xml mapping.
protected void | loadStatementTag ( SimpleXmlElement $node) Load statement mapping from xml configuration file.
protected void | loadUpdateTag ( SimpleXmlElement $node) Load update statement from xml mapping.
protected void | prepareSql ( TSqlMapStatement $statement, string $sqlStatement, SimpleXmlElement $node) Prepare the sql text (may extend to dynamic sql).
protected void | processSqlStatement ( TSqlMapStatement $statement, SimpleXmlElement $node) Load extended SQL statements if application. Replaces global properties in the sql text. Extracts inline parameter maps.
protected void | registerCacheTriggers () Attach CacheModel to statement and register trigger statements for cache models

Methods Inherited From TSqlMapXmlConfigBuilder
TSqlMapXmlConfigBuilder::createObjectFromNode(), TSqlMapXmlConfigBuilder::getAbsoluteFilePath(), TSqlMapXmlConfigBuilder::getElementByIdValue(), TSqlMapXmlConfigBuilder::loadXmlDocument(), TSqlMapXmlConfigBuilder::setObjectPropFromNode()

Constant Summary
string | ESCAPED_INLINE_SYMBOL_REGEXP |
string | ESCAPED_SIMPLE_MARK_REGEXP |
string | INLINE_PLACEHOLDER |
string | INLINE_SYMBOL |
string | SIMPLE_MARK | Regular expressions for escaping simple/inline parameter symbols
string | SIMPLE_PLACEHOLDER |

Constructor Details

## __construct

public __construct | Array

Method Details

## applyInlineParameterMap

protected void applyInlineParameterMap | (TSqlMapStatement $statement , string $sqlStatement , SimpleXmlElement $node )

Extract inline parameter maps.

Input
TSqlMapStatement | $statement | statement object.
string | $sqlStatement | sql text
SimpleXmlElement | $node | statement node.
Output
Exception

## configure

public void configure | (string $filename )

Configure an XML mapping.

Input
string | $filename | xml mapping filename.
Output
Exception

## createInsertStatement

protected TSqlMapInsert createInsertStatement | (SimpleXmlElement $node )

Create new insert statement from xml node.

Input
SimpleXmlElement | $node | insert node.
Output
TSqlMapInsert | insert statement.
Exception

## createParameterMap

protected TParameterMap createParameterMap | (SimpleXmlElement $node )

Create a new parameter map from xml node.

Input
SimpleXmlElement | $node | parameter map node.
Output
TParameterMap | new parameter mapping.
Exception

## createResultMap

protected TResultMap createResultMap | (SimpleXmlElement $node )

Create a new result map and its associated result properties, disciminiator and sub maps.

Input
SimpleXmlElement | $node | result map node
Output
TResultMap | SqlMap result mapping.
Exception

## getConfigFile

protected void getConfigFile | ()

Output
Exception

## loadCacheModel

protected void loadCacheModel | (SimpleXmlElement $node )

Load cache models from xml mapping.

Input
SimpleXmlElement | $node | cache node.
Output
Exception

## loadDeleteTag

protected void loadDeleteTag | (SimpleXmlElement $node )

Load delete statement from xml mapping.

Input
SimpleXmlElement | $node | delete node.
Output
Exception

## loadFlushInterval

protected void loadFlushInterval | (TSqlMapCacheModel $cacheModel , SimpleXmlElement $node )

Load the flush interval

Input
TSqlMapCacheModel | $cacheModel | cache model
SimpleXmlElement | $node | cache node
Output
Exception

## loadFlushOnCache

protected void loadFlushOnCache | (TSqlMapCacheModel $cacheModel , SimpleXmlElement $parent , SimpleXmlElement $node )

Load the flush on cache properties.

Input
TSqlMapCacheModel | $cacheModel | cache model
SimpleXmlElement | $parent | parent node.
SimpleXmlElement | $node | flush node.
Output
Exception

## loadInsertTag

protected void loadInsertTag | (SimpleXmlElement $node )

Load insert statement from xml mapping.

Input
SimpleXmlElement | $node | insert node.
Output
Exception

## loadParameterMap

protected void loadParameterMap | (SimpleXmlElement $node )

Load parameter map from xml.

Input
SimpleXmlElement | $node | parameter map node.
Output
Exception

## loadProcedureTag

protected void loadProcedureTag | (SimpleXmlElement $node )

Load procedure statement from xml mapping.

Input
SimpleXmlElement | $node | procedure node
Output
Exception

## loadResultMap

protected void loadResultMap | (SimpleXmlElement $node )

Load the result maps.

Input
SimpleXmlElement | $node | result map node.
Output
Exception

## loadSelectKeyTag

protected void loadSelectKeyTag | (SimpleXmlElement $insert , mixed $node )

Load the selectKey statement from xml mapping.

Input
SimpleXmlElement | $insert | selectkey node
mixed | $node |
Output
Exception

## loadSelectTag

protected void loadSelectTag | (SimpleXmlElement $node )

Load select statement from xml mapping.

Input
SimpleXmlElement | $node | select node.
Output
Exception

## loadStatementTag

protected void loadStatementTag | (SimpleXmlElement $node )

Load statement mapping from xml configuration file.

Input
SimpleXmlElement | $node | statement node.
Output
Exception

## loadUpdateTag

protected void loadUpdateTag | (SimpleXmlElement $node )

Load update statement from xml mapping.

Input
SimpleXmlElement | $node | update node.
Output
Exception

## prepareSql

protected void prepareSql | (TSqlMapStatement $statement , string $sqlStatement , SimpleXmlElement $node )

Prepare the sql text (may extend to dynamic sql).

Input
TSqlMapStatement | $statement | mapped statement.
string | $sqlStatement | sql text.
SimpleXmlElement | $node | statement node.
Output
Exception

## processSqlStatement

protected void processSqlStatement | (TSqlMapStatement $statement , SimpleXmlElement $node )

Load extended SQL statements if application. Replaces global properties in the sql text. Extracts inline parameter maps.

Input
TSqlMapStatement | $statement | mapped statement.
SimpleXmlElement | $node | statement node.
Output
Exception

## registerCacheTriggers

protected void registerCacheTriggers | ()

Attach CacheModel to statement and register trigger statements for cache models

Output
Exception

Constant Details

### ESCAPED_INLINE_SYMBOL_REGEXP

#### Type:

string

#### Value:

'/\#\#/'

### ESCAPED_SIMPLE_MARK_REGEXP

#### Type:

string

#### Value:

'/\$\$/'

### INLINE_PLACEHOLDER

#### Type:

string

#### Value:

'`!!!`'

### INLINE_SYMBOL

#### Type:

string

#### Value:

'#'

### SIMPLE_MARK

Regular expressions for escaping simple/inline parameter symbols

#### Type:

string

#### Value:

'$'

### SIMPLE_PLACEHOLDER

#### Type:

string

#### Value:

'`!!`'