Transfer version 1.1

transfer.com.sql
Class QueryExecution

WEB-INF.cftags.component
        extended by transfer.com.sql.QueryExecution

public class QueryExecution
extends WEB-INF.cftags.component

An execution object of a query


Constructor Summary
init(Datasource datasource)
          Constructor
 
Method Summary
 void clean()
          clean the execution for reuse
 void execute()
          simply executes the query
 any executeQuery()
          executes the query and returns the last Select query result, if no query available, returns 0
private Datasource getDatasource()
private struct getMappedParam(string name)
          returns a mapped param
private struct getMappedParamCollection()
private array getQueryCollection()
private void setDatasource(Datasource Datasource)
private void setMappedParamCollection(struct MappedParamCollection)
 void setMemento(struct memento)
          Sets the state of the object
 void setParam(string name, [any value], [boolean list='false'], [boolean isNull='false'], [string operator], [string mapValueReplace])
          Sets a mapped parameter
private void setQueryCollection(array QueryCollection)
private any throw(string type, string message, [string detail=''])
          Throws an Exception
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(Datasource datasource)
Constructor

Parameters:
datasource - the datasource to execute against
Method Detail

clean

public void clean()
clean the execution for reuse


execute

public void execute()
simply executes the query


executeQuery

public any executeQuery()
executes the query and returns the last Select query result, if no query available, returns 0


getDatasource

private Datasource getDatasource()


getMappedParam

private struct getMappedParam(string name)
returns a mapped param

Parameters:
name - the name of the mapped param

getMappedParamCollection

private struct getMappedParamCollection()


getQueryCollection

private array getQueryCollection()


setDatasource

private void setDatasource(Datasource Datasource)

Parameters:
Datasource

setMappedParamCollection

private void setMappedParamCollection(struct MappedParamCollection)

Parameters:
MappedParamCollection

setMemento

public void setMemento(struct memento)
Sets the state of the object

Parameters:
memento - the state to be set

setParam

public void setParam(string name, [any value], [boolean list='false'], [boolean isNull='false'], [string operator], [string mapValueReplace])
Sets a mapped parameter

Parameters:
name - The name of the mapping
value - The value of the mapping, required if 'null' is false
list - if the mapped value is a list
isNull - If the value is actually null
operator - if this exists, set the equality operator.
mapValueReplace - a string to replacce the mapped value with

setQueryCollection

private void setQueryCollection(array QueryCollection)

Parameters:
QueryCollection

throw

private any throw(string type, string message, [string detail=''])
Throws an Exception

Parameters:
type - The type of exception
message - The message to accompany the exception
detail - The detail message for the exception

Transfer version 1.1