Transfer version 1.1

transfer.com.tql
Class Query

WEB-INF.cftags.component
        extended by transfer.com.tql.Query

public class Query
extends WEB-INF.cftags.component

The TQL Query objects


Constructor Summary
init(string tql)
          Constructor
 
Method Summary
private void addMappedParameter(string mapName, struct mapValues)
          Adds a mapped param to the collection
 void clean()
          Cleans the Query object for reuse
private void configure(string tql)
          Configuration
 boolean getAliasColumns()
 boolean getCacheEvaluation()
 boolean getDistinctMode()
 string getHash()
          returns a hash for the state this query
private struct getMappedParameter(string mapName)
          returns a mapped parameter
private struct getMappedParameters()
 struct getParam(string mapName)
          Returns a mapped param
 string getTQL()
 void setAliasColumns(boolean AliasColumns)
          If true, columns are alias'ed to the property names. Defaults to true.
 void setCacheEvaluation(boolean CacheEvaluation)
          When set to true, Transfer knows that the TQL isn't going to change, and caches the evaluation of the TQL for reuse. Defaults to: false
 void setDistinctMode(boolean DistinctMode)
          When set to true, the query is run as DISTINCT. Defaults to false.
private void setMappedParameters(struct MappedParameters)
 void setParam(string name, [string value], [string type='string'], [boolean list='false'], [boolean isNull='false'])
          Sets a mapped parameter
private void setTQL(string TQL)
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(string tql)
Constructor

Parameters:
tql - The TQL to set the query to
Method Detail

addMappedParameter

private void addMappedParameter(string mapName, struct mapValues)
Adds a mapped param to the collection

Parameters:
mapName - The name to map it to
mapValues - The struct of values to be mapped

clean

public void clean()
Cleans the Query object for reuse


configure

private void configure(string tql)
Configuration

Parameters:
tql - The tql to set the query to

getAliasColumns

public boolean getAliasColumns()


getCacheEvaluation

public boolean getCacheEvaluation()


getDistinctMode

public boolean getDistinctMode()


getHash

public string getHash()
returns a hash for the state this query


getMappedParameter

private struct getMappedParameter(string mapName)
returns a mapped parameter

Parameters:
mapName - The name to map the param to

getMappedParameters

private struct getMappedParameters()


getParam

public struct getParam(string mapName)
Returns a mapped param

Parameters:
mapName - The name of the mapping

getTQL

public string getTQL()


setAliasColumns

public void setAliasColumns(boolean AliasColumns)
If true, columns are alias'ed to the property names. Defaults to true.

Parameters:
AliasColumns

setCacheEvaluation

public void setCacheEvaluation(boolean CacheEvaluation)
When set to true, Transfer knows that the TQL isn't going to change, and caches the evaluation of the TQL for reuse. Defaults to: false

Parameters:
CacheEvaluation

setDistinctMode

public void setDistinctMode(boolean DistinctMode)
When set to true, the query is run as DISTINCT. Defaults to false.

Parameters:
DistinctMode

setMappedParameters

private void setMappedParameters(struct MappedParameters)

Parameters:
MappedParameters

setParam

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

Parameters:
name - The name of the mapping
value - The value of the mapping, required if 'null' is false
type - The type of the mapped value: string, date, boolean, numeric, GUID, UUID
list - if the mapped value is a list
isNull - If the value is actually null

setTQL

private void setTQL(string TQL)

Parameters:
TQL

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