## Class TSqlMapXmlMappingConfiguration

Description

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

description

- since: 3.1
- version: $Id: TSqlMapXmlConfiguration.php 2757 2010-01-15 14:47:40Z Christophe.Boulain $
- author: Wei Zhuo <weizho[at]gmail[dot]com>

Located in /Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php (line 308)

    TSqlMapXmlConfigBuilder
       |
       --TSqlMapXmlMappingConfiguration

Class Constant Summary
ESCAPED_INLINE_SYMBOL_REGEXP = '/\#\#/'
ESCAPED_SIMPLE_MARK_REGEXP = '/\$\$/'
INLINE_PLACEHOLDER = '`!!!`'
INLINE_SYMBOL = '#'
SIMPLE_MARK = '$'
SIMPLE_PLACEHOLDER = '`!!`'
Method Summary
TSqlMapXmlMappingConfiguration __construct (TSqlMapXmlConfiguration $xmlConfig)
void applyInlineParameterMap (TSqlMapStatement $statement, string $sqlStatement, SimpleXmlElement $node)
void configure (string $filename)
TSqlMapInsert createInsertStatement (SimpleXmlElement $node)
TParameterMap createParameterMap (SimpleXmlElement $node)
TResultMap createResultMap (SimpleXmlElement $node)
void getConfigFile ()
void loadCacheModel (SimpleXmlElement $node)
void loadDeleteTag (SimpleXmlElement $node)
void loadFlushInterval (TSqlMapCacheModel $cacheModel, SimpleXmlElement $node)
void loadFlushOnCache (TSqlMapCacheModel $cacheModel, SimpleXmlElement $parent, SimpleXmlElement $node)
void loadInsertTag (SimpleXmlElement $node)
void loadParameterMap (SimpleXmlElement $node)
void loadProcedureTag (SimpleXmlElement $node)
void loadResultMap (SimpleXmlElement $node)
void loadSelectKeyTag (SimpleXmlElement $insert, mixed $node)
void loadSelectTag (SimpleXmlElement $node)
void loadStatementTag (SimpleXmlElement $node)
void loadUpdateTag (SimpleXmlElement $node)
void prepareSql (TSqlMapStatement $statement, string $sqlStatement, SimpleXmlElement $node)
void processSqlStatement (TSqlMapStatement $statement, SimpleXmlElement $node)
void registerCacheTriggers ()
Methods
Constructor __construct (line 331)

- access: public

TSqlMapXmlMappingConfiguration __construct (TSqlMapXmlConfiguration $xmlConfig)

- TSqlMapXmlConfiguration $xmlConfig: parent xml configuration.

applyInlineParameterMap (line 555)

Extract inline parameter maps.

- access: protected

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

- TSqlMapStatement $statement: statement object.
- string $sqlStatement: sql text
- SimpleXmlElement $node: statement node.

configure (line 346)

Configure an XML mapping.

- access: public

void configure (string $filename)

- string $filename: xml mapping filename.

createInsertStatement (line 639)

Create new insert statement from xml node.

- return: insert statement.
- access: protected

TSqlMapInsert createInsertStatement (SimpleXmlElement $node)

- SimpleXmlElement $node: insert node.

createParameterMap (line 500)

Create a new parameter map from xml node.

- return: new parameter mapping.
- access: protected

TParameterMap createParameterMap (SimpleXmlElement $node)

- SimpleXmlElement $node: parameter map node.

createResultMap (line 428)

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

- return: SqlMap result mapping.
- access: protected

TResultMap createResultMap (SimpleXmlElement $node)

- SimpleXmlElement $node: result map node

getConfigFile (line 337)

- access: protected

void getConfigFile ()

Redefinition of:

TSqlMapXmlConfigBuilder::getConfigFile()

loadCacheModel (line 704)

Load cache models from xml mapping.

- access: protected

void loadCacheModel (SimpleXmlElement $node)

- SimpleXmlElement $node: cache node.

loadDeleteTag (line 681)

