TResultProperty corresponds a <property> tags inside a <resultMap> tag.
The NullValue attribute can be set to any valid value (based on property type). The NullValue attribute is used to specify an outgoing null value replacement. What this means is that when a null value is detected in the result, the corresponding value of the NullValue will be used instead.
The Select property is used to describe a relationship between objects and to automatically load complex (i.e. user defined) property types. The value of the Select property must be the name of another mapped statement. The value of the database Column that is defined in the same property element as this statement attribute will be passed to the related mapped statement as the parameter. The LazyLoad attribute can be specified with the Select .
Method Summary |
protected
TSqlMapTypeHandler
|
Create type handler from Type or TypeHandler.
|
string
|
|
int
|
|
boolean
|
|
TResultMap
|
|
mixed
|
|
string
|
|
mixed
|
Gets the value for the current property, converts to applicable type if necessary.
|
protected
int
|
Determines if the type is an instance of ArrayAccess, TList or an array.
|
string
|
|
string
|
|
string
|
|
protected
mixed
|
|
string
|
|
boolean
|
Returns true if the result property Type is of ArrayAccess
|
boolean
|
Returns true if the result property Type is of TList type or that the actual result object is an instance of TList.
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
|
void
|
The select property is used to describe a relationship between objects and to automatically load complex (i.e. user defined) property types.
|
void
|
|
void
|
|
Method Details |
createTypeHandler
Create type handler from Type or TypeHandler.
|
getColumn
public string getColumn |
() |
Output |
string
| name of the column in the result set from which the value will be used to populate the property. |
Exception |
|
getColumnIndex
public int getColumnIndex |
() |
Output |
int
| index of the column in the ResultSet from which the value will be used to populate the object property |
Exception |
|
getLazyLoad
public boolean getLazyLoad |
() |
Output |
boolean
| indicate whether or not the select statement's results should be lazy loaded |
Exception |
|
getNestedResultMap
|
getNullValue
public mixed getNullValue |
() |
Output |
mixed
| null value replacement. |
Exception |
|
getProperty
public string getProperty |
() |
Output |
string
| name of a property of the result object that will be set to. |
Exception |
|
getPropertyValue
Gets the value for the current property, converts to applicable type if necessary.
|
getPropertyValueType
protected int getPropertyValueType |
() |
Determines if the type is an instance of ArrayAccess, TList or an array.
Output |
int
| TResultProperty::LIST_TYPE or TResultProperty::ARRAY_TYPE |
Exception |
|
getResultMapping
public string getResultMapping |
() |
Output |
string
| ID of another <resultMap> used to fill the property. |
Exception |
|
getSelect
public string getSelect |
() |
Output |
string
| name of another mapped statement |
Exception |
|
getType
Output |
string
| property type of the object property to be set. |
Exception |
|
getTypedValue
Input |
TSqlMapTypeHandlerRegistry | $registry | type handler registry |
mixed | $value | raw property value |
Output |
mixed
| property value casted to specific type. |
Exception |
|
getTypeHandler
public string getTypeHandler |
() |
Output |
string
| custom type handler class name (may use namespace). |
Exception |
|
instanceOfArrayType
public boolean instanceOfArrayType |
(object result $target ) |
Returns true if the result property Type is of ArrayAccess
or that the actual result object is an array or implements ArrayAccess
Input |
object result | $target | object |
Output |
boolean
| true if the result object is an instance of ArrayAccess or is an array. |
Exception |
|
instanceOfListType
public boolean instanceOfListType |
(object result $target ) |
Returns true if the result property Type is of TList type or that the actual result object is an instance of TList.
Input |
object result | $target | object |
Output |
boolean
| true if the result object is an instance of TList |
Exception |
|
setColumn
public void setColumn |
(string $value ) |
Input |
string | $value | name of the column in the result set from which the value will be used to populate the property. |
Output |
Exception |
|
setColumnIndex
public void setColumnIndex |
(int $value ) |
Input |
int | $value | index of the column in the ResultSet from which the value will be used to populate the object property |
Output |
Exception |
|
setLazyLoad
public void setLazyLoad |
(boolean $value ) |
Input |
boolean | $value | indicate whether or not the select statement's results should be lazy loaded |
Output |
Exception |
|
setNestedResultMap
public void setNestedResultMap |
(TResult $value ) |
Input |
TResult | $value | nested result map. |
Output |
Exception |
|
setNullValue
public void setNullValue |
(mixed $value ) |
Input |
mixed | $value | null value replacement. |
Output |
Exception |
|
setProperty
public void setProperty |
(string $value ) |
Input |
string | $value | name of a property of the result object that will be set to. |
Output |
Exception |
|
setResultMapping
public void setResultMapping |
(mixed $value ) |
Input |
mixed | $value | |
Output |
Exception |
|
setSelect
public void setSelect |
(string $value ) |
The select property is used to describe a relationship between objects and to automatically load complex (i.e. user defined) property types.
Input |
string | $value | name of another mapped statement. |
Output |
Exception |
|
setType
public void setType |
(string $value ) |
Input |
string | $value | property type of the object property to be set. |
Output |
Exception |
|
setTypeHandler
public void setTypeHandler |
(string $value ) |
Input |
string | $value | custom type handler class name (may use namespace). |
Output |
Exception |
|