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

TComponent
Extended by TParameterMap
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/TParameterMap.php
Methods summary
public
# __construct( )

Initialize the properties and property map collections.

Initialize the properties and property map collections.

Overrides

TComponent::__construct()
public string
# getID( )

Returns

string
a unique identifier for the <parameterMap>.
public
# setID( string $value )

Parameters

$value
string
a unique identifier for the <parameterMap>.
public TParameterProperty[]
# getProperties( )

Returns

TParameterProperty[]
list of properties for the parameter map.
public string
# getExtends( )

Returns

string
name of another <parameterMap> upon which to base this TParameterMap.
public
# setExtends( string $value )

Parameters

$value
string
name of another <parameterMap> upon which to base this TParameterMap.
public TParameterProperty
# getProperty( string $index )

Parameters

$index
string
name of a parameter property.

Returns

TParameterProperty
parameter property.

Throws

TSqlMapException
if index is not string nor integer.
public
# addProperty( TParameterProperty $property )

Parameters

$property
TParameterProperty
new parameter property
public
# insertProperty( integer $index, TParameterProperty $property )

Parameters

$index
integer
parameter property index
$property
TParameterProperty
new parameter property.
public array
# getPropertyNames( )

Returns

array
list of property names.
public unknown
# getPropertyValue( TSqlMapTypeHandlerRegistry $registry, TParameterProperty $property, mixed $parameterValue )

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

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

Parameters

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

Returns

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

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

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

Parameters

$property
TParameterProperty
parameter property
$registry
TSqlMapTypeHandlerRegistry
type handler registry

Returns

TSqlMapTypeHandler
type handler.
protected mixed
# getObjectValue( mixed $object, TParameterProperty $property )

Parameters

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

Returns

mixed
property value.

Throws

TSqlMapException
if property access is invalid.
protected mixed
# nullifyDefaultValue( TParameterProperty $property, mixed $value )

When the actual value matches the NullValue TParameterProperty::setNullValue(), set the current value to null.

When the actual value matches the NullValue TParameterProperty::setNullValue(), set the current value to null.

Parameters

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

Returns

mixed
null if NullValue matches currrent value.
Methods inherited from TComponent
__call(), __destruct(), __get(), __isset(), __set(), __sleep(), __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 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