## Class TSqlMapStatement

Description

TSqlMapStatement class corresponds to <statement> element.

Mapped Statements can hold any SQL statement and can use Parameter Maps and Result Maps for input and output.

The <statement> element is a general "catch all" element that can be used for any type of SQL statement. Generally it is a good idea to use one of the more specific statement-type elements. The more specific elements provided better error-checking and even more functionality. (For example, the insert statement can return a database-generated key.)

- since: 3.1
- version: $Id: TSqlMapStatement.php 2624 2009-03-19 21:20:47Z godzilla80@gmx.net $
- author: Wei Zhuo <weizho[at]gmail[dot]com>

Located in /Data/SqlMap/Configuration/TSqlMapStatement.php (line 31)

    TComponent
       |
       --TSqlMapStatement

Direct descendents

Class | Description
--- | ---
TSqlMapSelect | TSqlMapSelect class file.
TSqlMapInsert | TSqlMapInsert class corresponds to the <insert> element.
TSqlMapUpdate | TSqlMapUpdate class corresponds to <update> element.
TSqlMapSelectKey | TSqlMapSelect corresponds to the <selectKey> element.

Method Summary
mixed createInstanceOf (TSqlMapTypeHandlerRegistry $registry, string $type, [array $row = null])
ArrayAccess createInstanceOfListClass (TSqlMapTypeHandlerRegistry $registry)
mixed createInstanceOfResultClass (TSqlMapTypeHandlerRegistry $registry, array $row)
TSqlMapCacheModel getCache ()
string getCacheModel ()
string getExtends ()
string getID ()
string getListClass ()
string getParameterClass ()
string getParameterMap ()
string getResultClass ()
string getResultMap ()
TStaticSql getSqlText ()
void initialize (TSqlMapManager $manager)
TParameterMap parameterMap ()
TResultMap resultMap ()
void setCache (TSqlMapCacheModel $value)
void setCacheModel (string $value)
void setExtends (string $value)
void setID (string $value)
void setInlineParameterMap (TInlineParameterMap $map)
void setListClass (string $value)
void setParameterClass (string $value)
void setParameterMap (string $value)
void setResultClass (string $value)
void setResultMap (string $value)
void setSqlText (TStaticSql $value)
Methods
createInstanceOf (line 275)

Create a new instance of a given type.

- return: result object.
- access: protected

mixed createInstanceOf (TSqlMapTypeHandlerRegistry $registry, string $type, [array $row = null])

- TSqlMapTypeHandlerRegistry $registry: type handler registry
- string $type: result class name.
- array $row: result data.

createInstanceOfListClass (line 261)

- return: new instance of list class.
- access: public

ArrayAccess createInstanceOfListClass (TSqlMapTypeHandlerRegistry $registry)

- TSqlMapTypeHandlerRegistry $registry: type handler registry

createInstanceOfResultClass (line 290)

Create a new instance of result class.

- return: result object.
- access: public

mixed createInstanceOfResultClass (TSqlMapTypeHandlerRegistry $registry, array $row)

- TSqlMapTypeHandlerRegistry $registry: type handler registry
- array $row: result data.

getCache (line 158)

- return: cache implementation instance for this statement.
- access: public

TSqlMapCacheModel getCache ()
getCacheModel (line 142)

- return: cache mode name.
- access: public

string getCacheModel ()
getExtends (line 207)

- return: another statement element name.
- access: public

string getExtends ()
getID (line 50)

- return: name for this statement, unique to each sql map manager.
- access: public

string getID ()
getListClass (line 190)

- return: name of a PHP class that implements ArrayAccess.
- access: public

string getListClass ()
getParameterClass (line 84)

- return: parameter class name.
- access: public

string getParameterClass ()
getParameterMap (line 66)

- return: name of a parameter map.
- access: public

string getParameterMap ()
getResultClass (line 121)

- return: result class name.
- access: public

string getResultClass ()
getResultMap (line 103)

- return: result map name.
- access: public

string getResultMap ()
getSqlText (line 174)

- return: sql text container.
- access: public

TStaticSql getSqlText ()
initialize (line 249)

- access: public

void initialize (TSqlMapManager $manager)

- TSqlMapManager $manager: initialize the statement, sets the result and parameter maps.

parameterMap (line 233)

- return: the parameter map corresponding to the ParameterMap property.
- access: public

TParameterMap parameterMap ()
resultMap (line 224)

- return: the result map corresponding to the ResultMap property.
- access: public

TResultMap resultMap ()
setCache (line 166)

- access: public

void setCache (TSqlMapCacheModel $value)

- TSqlMapCacheModel $value: cache implementation instance for this statement.

setCacheModel (line 150)

- access: public

void setCacheModel (string $value)

- string $value: cache mode name.

setExtends (line 215)

- access: public

void setExtends (string $value)

- string $value: name of another statement element to extend.

Redefined in descendants as:

- TSqlMapSelectKey::setExtends()

setID (line 58)

- access: public

void setID (string $value)

- string $value: name for this statement, which must be unique for each sql map manager.

setInlineParameterMap (line 241)

- access: public

void setInlineParameterMap (TInlineParameterMap $map)

- TInlineParameterMap $map: parameter extracted from the sql text.

setListClass (line 199)

An ArrayAccess class can be specified to handle the type of objects in the collection.

- access: public

void setListClass (string $value)

- string $value: name of a PHP class that implements ArrayAccess.

setParameterClass (line 95)

If a ParameterMap property is not specified, you may specify a ParameterClass instead and use inline parameters.

The value of the parameterClass attribute can be any existing PHP class name.

- access: public

void setParameterClass (string $value)

- string $value: parameter class name.

setParameterMap (line 76)

A Parameter Map defines an ordered list of values that match up with the "?" placeholders of a standard, parameterized query statement.

- access: public

void setParameterMap (string $value)

- string $value: parameter map name.

setResultClass (line 134)

If a ResultMap is not specified, you may specify a

ResultClass instead. The value of the ResultClass property can be the name of a PHP class or primitives like integer, string, or array. The class specified will be automatically mapped to the columns in the result, based on the result metadata.

- access: public

void setResultClass (string $value)

- string $value: result class name.

setResultMap (line 113)

A Result Map lets you control how data is extracted from the result of a query, and how the columns are mapped to object properties.

- access: public

void setResultMap (string $value)

- string $value: result map name.

setSqlText (line 182)

- access: public

void setSqlText (TStaticSql $value)

- TStaticSql $value: sql text container.

#### 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 Mon, 22 Feb 2010 12:18:43 +0000 by phpDocumentor 1.3.0RC4