Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml


Classes:
Keyword

Class TLazyLoadList


TLazyLoadList executes mapped statements when the proxy collection is first accessed.

Since: 3.1
Author: Wei Zhuo <weizho[at]gmail[dot]com>

Constructor Summary
protected
__construct Array
Create a new proxy list that will execute the mapped statement when any of the list's method are accessed for the first time.

Method Summary
protected  void
Load the data by executing the mapped statement.
boolean
hasMethod ( string $method)
Try to fetch the data when any of the proxy collection method is called.
void
intercept ( string $method, array $arguments)
Relay the method call to the underlying collection.
TObjectProxy
newInstance ( TMappedStatement $mappedStatement, mixed $param, object result $target, string $propertyName)
Create a new instance of a lazy collection.

Constructor Details

__construct

protected __construct Array

Create a new proxy list that will execute the mapped statement when any of the list's method are accessed for the first time.


Method Details

fetchListData

protected void fetchListData ()

Load the data by executing the mapped statement.

Output
Exception

hasMethod

public boolean hasMethod (string $method )

Try to fetch the data when any of the proxy collection method is called.

Input
string$methodmethod name.
Output
boolean true if the underlying collection has the corresponding method name.
Exception

intercept

public void intercept (string $method , array $arguments )

Relay the method call to the underlying collection.

Input
string$methodmethod name.
array$argumentsmethod parameters.
Output
Exception

newInstance

public TObjectProxy newInstance (TMappedStatement $mappedStatement , mixed $param , object result $target , string $propertyName )

Create a new instance of a lazy collection.

Input
TMappedStatement$mappedStatementstatement to be executed to load the data.
mixed$paramparameter value for the statement.
object result$targetobject that contains the lazy collection.
string$propertyNameproperty of the result object to set the loaded collection.
Output
TObjectProxy proxied collection object.
Exception