The TDiscriminator corresponds to the <discriminator> tag within a <resultMap>.
TDiscriminator allows inheritance logic in SqlMap result mappings. SqlMap compares the data found in the discriminator column to the different <submap> values using the column value's string equivalence. When the string values matches a particular <submap>, SqlMap will use the <resultMap> defined by resultMapping property for loading the object data.
Method Summary |
void
|
|
string
|
|
int
|
|
TResultProperty
|
|
mixed
|
|
TResultMap
|
|
void
|
|
string
|
|
void
|
Set the result maps for particular sub-mapping values.
|
void
|
Copies the discriminator properties to a new TResultProperty.
|
void
|
|
void
|
The columnIndex attribute value is the index of the column in the ResultSet from which the value will be used to populate the object property.
|
void
|
|
string
|
The type attribute is used to explicitly specify the property type of the parameter to be set. If the attribute type is not set and the framework cannot otherwise determine the type, the type is assumed from the default value of the property.
|
void
|
|
Method Details |
addSubMap
public void addSubMap |
(TSubMap $subMap ) |
Input |
TSubMap | $subMap | add new sub mapping. |
Output |
Exception |
|
getColumn
public string getColumn |
() |
Output |
string
| the name of the column in the result set from which the value will be used to populate the property. |
Exception |
|
getColumnIndex
public int getColumnIndex |
() |
Output |
int
| index of the column in the ResultSet |
Exception |
|
getMapping
Output |
TResultProperty
| result property for the discriminator column. |
Exception |
|
getNullValue
public mixed getNullValue |
() |
Output |
mixed
| outgoing null value replacement. |
Exception |
|
getSubMap
Input |
string | $value | database value |
Output |
TResultMap
| result mapping. |
Exception |
|
getType
public void getType |
(string 0 ) |
Input |
string | 0 | property type of the parameter to be set. |
Output |
Exception |
|
getTypeHandler
public string getTypeHandler |
() |
Output |
string
| custom type handler class name (may use namespace). |
Exception |
|
initialize
Set the result maps for particular sub-mapping values.
Input |
TSqlMapManager | $manager | sql map manager instance. |
Output |
Exception |
|
initMapping
Copies the discriminator properties to a new TResultProperty.
Input |
TResultMap | $resultMap | result map holding the discriminator. |
Output |
Exception |
|
setColumn
public void setColumn |
(string $value ) |
Input |
string | $value | the name of the column in the result set from which the value will be used to populate the property. |
Output |
Exception |
|
setColumnIndex
public void setColumnIndex |
(int $value ) |
The columnIndex attribute value is the index of the column in the ResultSet from which the value will be used to populate the object property.
Input |
int | $value | index of the column in the ResultSet |
Output |
Exception |
|
setNullValue
public void setNullValue |
(mixed $value ) |
Input |
mixed | $value | outgoing null value replacement. |
Output |
Exception |
|
setType
public string setType |
(mixed $value ) |
The type attribute is used to explicitly specify the property type of the parameter to be set. If the attribute type is not set and the framework cannot otherwise determine the type, the type is assumed from the default value of the property.
Input |
mixed | $value | |
Output |
string
| property type of the parameter to be set. |
Exception |
|
setTypeHandler
public void setTypeHandler |
(string $value ) |
Input |
string | $value | custom type handler class name (may use namespace). |
Output |
Exception |
|