DataFaucet 1.0 Beta

datafaucet.system
Class arutilities

WEB-INF.cftags.component
        extended by datafaucet.system.kernel
            extended by datafaucet.system.duck
                extended by datafaucet.system.broadcaster
                    extended by datafaucet.system.transaction
                        extended by datafaucet.system.arutilities
Direct Known Subclasses:
arschema

public class arutilities
extends transaction

general internal functionality for ActiveRecord objects


Constructor Summary
init()
 
Method Summary
private any filterSQLStatement(any statement, [any ActiveRecord='[runtime expression]'])
          allows objects which extend ActiveRecord to more easily fetch queries of data from related tables
private void getAllForeignKeys(struct insertdata, [boolean throwError='false'])
private any getColumnMap()
 any getDatasource()
private string getDateProperties()
          returns a list of properties with date values
private string getDefaultLocale()
private string getDefaultTimezone()
private string getForeignKeyValue(string keytable, string keycolumn, string keyvalue)
private any getFullTableName(string table)
 any getLocalization()
private string getLock([string lockname=''], [string tablename='[runtime expression]'])
 struct getORMProperties()
          returns all properties of the ActiveRecord object which match column names in the target table
 struct getPrimaryKeyData()
 any getProperties()
          returns all properties from a cfc in a structure
private string getProtectedColumns()
private any getSQLInsert(string table, [string column='[runtime expression]'])
          gets a sql insert statement containing the object id in a specified column - facilitates inserts into cross-reference tables
private any getSQLStatement(string type, [string table='[runtime expression]'], [string columns='*'], [string orderby=''], [struct insertData])
          gets a sql statement object which targets the database record represented by the current instance
private any getSelectStatement()
private any getUTCLocale()
 boolean hasDatasource()
          indicates if the current object has been loaded with a datasource instance
 boolean hasLocalization()
 string lock()
          returns a name for locking access to the record represented by the ActiveRecord object
private struct mapCollectionToProperties(struct collection)
private string nullForeignKeys(struct insertdata, [query keys='[runtime expression]'])
          removes keys from a struct when they match an imported key in the database and contain an empty string
private any parseDates(struct insertdata)
          parses and adjusts times in an input structure to UTC for storage
private struct queryToStruct(query query, [numeric index='1'])
private void removeNullKeys(struct insertdata)
 any setDatasource(any datasource)
          sets the datasource to which this object belongs
 any setLocalization(any localization)
 void setNull(string columns)
 void setORMProperties(any properties, [boolean overwrite='true'], [numeric index='1'])
          sets properties from column names in the target table
private struct simplify(struct st)
 
Methods inherited from class datafaucet.system.transaction
broadcastTransactionCommit, broadcastTransactionRollback, commitTransaction, execute, executeTransactedMethod, getCurrentIsolation, getTransactionDepth, openTransaction, rollbackTransaction, trace
 
Methods inherited from class datafaucet.system.broadcaster
Broadcast, addListener, getListeners
 
Methods inherited from class datafaucet.system.duck
addObserver, getObservers, getProperty, getPropertylist, getValue, identifyAccessorOrMutator, observe, onMissingMethod, 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()

Method Detail

filterSQLStatement

private any filterSQLStatement(any statement, [any ActiveRecord='[runtime expression]'])
allows objects which extend ActiveRecord to more easily fetch queries of data from related tables

Parameters:
statement
ActiveRecord

getAllForeignKeys

private void getAllForeignKeys(struct insertdata, [boolean throwError='false'])

Parameters:
insertdata
throwError

getColumnMap

private any getColumnMap()


getDatasource

public any getDatasource()


getDateProperties

private string getDateProperties()
returns a list of properties with date values


getDefaultLocale

private string getDefaultLocale()


getDefaultTimezone

private string getDefaultTimezone()


getForeignKeyValue

private string getForeignKeyValue(string keytable, string keycolumn, string keyvalue)

Parameters:
keytable
keycolumn
keyvalue

getFullTableName

private any getFullTableName(string table)

Parameters:
table

getLocalization

public any getLocalization()


getLock

private string getLock([string lockname=''], [string tablename='[runtime expression]'])

Parameters:
lockname
tablename

getORMProperties

public struct getORMProperties()
returns all properties of the ActiveRecord object which match column names in the target table


getPrimaryKeyData

public struct getPrimaryKeyData()


getProperties

public any getProperties()
returns all properties from a cfc in a structure

Overrides:
getProperties in class duck

getProtectedColumns

private string getProtectedColumns()


getSQLInsert

private any getSQLInsert(string table, [string column='[runtime expression]'])
gets a sql insert statement containing the object id in a specified column - facilitates inserts into cross-reference tables

Parameters:
table
column

getSQLStatement

private any getSQLStatement(string type, [string table='[runtime expression]'], [string columns='*'], [string orderby=''], [struct insertData])
gets a sql statement object which targets the database record represented by the current instance

Parameters:
type
table
columns
orderby
insertData

getSelectStatement

private any getSelectStatement()


getUTCLocale

private any getUTCLocale()


hasDatasource

public boolean hasDatasource()
indicates if the current object has been loaded with a datasource instance


hasLocalization

public boolean hasLocalization()


lock

public string lock()
returns a name for locking access to the record represented by the ActiveRecord object


mapCollectionToProperties

private struct mapCollectionToProperties(struct collection)

Parameters:
collection

nullForeignKeys

private string nullForeignKeys(struct insertdata, [query keys='[runtime expression]'])
removes keys from a struct when they match an imported key in the database and contain an empty string

Parameters:
insertdata
keys

parseDates

private any parseDates(struct insertdata)
parses and adjusts times in an input structure to UTC for storage

Parameters:
insertdata

queryToStruct

private struct queryToStruct(query query, [numeric index='1'])

Parameters:
query
index

removeNullKeys

private void removeNullKeys(struct insertdata)

Parameters:
insertdata

setDatasource

public any setDatasource(any datasource)
sets the datasource to which this object belongs

Parameters:
datasource

setLocalization

public any setLocalization(any localization)

Parameters:
localization

setNull

public void setNull(string columns)

Parameters:
columns

setORMProperties

public void setORMProperties(any properties, [boolean overwrite='true'], [numeric index='1'])
sets properties from column names in the target table

Parameters:
properties - a structure or query containing keys which match the keys of the property structure
overwrite - when false the component's existing properties will be preserved
index - if the properties argument is a query the index argument can be used to determine what row of the query is used to populate the object

simplify

private struct simplify(struct st)

Parameters:
st

DataFaucet 1.0 Beta