DataFaucet 1.0 Beta

datafaucet.system
Class gateway

WEB-INF.cftags.component
        extended by datafaucet.system.kernel
            extended by datafaucet.system.duck
                extended by datafaucet.system.gateway

public class gateway
extends duck

provides a base class for Active Record objects


Constructor Summary
init([string table=''], [string orderby=''], [string columns='*'], [string prefix=''], [string badchars=''], [string staticColumns=''], [any datasource=''])
 
Method Summary
private struct applyNamedFilters(any Statement, array filters)
private query findByDynamic(string MissingMethodName, struct MissingMethodArguments)
 any findByFilters([struct filters='[runtime expression]'], [string sort='sort'], [boolean andOrKeywords='[runtime expression]'])
          returns a query filtered and sorted by user-supplied data as a structure
private struct fixModifiedColumns(struct filters)
          when column prefixes are occluded, this method adjusts property names back to column names during an insert or update
private any fixSort(string sort)
private string getAliasColumnList()
private any getColumnMap()
private string getColumnNames()
private query getColumns()
private any getFilteredStatement(struct filters, [string sort=''], [string include='and'], [boolean andOrKeywords='[runtime expression]'])
package string getForeignKeyList()
private query getForeignKeys()
private array getNamedFilterArray(string MissingMethodName, struct MissingMethodArguments)
private any getSearchStatement(string searchPhrase, [string sort=''])
          returns a 'simple search' filtered by and/or keywords from a single user input, applied across all text-columns in the table
private any getStatement()
private string getTextColumnList()
private query getTextColumns()
private any get_TextColumns()
private string get_columns()
 any onMissingMethod(string MissingMethodName, struct MissingMethodArguments)
          Handles missing method exceptions.
 any search(string searchPhrase, [string sort=''])
          returns a 'simple search' filtered by and/or keywords from a single user input, applied across all text-columns in the table
 
Methods inherited from class datafaucet.system.duck
addObserver, getObservers, getProperties, getProperty, getPropertylist, getValue, identifyAccessorOrMutator, observe, raiseMissingMethodException, reset, setProperties, setProperty, setValue
 
Methods inherited from class datafaucet.system.kernel
arg, componentExists, getDataFaucet, getFaucetObject, getFile, getFileModified, getObject, getPlumbing, getTransaction, getTransactionManager, newTransaction, parseDate, setTransaction
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init([string table=''], [string orderby=''], [string columns='*'], [string prefix=''], [string badchars=''], [string staticColumns=''], [any datasource=''])

Parameters:
table - a base table from which data should be selected
orderby - a default order by which results should be sorted
columns - a list of columns to return in selected queries
prefix - a string to remove from the beginning of any column names - only applied to columns returned by the * wildcard
badchars - undesirable characters to remove from names - only applied to columns returned by the * wildcard
staticColumns - a comma delimited list of columns for which the prefix is not removed, i.e. productid,productname
datasource
Method Detail

applyNamedFilters

private struct applyNamedFilters(any Statement, array filters)

Parameters:
Statement
filters

findByDynamic

private query findByDynamic(string MissingMethodName, struct MissingMethodArguments)

Parameters:
MissingMethodName - The name of the missing method.
MissingMethodArguments - The arguments that were passed to the missing method. This might be a named argument set or a numerically indexed set.

findByFilters

public any findByFilters([struct filters='[runtime expression]'], [string sort='sort'], [boolean andOrKeywords='[runtime expression]'])
returns a query filtered and sorted by user-supplied data as a structure

Parameters:
filters
sort
andOrKeywords

fixModifiedColumns

private struct fixModifiedColumns(struct filters)
when column prefixes are occluded, this method adjusts property names back to column names during an insert or update

Parameters:
filters

fixSort

private any fixSort(string sort)

Parameters:
sort

getAliasColumnList

private string getAliasColumnList()


getColumnMap

private any getColumnMap()


getColumnNames

private string getColumnNames()


getColumns

private query getColumns()


getFilteredStatement

private any getFilteredStatement(struct filters, [string sort=''], [string include='and'], [boolean andOrKeywords='[runtime expression]'])

Parameters:
filters
sort
include
andOrKeywords

getForeignKeyList

package string getForeignKeyList()


getForeignKeys

private query getForeignKeys()


getNamedFilterArray

private array getNamedFilterArray(string MissingMethodName, struct MissingMethodArguments)

Parameters:
MissingMethodName - The name of the missing method.
MissingMethodArguments - The arguments that were passed to the missing method. This might be a named argument set or a numerically indexed set.

getSearchStatement

private any getSearchStatement(string searchPhrase, [string sort=''])
returns a 'simple search' filtered by and/or keywords from a single user input, applied across all text-columns in the table

Parameters:
searchPhrase
sort

getStatement

private any getStatement()


getTextColumnList

private string getTextColumnList()


getTextColumns

private query getTextColumns()


get_TextColumns

private any get_TextColumns()


get_columns

private string get_columns()


onMissingMethod

public any onMissingMethod(string MissingMethodName, struct MissingMethodArguments)
Handles missing method exceptions.

Overrides:
onMissingMethod in class duck
Parameters:
MissingMethodName - The name of the missing method.
MissingMethodArguments - The arguments that were passed to the missing method. This might be a named argument set or a numerically indexed set.

search

public any search(string searchPhrase, [string sort=''])
returns a 'simple search' filtered by and/or keywords from a single user input, applied across all text-columns in the table

Parameters:
searchPhrase
sort

DataFaucet 1.0 Beta