|
Class TDiscriminator
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 TSubMap::setResultMapping()
property for loading the object data.
-
TComponent
-
TDiscriminator
Methods summary
public
string
|
#
getColumn( )
Returns
string the name of the column in the result set from which the value will be used to
populate the property.
|
public
|
#
setColumn( string $value )
Parameters
- $value
string the name of the column in the result set from which the value will be used to
populate the property.
|
public
|
|
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.
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.
Returns
string property type of the parameter to be set.
|
public
string
|
#
getTypeHandler( )
Returns
string custom type handler class name (may use namespace).
|
public
|
#
setTypeHandler( string $value )
Parameters
- $value
string custom type handler class name (may use namespace).
|
public
integer
|
#
getColumnIndex( )
Returns
integer index of the column in the ResultSet
|
public
|
#
setColumnIndex( integer $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.
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.
Parameters
- $value
integer index of the column in the ResultSet
|
public
mixed
|
#
getNullValue( )
Returns
mixed outgoing null value replacement.
|
public
|
#
setNullValue( mixed $value )
Parameters
- $value
mixed outgoing null value replacement.
|
public
TResultProperty
|
|
public
|
#
addSubMap( TSubMap $subMap )
Parameters
- $subMap
TSubMap
add new sub mapping.
|
public
TResultMap
|
#
getSubMap( string $value )
Parameters
- $value
string database value
Returns
|
public
|
#
initMapping( TResultMap $resultMap )
Copies the discriminator properties to a new TResultProperty.
Copies the discriminator properties to a new TResultProperty.
Parameters
- $resultMap
TResultMap
result map holding the discriminator.
|
public
|
#
initialize( TSqlMapManager $manager )
Set the result maps for particular sub-mapping values.
Set the result maps for particular sub-mapping values.
Parameters
|
Methods inherited from TComponent
__call(),
__construct(),
__destruct(),
__get(),
__isset(),
__set(),
__sleep(),
__unset(),
__wakeup(),
addParsedObject(),
asa(),
attachBehavior(),
attachBehaviors(),
attachClassBehavior(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
clearBehaviors(),
createdOnTemplate(),
detachBehavior(),
detachBehaviors(),
detachClassBehavior(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
evaluateStatements(),
fxAttachClassBehavior(),
fxDetachClassBehavior(),
getAutoGlobalListen(),
getBehaviorsEnabled(),
getClassHierarchy(),
getEventHandlers(),
getListeningToGlobalEvents(),
getSubProperty(),
hasEvent(),
hasEventHandler(),
hasProperty(),
isa(),
listen(),
raiseEvent(),
setSubProperty(),
unlisten()
|
|