Load delete statement from xml mapping.

- access: protected

void loadDeleteTag (SimpleXmlElement $node)

- SimpleXmlElement $node: delete node.

loadFlushInterval (line 742)

Load the flush interval

- access: protected

void loadFlushInterval (TSqlMapCacheModel $cacheModel, SimpleXmlElement $node)

- TSqlMapCacheModel $cacheModel: cache model
- SimpleXmlElement $node: cache node

loadFlushOnCache (line 777)

Load the flush on cache properties.

- access: protected

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

- TSqlMapCacheModel $cacheModel: cache model
- SimpleXmlElement $parent: parent node.
- SimpleXmlElement $node: flush node.

loadInsertTag (line 626)

Load insert statement from xml mapping.

- access: protected

void loadInsertTag (SimpleXmlElement $node)

- SimpleXmlElement $node: insert node.

loadParameterMap (line 471)

Load parameter map from xml.

- access: protected

void loadParameterMap (SimpleXmlElement $node)

- SimpleXmlElement $node: parameter map node.

loadProcedureTag (line 695)

Load procedure statement from xml mapping.

- access: protected
- todo: Implement loading procedure

void loadProcedureTag (SimpleXmlElement $node)

- SimpleXmlElement $node: procedure node

loadResultMap (line 395)

Load the result maps.

- access: protected

void loadResultMap (SimpleXmlElement $node)

- SimpleXmlElement $node: result map node.

loadSelectKeyTag (line 652)

Load the selectKey statement from xml mapping.

- access: protected

void loadSelectKeyTag (SimpleXmlElement $insert, mixed $node)

- SimpleXmlElement $insert: selectkey node

loadSelectTag (line 610)

Load select statement from xml mapping.

- access: protected

void loadSelectTag (SimpleXmlElement $node)

- SimpleXmlElement $node: select node.

loadStatementTag (line 517)

Load statement mapping from xml configuration file.

- access: protected

void loadStatementTag (SimpleXmlElement $node)

- SimpleXmlElement $node: statement node.

loadUpdateTag (line 668)

Load update statement from xml mapping.

- access: protected

void loadUpdateTag (SimpleXmlElement $node)

- SimpleXmlElement $node: update node.

prepareSql (line 589)

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

- access: protected
- todo: Extend to dynamic sql.

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

- TSqlMapStatement $statement: mapped statement.
- string $sqlStatement: sql text.
- SimpleXmlElement $node: statement node.

processSqlStatement (line 532)

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

- access: protected

void processSqlStatement (TSqlMapStatement $statement, SimpleXmlElement $node)

- TSqlMapStatement $statement: mapped statement.
- SimpleXmlElement $node: statement node.

registerCacheTriggers (line 792)

Attach CacheModel to statement and register trigger statements for cache models

- access: protected

void registerCacheTriggers ()

#### Inherited Methods

Inherited From TSqlMapXmlConfigBuilder

> TSqlMapXmlConfigBuilder::createObjectFromNode()
> TSqlMapXmlConfigBuilder::getAbsoluteFilePath()
> TSqlMapXmlConfigBuilder::getConfigFile()
> TSqlMapXmlConfigBuilder::getElementByIdValue()
> TSqlMapXmlConfigBuilder::loadXmlDocument()
> TSqlMapXmlConfigBuilder::setObjectPropFromNode()

Class Constants
ESCAPED_INLINE_SYMBOL_REGEXP = '/\#\#/' (line 324)
ESCAPED_SIMPLE_MARK_REGEXP = '/\$\$/' (line 323)
INLINE_PLACEHOLDER = '`!!!`' (line 326)
INLINE_SYMBOL = '#' (line 322)
SIMPLE_MARK = '$' (line 321)

Regular expressions for escaping simple/inline parameter symbols

SIMPLE_PLACEHOLDER = '`!!`' (line 325)

Documentation generated on Mon, 22 Feb 2010 12:18:44 +0000 by phpDocumentor 1.3.0RC4