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 TParameterMap

TComponent
   |
   --TParameterMap

TParameterMap corresponds to the <parameterMap> element.

TParameterMap holds one or more parameter child elements that map object properties to placeholders in a SQL statement.

A TParameterMap defines an ordered list of values that match up with the placeholders of a parameterized query statement. While the attributes specified by the map still need to be in the correct order, each parameter is named. You can populate the underlying class in any order, and the TParameterMap ensures each value is passed in the correct order.

Parameter Maps can be provided as an external element and inline. The <parameterMap> element accepts two attributes: id (required) and extends (optional).

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

Constructor Summary
public
Initialize the properties and property map collections.

Method Summary
void
addProperty ( TParameterProperty $property)
protected  TSqlMapTypeHandler
Create type handler from Type or TypeHandler.
string
string
getID ()
protected  mixed
getObjectValue ( mixed $object, TParameterProperty $property)
TParameterProperty[]
TParameterProperty
getProperty ( string $index)
array
unknown
getPropertyValue ( TSqlMapTypeHandlerRegistry $registry, TParameterProperty $property, mixed $parameterValue)
Get the value of a property from the the parameter object.
void
insertProperty ( int $index, TParameterProperty $property)
protected  mixed
nullifyDefaultValue ( TParameterProperty $property, mixed $value)
When the actual value matches the NullValue, set the current value to null.
void
setExtends ( string $value)
void
setID ( 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()

Constructor Details

__construct

public __construct

Initialize the properties and property map collections.


Method Details

addProperty

public void addProperty (TParameterProperty $property )

Input
TParameterProperty$propertynew parameter property
Output
Exception

createTypeHandler

protected TSqlMapTypeHandler createTypeHandler (TParameterProperty $property , TSqlMapTypeHandlerRegistry $registry )

Create type handler from Type or TypeHandler.

Input
TParameterProperty$propertyparameter property
TSqlMapTypeHandlerRegistry$registrytype handler registry
Output
TSqlMapTypeHandler type handler.
Exception

getExtends

public string getExtends ()

Output
string name of another <parameterMap> upon which to base this TParameterMap.
Exception

getID

public string getID ()

Output
string a unique identifier for the <parameterMap>.
Exception

getObjectValue

protected mixed getObjectValue (mixed $object , TParameterProperty $property )

Input
mixed$objectobject to obtain the property from.
TParameterProperty$propertyparameter property.
Output
mixed property value.
Exception
throwsTSqlMapException if property access is invalid.

getProperties

public TParameterProperty[] getProperties ()

Output
TParameterProperty[] list of properties for the parameter map.
Exception

getProperty

public TParameterProperty getProperty (string $index )

Input
string$indexname of a parameter property.
Output
TParameterProperty parameter property.
Exception
throwsTSqlMapException if index is not string nor integer.

getPropertyNames

public array getPropertyNames ()

Output
array list of property names.
Exception

getPropertyValue

public unknown getPropertyValue (TSqlMapTypeHandlerRegistry $registry , TParameterProperty $property , mixed $parameterValue )

Get the value of a property from the the parameter object.

Input
TSqlMapTypeHandlerRegistry$registrytype handler registry.
TParameterProperty$propertyparameter proproperty.
mixed$parameterValueparameter object to get the value from.
Output
Exception

insertProperty

public void insertProperty (int $index , TParameterProperty $property )

Input
int$indexparameter property index
TParameterProperty$propertynew parameter property.
Output
Exception

nullifyDefaultValue

protected mixed nullifyDefaultValue (TParameterProperty $property , mixed $value )

When the actual value matches the NullValue, set the current value to null.

Input
TParameterProperty$propertyparameter property.
mixed$valuecurrent property value
Output
mixed null if NullValue matches currrent value.
Exception

setExtends

public void setExtends (string $value )

Input
string$valuename of another <parameterMap> upon which to base this TParameterMap.
Output
Exception

setID

public void setID (string $value )

Input
string$valuea unique identifier for the <parameterMap>.
Output
Exception