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).

  • author: Wei Zhuo <weizho[at]gmail[dot]com>
  • version: $Id: TParameterMap.php 2996 2011-06-20 15:24:57Z ctrlaltca@gmail.com $
  • since: 3.1

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

TComponent
   |
   --TParameterMap
Method Summary
TParameterMap __construct ()
void addProperty (TParameterProperty $property)
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)
createTypeHandler (line 161)

Create type handler from Type or TypeHandler.

  • return: type handler.
  • access: protected
TSqlMapTypeHandler createTypeHandler (TParameterProperty $property, TSqlMapTypeHandlerRegistry $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.
  • throws: TSqlMapException if property access is invalid.
  • access: protected
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.
  • throws: TSqlMapException if index is not string nor integer.
  • access: public
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)
insertProperty (line 118)
  • access: public
void insertProperty (int $index, TParameterProperty $property)
  • int $index: parameter property index
  • TParameterProperty $property: new parameter property.
nullifyDefaultValue (line 201)

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)
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::__call()
TComponent::__get()
TComponent::__set()
TComponent::__sleep()
TComponent::__wakeup()

Documentation generated on Mon, 25 Jun 2012 14:38:53 +0200 by phpDocumentor 1.4.3