## Class TParameterMap

Description

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
- version: $Id: TParameterMap.php 1579 2006-12-20 03:15:04Z wei $
- author: Wei Zhuo <weizho[at]gmail[dot]com>

Located in /Data/SqlMap/Configuration/TParameterMap.php (line 33)

    TComponent
       |
       --TParameterMap

Method Summary
TParameterMap __construct ()
void addProperty (TParameterProperty $property)
TSqlMapTypeHandler createTypeHandler (TParameterProperty $property, TSqlMapTypeHandlerRegistry $registry)
string getExtends ()
string getID ()
mixed getObjectValue (mixed $object, TParameterProperty $property)
TParameterProperty[] getProperties ()
TParameterProperty getProperty (string $index)
array getPropertyNames ()
unknown getPropertyValue (TSqlMapTypeHandlerRegistry $registry, TParameterProperty $property, mixed $parameterValue)
void insertProperty (int $index, TParameterProperty $property)
mixed nullifyDefaultValue (TParameterProperty $property, mixed $value)
void setExtends (string $value)
void setID (string $value)
Methods
Constructor __construct (line 44)

Initialize the properties and property map collections.

- access: public

TParameterMap __construct ()
addProperty (line 108)

- access: public

void addProperty (TParameterProperty $property)

- TParameterProperty $property: new parameter property

createTypeHandler (line 161)

Create type handler from Type or TypeHandler.

- return: type handler.
- access: protected

TSqlMapTypeHandler createTypeHandler (TParameterProperty $property, TSqlMapTypeHandlerRegistry $registry)

- TParameterProperty $property: parameter property
- TSqlMapTypeHandlerRegistry $registry: type handler registry

getExtends (line 77)

- return: name of another <parameterMap> upon which to base this TParameterMap.
- access: public

string getExtends ()
getID (line 53)

- return: a unique identifier for the <parameterMap>.
- access: public

string getID ()
getObjectValue (line 177)

- return: property value.
- access: protected
- throws: TSqlMapException if property access is invalid.

mixed getObjectValue (mixed $object, TParameterProperty $property)

- mixed $object: object to obtain the property from.
- TParameterProperty $property: parameter property.

getProperties (line 69)

- return: list of properties for the parameter map.
- access: public

TParameterProperty[] getProperties ()
getProperty (line 95)

- return: parameter property.
- access: public
- throws: TSqlMapException if index is not string nor integer.

TParameterProperty getProperty (string $index)

- string $index: name of a parameter property.

getPropertyNames (line 127)

- return: list of property names.
- access: public

array getPropertyNames ()
getPropertyValue (line 139)

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

- access: public

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

- TSqlMapTypeHandlerRegistry $registry: type handler registry.
- TParameterProperty $property: parameter proproperty.
- mixed $parameterValue: parameter object to get the value from.

insertProperty (line 118)

- access: public

void insertProperty (int $index, TParameterProperty $property)

- int $index: parameter property index
- TParameterProperty $property: new parameter property.

nullifyDefaultValue (line 198)

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

- return: null if NullValue matches currrent value.
- access: protected

mixed nullifyDefaultValue (TParameterProperty $property, mixed $value)

- TParameterProperty $property: parameter property.
- mixed $value: current property value

setExtends (line 85)

- access: public

void setExtends (string $value)

- string $value: name of another <parameterMap> upon which to base this TParameterMap.

setID (line 61)

- access: public

void setID (string $value)

- string $value: a unique identifier for the <parameterMap>.

#### Inherited 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()

Documentation generated on Sun, 30 Sep 2007 19:16:58 -0400 by phpDocumentor 1.3.0RC4