Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml


Classes:
Keyword

Class TResultProperty

TComponent
   |
   --TResultProperty

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

The NullValue attribute can be set to any valid value (based on property type). The NullValue 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 will be used instead.

The Select 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 property must be the name of another mapped statement. The value of the database Column 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 attribute can be specified with the Select .

Since: 3.1
Author: Wei Zhuo <weizho[at]gmail[dot]com>

Constructor Summary
public
__construct Array
Gets the containing result map ID.

Method Summary
protected  TSqlMapTypeHandler
Create type handler from Type or TypeHandler.
string
int
boolean
TResultMap
mixed
string
mixed
getPropertyValue ( TSqlMapTypeHandlerRegistry $registry, array $row)
Gets the value for the current property, converts to applicable type if necessary.
protected  int
Determines if the type is an instance of ArrayAccess, TList or an array.
string
string
string
getType ()
protected  mixed
getTypedValue ( TSqlMapTypeHandlerRegistry $registry, mixed $value)
string
boolean
instanceOfArrayType ( object result $target)
Returns true if the result property Type is of ArrayAccess
boolean
instanceOfListType ( object result $target)
Returns true if the result property Type is of TList type or that the actual result object is an instance of TList.
void
setColumn ( string $value)
void
setColumnIndex ( int $value)
void
setLazyLoad ( boolean $value)
void
setNestedResultMap ( TResult $value)
void
setNullValue ( mixed $value)
void
setProperty ( string $value)
void
setResultMapping ( mixed $value)
void
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.
void
setType ( string $value)
void
setTypeHandler ( string $value)
Methods Inherited From TComponent
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()

Constant Summary
int ARRAY_TYPE
int LIST_TYPE

Constructor Details

__construct

public __construct Array

Gets the containing result map ID.


Method Details

createTypeHandler

protected TSqlMapTypeHandler createTypeHandler (TSqlMapTypeHandlerRegistry $registry )

Create type handler from Type or TypeHandler.

Input
TSqlMapTypeHandlerRegistry$registrytype handler registry
Output
TSqlMapTypeHandler type handler.
Exception

getColumn

public string getColumn ()

Output
string name of the column in the result set from which the value will be used to populate the property.
Exception

getColumnIndex

public int getColumnIndex ()

Output
int index of the column in the ResultSet from which the value will be used to populate the object property
Exception

getLazyLoad

public boolean getLazyLoad ()

Output
boolean indicate whether or not the select statement's results should be lazy loaded
Exception

getNestedResultMap

public TResultMap getNestedResultMap ()

Output
TResultMap nested result map.
Exception

getNullValue

public mixed getNullValue ()

Output
mixed null value replacement.
Exception

getProperty

public string getProperty ()

Output
string name of a property of the result object that will be set to.
Exception

getPropertyValue

public mixed getPropertyValue (TSqlMapTypeHandlerRegistry $registry , array $row )

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

Input
TSqlMapTypeHandlerRegistry$registrytype handler registry
array$rowresult row
Output
mixed property value.
Exception

getPropertyValueType

protected int getPropertyValueType ()

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

Output
int TResultProperty::LIST_TYPE or TResultProperty::ARRAY_TYPE
Exception

getResultMapping

public string getResultMapping ()

Output
string ID of another <resultMap> used to fill the property.
Exception

getSelect

public string getSelect ()

Output
string name of another mapped statement
Exception

getType

public string getType ()

Output
string property type of the object property to be set.
Exception

getTypedValue

protected mixed getTypedValue (TSqlMapTypeHandlerRegistry $registry , mixed $value )

Input
TSqlMapTypeHandlerRegistry$registrytype handler registry
mixed$valueraw property value
Output
mixed property value casted to specific type.
Exception

getTypeHandler

public string getTypeHandler ()

Output
string custom type handler class name (may use namespace).
Exception

instanceOfArrayType

public boolean instanceOfArrayType (object result $target )

Returns true if the result property Type is of ArrayAccess

or that the actual result object is an array or implements ArrayAccess

Input
object result$targetobject
Output
boolean true if the result object is an instance of ArrayAccess or is an array.
Exception

instanceOfListType

public boolean instanceOfListType (object result $target )

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

Input
object result$targetobject
Output
boolean true if the result object is an instance of TList
Exception

setColumn

public void setColumn (string $value )

Input
string$valuename of the column in the result set from which the value will be used to populate the property.
Output
Exception

setColumnIndex

public void setColumnIndex (int $value )

Input
int$valueindex of the column in the ResultSet from which the value will be used to populate the object property
Output
Exception

setLazyLoad

public void setLazyLoad (boolean $value )

Input
boolean$valueindicate whether or not the select statement's results should be lazy loaded
Output
Exception

setNestedResultMap

public void setNestedResultMap (TResult $value )

Input
TResult$valuenested result map.
Output
Exception

setNullValue

public void setNullValue (mixed $value )

Input
mixed$valuenull value replacement.
Output
Exception

setProperty

public void setProperty (string $value )

Input
string$valuename of a property of the result object that will be set to.
Output
Exception

setResultMapping

public void setResultMapping (mixed $value )

Input
mixed$value
Output
Exception

setSelect

public void 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.

Input
string$valuename of another mapped statement.
Output
Exception

setType

public void setType (string $value )

Input
string$valueproperty type of the object property to be set.
Output
Exception

setTypeHandler

public void setTypeHandler (string $value )

Input
string$valuecustom type handler class name (may use namespace).
Output
Exception


Constant Details

ARRAY_TYPE

Type:

int

Value:

1

LIST_TYPE

Type:

int

Value:

0