DataFaucet 1.0 Beta

datafaucet.system.sql
Class filtergroup

WEB-INF.cftags.component
        extended by datafaucet.system.sql.duck
            extended by datafaucet.system.sql.simplefiltergroup
                extended by datafaucet.system.sql.filtergroup
Direct Known Subclasses:
statement

public class filtergroup
extends simplefiltergroup

provides a means of manually attaching grouped filters to statement object - extended by insert, update and select statements


Constructor Summary
init(any source, [string include='[runtime expression]'], [boolean bindFilters='[runtime expression]'])
 
Method Summary
private any addLiquidFilterGroup(string MissingMethodName, struct MissingMethodArguments)
private any addLiquidFilters(array name)
 any andOrCollectionFilter(struct content)
 any andOrFilter(string columns, string searchphrase)
 any caseSensitiveFilter(string column, string content, [string comparison], [string include], [string delimiters])
 any collectionFilter(struct content, [string comparison='LIKE'], [string include='AND'], [boolean bindFilters='false'], [string delimiters=','], [boolean dynamic='false'], [boolean reverse='false'], [boolean casesensitive='false'], [string like='contains'])
 any dateFilter(string column, [string after=''], [string before='1'], [boolean bindFilters='true'])
 any filter(string column, any content, [string comparison='='], [string include], [string delimiters], [boolean casesensitive='false'])
 any filterGroup([string include='[runtime expression]'], [boolean bindFilters='true'])
 any filterLanguage(string column, string locales)
 any filterLocale(string column, string locales)
private string getDefaultLocale()
private any getLiquidNameArray(string name)
private array getLocaleArray([string locale='[runtime expression]'])
 any getNewFilter([string column=''], [string classPath='filter'])
 any listFilter(string column, string content, [boolean inlist='true'], [string delimiters], [string include], [boolean casesensitive='false'])
 any nullFilter(string column, [boolean isNull='true'], [string include=''])
 any numericFilter(string column, [string min=''], [string max=''], [boolean bindFilters='true'])
 any onMissingMethod(string MissingMethodName, struct MissingMethodArguments)
          Handles missing method exceptions.
 any reverseFilter(string column, string content, [string include], [boolean casesensitive='false'], [string delimiters=''])
 any setFirstFilter(any filter)
 any sqlFilter(string column, any content, [string comparison], [string include], [boolean reverse='false'], [boolean casesensitive='false'])
 any timeSpanFilter(string startcolumn, string endcolumn, string starttime, string endtime, [string overlap='true'], [boolean bindFilters='true'])
 
Methods inherited from class datafaucet.system.sql.simplefiltergroup
appendFilter, bindFilters, clearFilters, columnNotFoundException, execute, filtersExist, getAvailableColumnList, getDatasource, getFilters, getFirstFilter, getGroupSource, getSource, getSyntax, getTable, getTableArray, getTableForColumn, get_column, hasFilters, hasGroupSource, hasJoinSource, hasJoinTables, isGroup, makeFilters, raiseFilterExceptions, setTable, typeMismatchException
 
Methods inherited from class datafaucet.system.sql.duck
arg, getDefaultLocalization, getLocalization, getNext, getObject, getProperties, getProperty, getPropertylist, getTail, getValue, hasNext, identifyAccessorOrMutator, insertAfter, parseDate, parseNumber, raiseAbstractClassException, raiseMissingMethodException, removeAfter, setLocalization, setNext, setProperties, setProperty, setValue, simplify
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any source, [string include='[runtime expression]'], [boolean bindFilters='[runtime expression]'])

Parameters:
source
include
bindFilters
Method Detail

addLiquidFilterGroup

