DataFaucet 1.0 Beta

datafaucet.system
Class armanytomany

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
                            extended by datafaucet.system.arschema
                                extended by datafaucet.system.armanytomany
Direct Known Subclasses:
activerecord

public class armanytomany
extends arschema

provides many to many relationship management for ActiveRecord objects


Constructor Summary
init()
 
Method Summary
 any addManyToManyRelationship(string table, [string column=''], [string references=''], [boolean removeall='true'])
 struct deleteManyToManyRecords(string table, [string idlist=''], [string listtype='IN'], [string column=''], [string references=''])
private any deleteManyToManyRelationships()
private string getColumnNames()
 struct getFailedProperties()
private struct getManyToManyColumns(string table, [string column=''], [string references=''], [boolean needreference='true'])
private string getManyToManyKeys(string table, [string column=''], [string references=''])
 struct getManyToManyProperties()
          returns many-to-many properties from the previously loaded object
private any getManyToManySelect(string table, [string column=''], [string references=''], [string local=''], [string select='[runtime expression]'])
private string getManyToManyTable(string table, string references='')
 string insertManyToManyRecords(string table, string idlist, [string column=''], [string references=''])
          inserts all specified values into a crossreference table - returns a comma delimited list of failed inserts which probably resulted from a foreign-key constraint violation
 query listManyToManyRecords(string table, [string select='*'], [string column=''], [string references=''], [string local=''])
 struct readManyToManyProperties()
          returns many-to-many properties from the database
 any removeManyToManyRelationship(string table)
 string setManyToManyRecords(string table, string idlist, [string column=''], [string references=''], [string removeall='false'])
          deletes any crossreference values not in the list, returns any id that failed insertion
 struct updateManyToManyRelationships()
 
Methods inherited from class datafaucet.system.arschema
ActiveRecordLocale, addTable, fixModifiedColumns, getAuthor, getColumn, getColumns, getCreatedDate, getEditor, getExportedKeys, getForeignKey, getIdentityColumn, getImportedKeys, getInstallScript, getLastModified, getObjectID, getPrimaryColumn, getPrimaryColumnType, getPrimaryProperty, getRequiredColumns, getSchema, getSchemaExport, getSchemaFromProperties, getSchemaTables, getSequence, getTable, getTableArray, getTimeZone, getUninstallDDL, getUpgradeScript, getUpgradeXML, ignoreColumn, install, newID, prepareInsert, prepareUpdate, removeIgnoredColumn, removeIgnoredColumns, removeTable, setColumn, setIdentityValue, setIgnoredColumns, setMetaData, setNewID, setObjectID, setSequence, setTable, throwTableError, uninstall
 
Methods inherited from class datafaucet.system.arutilities
filterSQLStatement, getAllForeignKeys, getColumnMap, getDatasource, getDateProperties, getDefaultLocale, getDefaultTimezone, getForeignKeyValue, getFullTableName, getLocalization, getLock, getORMProperties, getPrimaryKeyData, getProperties, getProtectedColumns, getSQLInsert, getSQLStatement, getSelectStatement, getUTCLocale, hasDatasource, hasLocalization, lock, mapCollectionToProperties, nullForeignKeys, parseDates, queryToStruct, removeNullKeys, setDatasource, setLocalization, setNull, setORMProperties, simplify
 
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

addManyToManyRelationship

public any addManyToManyRelationship(string table, [string column=''], [string references=''], [boolean removeall='true'])

Parameters:
table - the name of the table to join to theq uery
column - the name of the target column in the joined table
references - the name of the source column in the table being adjoined
removeall - indicates if crossreference id's should all be removed before inserting new records

deleteManyToManyRecords

public struct deleteManyToManyRecords(string table, [string idlist=''], [string listtype='IN'], [string column=''], [string references=''])

Parameters:
table - the name of the table to join to theq uery
idlist - comma delimited list of ids to dissociate
listtype - the name of the source column in the table being adjoined
column - the name of the target column in the joined table
references - the name of the source column in the table being adjoined

deleteManyToManyRelationships

private any deleteManyToManyRelationships()


getColumnNames

private string getColumnNames()

Overrides:
getColumnNames in class arschema

getFailedProperties

public struct getFailedProperties()


getManyToManyColumns

private struct getManyToManyColumns(string table, [string column=''], [string references=''], [boolean needreference='true'])

Parameters:
table
column - the name of the target column in the joined table
references - the name of the source column in the table being adjoined
needreference

getManyToManyKeys

private string getManyToManyKeys(string table, [string column=''], [string references=''])

Parameters:
table - the name of the table to join to theq uery
column - the name of the target column in the joined table
references - the name of the source column in the table being adjoined

getManyToManyProperties

public struct getManyToManyProperties()
returns many-to-many properties from the previously loaded object


getManyToManySelect

private any getManyToManySelect(string table, [string column=''], [string references=''], [string local=''], [string select='[runtime expression]'])

Parameters:
table - the name of the many-to-many relationship table
column - the name of the target column in the joined table
references - the name of the source column in the table being adjoined
local - the name of the column in the activerecord table to compare to the xref table
select - columns to return in the query

getManyToManyTable

private string getManyToManyTable(string table, string references='')

Parameters:
table - the name of the many-to-many relationship table
references - the name of the source column in the table being adjoined

insertManyToManyRecords

public string insertManyToManyRecords(string table, string idlist, [string column=''], [string references=''])
inserts all specified values into a crossreference table - returns a comma delimited list of failed inserts which probably resulted from a foreign-key constraint violation

Parameters:
table - the name of the table to join to theq uery
idlist - comma delimited list of ids to associate
column - the name of the target column in the joined table
references - the name of the source column in the table being adjoined

listManyToManyRecords

public query listManyToManyRecords(string table, [string select='*'], [string column=''], [string references=''], [string local=''])

Parameters:
table - the name of the many-to-many relationship table
select - columns to return in the query
column - the name of the target column in the joined table
references - the name of the source column in the table being adjoined
local - the name of the column in the activerecord table to compare to the xref table

readManyToManyProperties

public struct readManyToManyProperties()
returns many-to-many properties from the database


removeManyToManyRelationship

public any removeManyToManyRelationship(string table)

Parameters:
table

setManyToManyRecords

public string setManyToManyRecords(string table, string idlist, [string column=''], [string references=''], [string removeall='false'])
deletes any crossreference values not in the list, returns any id that failed insertion

Parameters:
table - the name of the table to join to theq uery
idlist - comma delimited list of ids to associate
column - the name of the target column in the joined table
references - the name of the source column in the table being adjoined
removeall - if true all records are deleted prior to insertion

updateManyToManyRelationships

public struct updateManyToManyRelationships()


DataFaucet 1.0 Beta