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 TResultMap

TResultMap corresponds to <resultMap> mapping tag.

A TResultMap lets you control how data is extracted from the result of a query, and how the columns are mapped to object properties. A TResultMap can describe the column type, a null value replacement, and complex property mappings including Collections.

The <resultMap> can contain any number of property mappings that map object properties to the columns of a result element. The property mappings are applied, and the columns are read, in the order that they are defined. Maintaining the element order ensures consistent results between different drivers and providers.

The Class setClass() property must be a PHP class object or array instance.

The optional Extends setExtends() attribute can be set to the ID of another <resultMap> upon which to base this <resultMap>. All properties of the "parent" <resultMap> will be included as part of this <resultMap>, and values from the "parent" <resultMap> are set before any values specified by this <resultMap>.

TComponent
Extended by TResultMap
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/TResultMap.php
Methods summary
public
# __construct( )

Initialize the columns collection.

Initialize the columns collection.

Overrides

TComponent::__construct()
public string
# getID( )

Returns

string
a unique identifier for the <resultMap>.
public
# setID( string $value )

Parameters

$value
string
a unique identifier for the <resultMap>.
public string
# getClass( )

Returns

string
result class name.
public
# setClass( string $value )

Parameters

$value
string
result class name.
public TMap
# getColumns( )

Returns

TMap
result columns.
public string
# getExtends( )

Returns

string
result map extends another result map.
public
# setExtends( string $value )

Parameters

$value
string
result map extends another result map.
public string
# getGroupBy( )

Returns

string
result map groups by.
public
# setGroupBy( string $value )

Parameters

$value
string
result map group by
public TDiscriminator
# getDiscriminator( )

Returns

TDiscriminator
result class discriminator.
public
# setDiscriminator( TDiscriminator $value )

Parameters

$value
TDiscriminator
result class discriminator.
public
# addResultProperty( TResultProperty $property )

Add a TResultProperty to result mapping.

Add a TResultProperty to result mapping.

Parameters

$property
TResultProperty
result property.
public mixed
# createInstanceOfResult( TSqlMapTypeHandlerRegistry $registry )

Create a new instance of the class of this result map.

Create a new instance of the class of this result map.

Parameters

$registry
TSqlMapTypeHandlerRegistry
type handler registry.

Returns

mixed
new result object.

Throws

TSqlMapException
public TResultMap
# resolveSubMap( TSqlMapTypeHandlerRegistry $registry, array $row )

Result sub-mappings using the discriminiator column.

Result sub-mappings using the discriminiator column.

Parameters

$registry
TSqlMapTypeHandlerRegistry
type handler registry
$row
array
row data.

Returns

TResultMap
result sub-map.
Methods inherited from TComponent
__call(), __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