- Home
- About
- Testimonials
- Demos
- Download
- Documentation
- Blogs
- Forum
- Support

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: TInvalidPropertyException TLazyLoadList TObjectProxy TPropertyAccess TSqlMapApplicationCache TSqlMapCache TSqlMapConfig TSqlMapConfigurationException TSqlMapDuplicateException TSqlMapException TSqlMapExecutionException TSqlMapFifoCache TSqlMapGateway TSqlMapLruCache TSqlMapManager TSqlMapPagedList TSqlMapTypeHandler TSqlMapTypeHandlerRegistry TSqlMapUndefinedException |
Keyword
# Class TSqlMapConfig
    TComponent
       |
       --TApplicationComponent
          |
          --TModule
             |
             --TDataSourceConfig
                |
                --TSqlMapConfig
TSqlMapConfig module configuration class. Database connection and TSqlMapManager configuration. Since: 3.1 Author: Wei Zhuo <weizho[at]gmail[dot]com>
Method Summary
protected boolean | cacheSqlMapManager ( mixed $manager) Saves the current SqlMap manager to cache.
void | clearCache () Deletes the configuration cache.
protected TSqlMapGateway | createSqlMapGateway () Configure the data mapper using sqlmap configuration file.
TSqlMapGateway | getClient () Initialize the sqlmap if necessary, returns the TSqlMapGateway instance.
string | getConfigFile ()
boolean | getEnableCache ()
protected TSqlMapManager | loadCachedSqlMapManager () Loads SqlMap manager from cache.
void | setConfigFile ( string $value)
void | setEnableCache ( boolean $value) Set true to cache sqlmap instances.
Methods Inherited From TDataSourceConfig
TDataSourceConfig::findConnectionByID(), TDataSourceConfig::getConnectionClass(), TDataSourceConfig::getConnectionID(), TDataSourceConfig::getDatabase(), TDataSourceConfig::getDbConnection(), TDataSourceConfig::init(), TDataSourceConfig::setConnectionClass(), TDataSourceConfig::setConnectionID()
Methods Inherited From TModule
TModule::getID(), TModule::init(), TModule::setID()
Methods Inherited From TApplicationComponent
TApplicationComponent::getApplication(), TApplicationComponent::getRequest(), TApplicationComponent::getResponse(), TApplicationComponent::getService(), TApplicationComponent::getSession(), TApplicationComponent::getUser(), TApplicationComponent::publishAsset(), TApplicationComponent::publishFilePath()
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()
Constant Summary
string | CONFIG_FILE_EXT | File extension of external configuration file
Method Details
## cacheSqlMapManager
protected boolean cacheSqlMapManager | (mixed $manager )
Saves the current SqlMap manager to cache.
Input
mixed | $manager |
Output
boolean | true if SqlMap manager was cached, false otherwise.
Exception
## clearCache
public void clearCache | ()
Deletes the configuration cache.
Output
Exception
## createSqlMapGateway
protected TSqlMapGateway createSqlMapGateway | ()
Configure the data mapper using sqlmap configuration file. If cache is enabled, the data mapper instance is cached.
Output
TSqlMapGateway | SqlMap gateway instance.
Exception
## getClient
public TSqlMapGateway getClient | ()
Initialize the sqlmap if necessary, returns the TSqlMapGateway instance.
Output
TSqlMapGateway | SqlMap gateway instance.
Exception
## getConfigFile
public string getConfigFile | ()
Output
string | SqlMap configuration file.
Exception
## getEnableCache
public boolean getEnableCache | ()
Output
boolean | true if configuration should be cached, false otherwise.
Exception
## loadCachedSqlMapManager
protected TSqlMapManager loadCachedSqlMapManager | ()
Loads SqlMap manager from cache.
Output
TSqlMapManager | SqlMap manager intance if load was successful, null otherwise.
Exception
## setConfigFile
public void setConfigFile | (string $value )
Input
string | $value | external configuration file in namespace format. The file extension must be '.xml'.
Output
Exception
throws | TConfigurationException if the file is invalid.
## setEnableCache
public void setEnableCache | (boolean $value )
Set true to cache sqlmap instances.
Input
boolean | $value | true to cache sqlmap instance.
Output
Exception
Constant Details
### CONFIG_FILE_EXT File extension of external configuration file #### Type: string #### Value: '.xml'