PHP Class Prado\Data\SqlMap\Configuration\TDiscriminator

TDiscriminator allows inheritance logic in SqlMap result mappings. SqlMap compares the data found in the discriminator column to the different values using the column value's string equivalence. When the string values matches a particular , SqlMap will use the defined by {@link resultMapping TSubMap::setResultMapping()} property for loading the object data.
Since: 3.1
Inheritance: extends Prado\TComponent
Show file Open project: pradosoft/prado

Public Methods

Method Description
addSubMap ( $subMap )
getColumn ( ) : string
getColumnIndex ( ) : integer
getMapping ( ) : TResultProperty
getNullValue ( ) : mixed
getSubMap ( $value ) : TResultMap
getType ( )
getTypeHandler ( ) : string
initMapping ( $resultMap ) Copies the discriminator properties to a new TResultProperty.
initialize ( $manager ) Set the result maps for particular sub-mapping values.
setColumn ( $value )
setColumnIndex ( $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.
setNullValue ( $value )
setType ( $value ) : 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.
setTypeHandler ( $value )

Method Details

addSubMap() public method

public addSubMap ( $subMap )

getColumn() public method

public getColumn ( ) : string
return string the name of the column in the result set from which the value will be used to populate the property.

getColumnIndex() public method

public getColumnIndex ( ) : integer
return integer index of the column in the ResultSet

getMapping() public method

public getMapping ( ) : TResultProperty
return TResultProperty result property for the discriminator column.

getNullValue() public method

public getNullValue ( ) : mixed
return mixed outgoing null value replacement.

getSubMap() public method

public getSubMap ( $value ) : TResultMap
return TResultMap result mapping.

getType() public method

public getType ( )

getTypeHandler() public method

public getTypeHandler ( ) : string
return string custom type handler class name (may use namespace).

initMapping() public method

Copies the discriminator properties to a new TResultProperty.
public initMapping ( $resultMap )

initialize() public method

Set the result maps for particular sub-mapping values.
public initialize ( $manager )

setColumn() public method

public setColumn ( $value )

setColumnIndex() public method

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.
public setColumnIndex ( $value )

setNullValue() public method

public setNullValue ( $value )

setType() public method

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.
public setType ( $value ) : string
return string property type of the parameter to be set.

setTypeHandler() public method

public setTypeHandler ( $value )