diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2015-01-20 22:02:33 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2015-01-20 22:02:33 +0100 |
commit | 90b5141367db5fcac9ba72042278556612b5dc3f (patch) | |
tree | 369112fd85eab39d36f4726f4f763828e6c560a4 /framework/Data/SqlMap/Configuration/TSubMap.php | |
parent | f6c4b70070a8e4378a37f750d53920e44bcc5857 (diff) |
One class per file: framework/Data
Diffstat (limited to 'framework/Data/SqlMap/Configuration/TSubMap.php')
-rw-r--r-- | framework/Data/SqlMap/Configuration/TSubMap.php | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/framework/Data/SqlMap/Configuration/TSubMap.php b/framework/Data/SqlMap/Configuration/TSubMap.php new file mode 100644 index 00000000..0a2e7614 --- /dev/null +++ b/framework/Data/SqlMap/Configuration/TSubMap.php @@ -0,0 +1,61 @@ +<?php +/** + * TDiscriminator and TSubMap classes file. + * + * @author Wei Zhuo <weizhuo[at]gmail[dot]com> + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2014 PradoSoft + * @license http://www.pradosoft.com/license/ + * @package System.Data.SqlMap.Configuration + */ + +/** + * TSubMap class defines a submapping value and the corresponding <resultMap> + * + * The {@link Value setValue()} property is used for comparison with the + * discriminator column value. When the {@link Value setValue()} matches + * that of the discriminator column value, the corresponding {@link ResultMapping setResultMapping} + * is used inplace of the current result map. + * + * @author Wei Zhuo <weizho[at]gmail[dot]com> + * @package System.Data.SqlMap.Configuration + * @since 3.1 + */ +class TSubMap extends TComponent +{ + private $_value; + private $_resultMapping; + + /** + * @return string value for comparison with discriminator column value. + */ + public function getValue() + { + return $this->_value; + } + + /** + * @param string value for comparison with discriminator column value. + */ + public function setValue($value) + { + $this->_value = $value; + } + + /** + * The result map to use when the Value matches the discriminator column value. + * @return string ID of a result map + */ + public function getResultMapping() + { + return $this->_resultMapping; + } + + /** + * @param string ID of a result map + */ + public function setResultMapping($value) + { + $this->_resultMapping = $value; + } +}
\ No newline at end of file |