Class TSqlMapXmlMappingConfiguration

Description

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

description

  • since: 3.1
  • version: $Id: TSqlMapXmlConfiguration.php 2541 2008-10-21 15:05:13Z qiang.xue $
  • author: Wei Zhuo <weizho[at]gmail[dot]com>

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

TSqlMapXmlConfigBuilder
   |
   --TSqlMapXmlMappingConfiguration
Class Constant Summary
Method Summary
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 ()
TSqlMapXmlMappingConfiguration __construct (TSqlMapXmlConfiguration $xmlConfig)
void loadCacheModel (SimpleXmlElement $node)
void loadDeleteTag (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)
Methods
applyInlineParameterMap (line 540)

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 340)

Configure an XML mapping.

  • access: public
void configure (string $filename)
  • string $filename: xml mapping filename.
createInsertStatement (line 624)

Create new insert statement from xml node.

  • return: insert statement.
  • access: protected
TSqlMapInsert createInsertStatement (SimpleXmlElement $node)
  • SimpleXmlElement $node: insert node.
createParameterMap (line 485)

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 413)

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 331)
  • access: protected
void getConfigFile ()

Redefinition of:
TSqlMapXmlConfigBuilder::getConfigFile()
Constructor __construct (line 325)
  • access: public
TSqlMapXmlMappingConfiguration __construct (TSqlMapXmlConfiguration $xmlConfig)
loadCacheModel (line 689)

Load cache models from xml mapping.

  • access: protected
void loadCacheModel (SimpleXmlElement $node)
  • SimpleXmlElement $node: cache node.
loadDeleteTag (line 666)

Load delete statement from xml mapping.

  • access: protected
void loadDeleteTag (SimpleXmlElement $node)
  • SimpleXmlElement $node: delete node.
loadFlushOnCache (line 712)

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 611)

Load insert statement from xml mapping.

  • access: protected
void loadInsertTag (SimpleXmlElement $node)
  • SimpleXmlElement $node: insert node.
loadParameterMap (line 456)

Load parameter map from xml.

  • access: protected
void loadParameterMap (SimpleXmlElement $node)
  • SimpleXmlElement $node: parameter map node.
loadProcedureTag (line 680)

Load procedure statement from xml mapping.

  • access: protected
  • todo: Implement loading procedure
void loadProcedureTag (SimpleXmlElement $node)
  • SimpleXmlElement $node: procedure node
loadResultMap (line 380)

Load the result maps.

  • access: protected
void loadResultMap (SimpleXmlElement $node)
  • SimpleXmlElement $node: result map node.
loadSelectKeyTag (line 637)

Load the selectKey statement from xml mapping.

  • access: protected
void loadSelectKeyTag (SimpleXmlElement $insert, mixed $node)
  • SimpleXmlElement $insert: selectkey node
loadSelectTag (line 595)

Load select statement from xml mapping.

  • access: protected
void loadSelectTag (SimpleXmlElement $node)
  • SimpleXmlElement $node: select node.
loadStatementTag (line 502)

Load statement mapping from xml configuration file.

  • access: protected
void loadStatementTag (SimpleXmlElement $node)
  • SimpleXmlElement $node: statement node.
loadUpdateTag (line 653)

Load update statement from xml mapping.

  • access: protected
void loadUpdateTag (SimpleXmlElement $node)
  • SimpleXmlElement $node: update node.
prepareSql (line 574)

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 517)

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 727)

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 318)
ESCAPED_SIMPLE_MARK_REGEXP = '/\$\$/' (line 317)
INLINE_PLACEHOLDER = '`!!!`' (line 320)
INLINE_SYMBOL = '#' (line 316)
SIMPLE_MARK = '$' (line 315)

Regular expressions for escaping simple/inline parameter symbols

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

Documentation generated on Sun, 11 Jan 2009 20:23:57 -0500 by phpDocumentor 1.3.0RC4