private any addLiquidFilterGroup(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.

addLiquidFilters

private any addLiquidFilters(array name)

Parameters:
name

andOrCollectionFilter

public any andOrCollectionFilter(struct content)

Parameters:
content - a structure containing search phrases for each key in the structure

andOrFilter

public any andOrFilter(string columns, string searchphrase)

Parameters:
columns - a comma delimited list of columns to search
searchphrase - a search phrase containing and-or keywords in the current users preferred language or in english if localized keywords are unavailable

caseSensitiveFilter

public any caseSensitiveFilter(string column, string content, [string comparison], [string include], [string delimiters])

Parameters:
column - the name of a column to filter results on
content - the content to compare against the data stored in the table
comparison - indicates how the content of the current filter should be compared against the database (<|=|>|like|in|not in|null|not null) - defaults to 'like' for varchar columns or = for all other data types
include - and / or -- determines whether the filters are cumulative or exclusive
delimiters - a list of delimiters if the compare attribute is in or not in

collectionFilter

public any collectionFilter(struct content, [string comparison='LIKE'], [string include='AND'], [boolean bindFilters='false'], [string delimiters=','], [boolean dynamic='false'], [boolean reverse='false'], [boolean casesensitive='false'], [string like='contains'])

Parameters:
content - a structure containing search phrases for each key in the structure
comparison - indicates what kind of comparison should be performed against the structure element values
include - and / or -- determines whether the filters are cumulative or exclusive
bindFilters - indicates if the created group of filters should be returned as a contained group (adds parenthesis around the sql syntax)
delimiters - a string of delimiters if the compare attribute is in or not in
dynamic - indicates that the content argument is a string of arbitrary SQL
reverse - indicates that the filter should be reversed, checking for the column value within the content string
casesensitive - indicates that the content of columns should not be made case-insensitive for databases with case-sensitive collation
like - indicates if like filters should include wild-cards before, after or on both sides of the content string

dateFilter

public any dateFilter(string column, [string after=''], [string before='1'], [boolean bindFilters='true'])

Parameters:
column - the name of a column to filter results on
after - the earliest possible date to return from the query
before - the latest possible date to return from the query - a number may be substituted to indicate a specific number of days
bindFilters - indicates if the created filters should be grouped

filter

public any filter(string column, any content, [string comparison='='], [string include], [string delimiters], [boolean casesensitive='false'])

Parameters:
column - the name of a column to filter results on
content - the content to compare against the data stored in the table
comparison - indicates how the content of the current filter should be compared against the database (<|=|>|like|in|not in|null|not null) - defaults to 'like' for varchar columns or = for all other data types
include - and / or -- determines whether the filters are cumulative or exclusive
delimiters - a list of delimiters if the compare attribute is in or not in
casesensitive - indicates that the content of columns should not be made case-insensitive for databases with case-sensitive collation

filterGroup

public any filterGroup([string include='[runtime expression]'], [boolean bindFilters='true'])

Parameters:
include
bindFilters

filterLanguage

public any filterLanguage(string column, string locales)

Parameters:
column - the name of a column containing locale strings
locales - a comma-delimited list of languages to match -- will include content matched to all locales in the specified languages

filterLocale

public any filterLocale(string column, string locales)

Parameters:
column - the name of a column containing locale strings
locales - a comma-delimited list of locales to match -- will include content matched to all parent locales, i.e. en_US will also include en

getDefaultLocale

private string getDefaultLocale()


getLiquidNameArray

private any getLiquidNameArray(string name)

Parameters:
name - The name of the missing method.

getLocaleArray

private array getLocaleArray([string locale='[runtime expression]'])

Parameters:
locale

getNewFilter

public any getNewFilter([string column=''], [string classPath='filter'])

Parameters:
column
classPath

listFilter

public any listFilter(string column, string content, [boolean inlist='true'], [string delimiters], [string include], [boolean casesensitive='false'])

Parameters:
column - the name of a column to filter results on
content - the content to compare against the data stored in the table
inlist - indicates how the content of the current filter should be compared against the database
delimiters - a list of delimiters if the compare attribute is in or not in
include - and / or -- determines whether the filters are cumulative or exclusive
casesensitive - indicates that the content of columns should not be made case-insensitive for databases with case-sensitive collation

nullFilter

public any nullFilter(string column, [boolean isNull='true'], [string include=''])

Parameters:
column - the name of a column to filter results on
isNull - indicates if the indicated column should be null or not null
include - and / or -- determines whether the filters are cumulative or exclusive

numericFilter

public any numericFilter(string column, [string min=''], [string max=''], [boolean bindFilters='true'])

Parameters:
column - the name of a column to filter results on
min - the earliest possible date to return from the query
max - the latest possible date to return from the query - a number may be substituted to indicate a specific number of days
bindFilters - indicates if the created date filters should be grouped

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.

reverseFilter

public any reverseFilter(string column, string content, [string include], [boolean casesensitive='false'], [string delimiters=''])

Parameters:
column - the name of a column to filter results on
content - the content to compare against the data stored in the table
include - and / or -- determines whether the filters are cumulative or exclusive
casesensitive - indicates that the content of columns should not be made case-insensitive for databases with case-sensitive collation
delimiters - allows the reverse filter to find an item in a list

setFirstFilter

public any setFirstFilter(any filter)

Parameters:
filter

sqlFilter

public any sqlFilter(string column, any content, [string comparison], [string include], [boolean reverse='false'], [boolean casesensitive='false'])

Parameters:
column - the name of a column to filter results on
content - a string of raw sql syntax (as an example this may include a column name, i.e. where col1 > col2) or another select object to create a subquery
comparison - indicates how the content of the current filter should be compared against the database (<|=|>|like|in|not in|null|not null) - defaults to 'like' for varchar columns or = for all other data types
include - and / or -- determines whether the filters are cumulative or exclusive
reverse - indicates that the filter should be reversed, checking for the column value within the content string
casesensitive - indicates that the content of columns should not be made case-insensitive for databases with case-sensitive collation

timeSpanFilter

public any timeSpanFilter(string startcolumn, string endcolumn, string starttime, string endtime, [string overlap='true'], [boolean bindFilters='true'])

Parameters:
startcolumn - identifies a column representing the beginning of a span of time
endcolumn - identifies a column representing the end of a span of time
starttime - the beginning of a time-span which should or should not overlap the span indicated in the columns
endtime - the end of a time-span which should or should not overlap the span indicated in the columns
overlap - indicates if the specified time-spans should overlap or should not overlap
bindFilters - indicates if the created filters should be grouped

DataFaucet 1.0 Beta