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 TResultProperty

TResultProperty corresponds a <property> tags inside a <resultMap> tag.

The NullValue setNullValue() attribute can be set to any valid value (based on property type). The NullValue setNullValue() attribute is used to specify an outgoing null value replacement. What this means is that when a null value is detected in the result, the corresponding value of the NullValue getNullValue() will be used instead.

The Select setSelect() property is used to describe a relationship between objects and to automatically load complex (i.e. user defined) property types. The value of the Select setSelect() property must be the name of another mapped statement. The value of the database Column setColumn() that is defined in the same property element as this statement attribute will be passed to the related mapped statement as the parameter. The LazyLoad setLayLoad() attribute can be specified with the Select setSelect() .

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

Gets the containing result map ID.

Gets the containing result map ID.

Parameters

$resultMap
TResultMap
containing result map.

Overrides

TComponent::__construct()
public mixed
# getNullValue( )

Returns

mixed
null value replacement.
public
# setNullValue( mixed $value )

Parameters

$value
mixed
null value replacement.
public string
# getProperty( )

Returns

string
name of a property of the result object that will be set to.
public
# setProperty( string $value )

Parameters

$value
string
name of a property of the result object that will be set to.
public string
# getColumn( )

Returns

string
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
name of the column in the result set from which the value will be used to populate the property.
public integer
# getColumnIndex( )

Returns

integer
index of the column in the ResultSet from which the value will be used to populate the object property
public
# setColumnIndex( integer $value )

Parameters

$value
integer
index of the column in the ResultSet from which the value will be used to populate the object property
public string
# getResultMapping( )

Returns

string
ID of another <resultMap> used to fill the property.
public
# setResultMapping( string $value )

Parameters

$value
string
ID of another <resultMap> used to fill the property.
public TResultMap
# getNestedResultMap( )

Returns

TResultMap
nested result map.
public
# setNestedResultMap( TResult $value )

Parameters

$value
TResult
nested result map.
public string
# getType( )

Returns

string
property type of the object property to be set.
public
# setType( string $value )

Parameters

$value
string
property type of the object property 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 string
# getSelect( )

Returns

string
name of another mapped statement
public
# setSelect( string $value )

The select property is used to describe a relationship between objects and to automatically load complex (i.e. user defined) property types.

The select property is used to describe a relationship between objects and to automatically load complex (i.e. user defined) property types.

Parameters

$value
string
name of another mapped statement.
public boolean
# getLazyLoad( )

Returns

boolean
indicate whether or not the select statement's results should be lazy loaded
public
# setLazyLoad( boolean $value )

Parameters

$value
boolean
indicate whether or not the select statement's results should be lazy loaded
public mixed
# getPropertyValue( TSqlMapTypeHandlerRegistry $registry, array $row )

Gets the value for the current property, converts to applicable type if necessary.

Gets the value for the current property, converts to applicable type if necessary.

Parameters

$registry
TSqlMapTypeHandlerRegistry
type handler registry
$row
array
result row

Returns

mixed
property value.
protected mixed
# getTypedValue( TSqlMapTypeHandlerRegistry $registry, mixed $value )

Parameters

$registry
TSqlMapTypeHandlerRegistry
type handler registry
$value
mixed
raw property value

Returns

mixed
property value casted to specific type.
protected TSqlMapTypeHandler
# createTypeHandler( TSqlMapTypeHandlerRegistry $registry )

Create type handler from Type setType() or TypeHandler setTypeHandler.

Create type handler from Type setType() or TypeHandler setTypeHandler.

Parameters

$registry
TSqlMapTypeHandlerRegistry
type handler registry

Returns

TSqlMapTypeHandler
type handler.
protected integer
# getPropertyValueType( )

Determines if the type is an instance of ArrayAccess, TList or an array.

Determines if the type is an instance of ArrayAccess, TList or an array.

Returns

integer
TResultProperty::LIST_TYPE or TResultProperty::ARRAY_TYPE
public boolean
# instanceOfListType( object $target )

Returns true if the result property Type getType() is of TList type or that the actual result object is an instance of TList.

Returns true if the result property Type getType() is of TList type or that the actual result object is an instance of TList.

Parameters

$target
object
result object

Returns

boolean
true if the result object is an instance of TList
public boolean
# instanceOfArrayType( object $target )

Returns true if the result property Type getType() is of ArrayAccess or that the actual result object is an array or implements ArrayAccess

Returns true if the result property Type getType() is of ArrayAccess or that the actual result object is an array or implements ArrayAccess

Parameters

$target
object
result object

Returns

boolean
true if the result object is an instance of ArrayAccess or is an array.
public
# __sleep( )

Returns an array with the names of all variables of that object that should be serialized. Do not call this method. This is a PHP magic method that will be called automatically prior to any serialization.

Returns an array with the names of all variables of that object that should be serialized. Do not call this method. This is a PHP magic method that will be called automatically prior to any serialization.

Overrides

TComponent::__sleep()
Methods inherited from TComponent
__call(), __destruct(), __get(), __isset(), __set(), __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 summary
integer LIST_TYPE 0
#
integer ARRAY_TYPE 1
#
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