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:
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
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
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$statementstatement object.
string$sqlStatementsql text
SimpleXmlElement$nodestatement node.
Output
Exception

configure

public void configure (string $filename )

Configure an XML mapping.

Input
string$filenamexml mapping filename.
Output
Exception

createInsertStatement

protected TSqlMapInsert createInsertStatement (SimpleXmlElement $node )

Create new insert statement from xml node.

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

createParameterMap

protected TParameterMap createParameterMap (SimpleXmlElement $node )

Create a new parameter map from xml node.

Input
SimpleXmlElement$nodeparameter 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$noderesult 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$nodecache node.
Output
Exception

loadDeleteTag

protected void loadDeleteTag (SimpleXmlElement $node )

Load delete statement from xml mapping.

Input
SimpleXmlElement$nodedelete node.
Output
Exception

loadFlushInterval

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

Load the flush interval

Input
TSqlMapCacheModel$cacheModelcache model
SimpleXmlElement$nodecache node
Output
Exception

loadFlushOnCache

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

Load the flush on cache properties.

Input
TSqlMapCacheModel$cacheModelcache model
SimpleXmlElement$parentparent node.
SimpleXmlElement$nodeflush node.
Output
Exception

loadInsertTag

protected void loadInsertTag (SimpleXmlElement $node )

Load insert statement from xml mapping.

Input
SimpleXmlElement$nodeinsert node.
Output
Exception

loadParameterMap

protected void loadParameterMap (SimpleXmlElement $node )

Load parameter map from xml.

Input
SimpleXmlElement$nodeparameter map node.
Output
Exception

loadProcedureTag

protected void loadProcedureTag (SimpleXmlElement $node )

Load procedure statement from xml mapping.

Input
SimpleXmlElement$nodeprocedure node
Output
Exception

loadResultMap

protected void loadResultMap (SimpleXmlElement $node )

Load the result maps.

Input
SimpleXmlElement$noderesult map node.
Output
Exception

loadSelectKeyTag

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

Load the selectKey statement from xml mapping.

Input
SimpleXmlElement$insertselectkey node
mixed$node
Output
Exception

loadSelectTag

protected void loadSelectTag (SimpleXmlElement $node )

Load select statement from xml mapping.

Input
SimpleXmlElement$nodeselect node.
Output
Exception

loadStatementTag

protected void loadStatementTag (SimpleXmlElement $node )

Load statement mapping from xml configuration file.

Input
SimpleXmlElement$nodestatement node.
Output
Exception

loadUpdateTag

protected void loadUpdateTag (SimpleXmlElement $node )

Load update statement from xml mapping.

Input
SimpleXmlElement$nodeupdate node.
Output
Exception

prepareSql

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

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

Input
TSqlMapStatement$statementmapped statement.
string$sqlStatementsql text.
SimpleXmlElement$nodestatement 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$statementmapped statement.
SimpleXmlElement$nodestatement 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:

'`!!`'