PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

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
Extended by TDiscriminator
Package: System\Data\SqlMap\Configuration
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Wei Zhuo <weizho[at]gmail[dot]com>
Since: 3.1
Located at Data/SqlMap/Configuration/TDiscriminator.php
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
# getType( )
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
# getMapping( )

Returns

TResultProperty
result property for the discriminator column.
public
# addSubMap( TSubMap $subMap )

Parameters

$subMap
TSubMap
add new sub mapping.
public TResultMap
# getSubMap( string $value )

Parameters

$value
string
database value

Returns

TResultMap
result mapping.
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

$manager
TSqlMapManager
sql map manager instance.
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()
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO