Transfer version 1.1

transfer.com.sql
Class AbstractBaseTransfer

WEB-INF.cftags.component
        extended by transfer.com.sql.AbstractBaseTransfer
Direct Known Subclasses:
TransferDeleter , TransferInserter , TransferRefresher , TransferSelecter , TransferUpdater

public class AbstractBaseTransfer
extends WEB-INF.cftags.component

Abstract base class for all TransferObject related CRUD SQL statements


Constructor Summary
private init(Datasource datasource, ObjectManager objectManager, QueryExecutionPool queryExecutionPool, QueryCache queryCache, Transaction transaction)
          Constructor
 
Method Summary
private boolean andSeperator(Query query, boolean isFirst)
          seperates mappings with AND
private boolean commaSeperator(Query query, boolean isFirst)
          seperates values with commas
private string equalsString()
          returns ' = '
private Datasource getDatasource()
private MethodInvoker getMethodInvoker()
private ObjectManager getObjectManager()
private QueryCache getQueryCache()
private QueryExecutionPool getQueryExecutionPool()
private Transaction getTransaction()
private any invokeGetPrimaryKey(TransferObject transfer)
          Gets the primary key value from an object
private string isString()
          returns ' IS '
private void mapCompositeKey(Query query, Object object, [string table])
          maps a composite key
private void mapPrimaryKey(Query query, Object object, [string column], [string table], [boolean ignoreColumn='false'])
          maps the primary key to the query
private void mapSingularKey(Query query, Object object, [string column], [string table], [boolean ignoreColumn='false'])
          maps a singular key
private string nullString()
          returns ' NULL '
private void setCompositeKey(QueryExecution queryExec, [TransferObject transfer], [Object object], [struct key])
          sets the composite key value to a query
private void setDatasource(Datasource Datasource)
private void setMethodInvoker(MethodInvoker MethodInvoker)
private void setObjectManager(ObjectManager ObjectManager)
private void setPrimaryKey(QueryExecution queryExec, [TransferObject transfer], [Object object], [any key], [boolean setOperator='yes'])
          sets the value of the primary key to the query execution
private void setQueryCache(QueryCache QueryCache)
private void setQueryExecutionPool(QueryExecutionPool QueryExecutionPool)
private void setSingularKey(QueryExecution queryExec, [TransferObject transfer], [Object object], [string key], [boolean setOperator='yes'])
          sets the singular key value
private void setTransaction(Transaction transaction)
private any throw(string type, string message, [string detail=''])
          Throws an Exception
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

private init(Datasource datasource, ObjectManager objectManager, QueryExecutionPool queryExecutionPool, QueryCache queryCache, Transaction transaction)
Constructor

Parameters:
datasource - The datasource BO
objectManager - Need to object manager for making queries
queryExecutionPool - the query execution pool
queryCache - the query object cache
transaction
Method Detail

andSeperator

private boolean andSeperator(Query query, boolean isFirst)
seperates mappings with AND

Parameters:
query - the query object
isFirst - if this is the first request to for the comma

commaSeperator

private boolean commaSeperator(Query query, boolean isFirst)
seperates values with commas

Parameters:
query - the query object
isFirst - if this is the first request to for the comma

equalsString

private string equalsString()
returns ' = '


getDatasource

private Datasource getDatasource()


getMethodInvoker

private MethodInvoker getMethodInvoker()


getObjectManager

private ObjectManager getObjectManager()


getQueryCache

private QueryCache getQueryCache()


getQueryExecutionPool

private QueryExecutionPool getQueryExecutionPool()


getTransaction

private Transaction getTransaction()


invokeGetPrimaryKey

private any invokeGetPrimaryKey(TransferObject transfer)
Gets the primary key value from an object

Parameters:
transfer - The transfer object to insert

isString

private string isString()
returns ' IS '


mapCompositeKey

private void mapCompositeKey(Query query, Object object, [string table])
maps a composite key

Parameters:
query - the query object
object - the object for the given transfer
table - specifies a table

mapPrimaryKey

private void mapPrimaryKey(Query query, Object object, [string column], [string table], [boolean ignoreColumn='false'])
maps the primary key to the query

Parameters:
query - the query object
object - the object for the given transfer
column - an overwriting column, other than the primary key
table - specifies a table
ignoreColumn - ignores the column, and just places the mapping

mapSingularKey

private void mapSingularKey(Query query, Object object, [string column], [string table], [boolean ignoreColumn='false'])
maps a singular key

Parameters:
query - the query object
object - the object for the given transfer
column - an overwriting column, other than the primary key
table - specifies a table
ignoreColumn - ignores the column, and just places the mapping

nullString

private string nullString()
returns ' NULL '


setCompositeKey

private void setCompositeKey(QueryExecution queryExec, [TransferObject transfer], [Object object], [struct key])
sets the composite key value to a query

Parameters:
queryExec - the query object
transfer - the transfer object
object - The Object BO
key - the key to set the primary key value to

setDatasource

private void setDatasource(Datasource Datasource)

Parameters:
Datasource

setMethodInvoker

private void setMethodInvoker(MethodInvoker MethodInvoker)

Parameters:
MethodInvoker

setObjectManager

private void setObjectManager(ObjectManager ObjectManager)

Parameters:
ObjectManager

setPrimaryKey

private void setPrimaryKey(QueryExecution queryExec, [TransferObject transfer], [Object object], [any key], [boolean setOperator='yes'])
sets the value of the primary key to the query execution

Parameters:
queryExec - the query object
transfer - the transfer object
object - The Object BO
key - the key to set the primary key value to
setOperator - adds the equals operator

setQueryCache

private void setQueryCache(QueryCache QueryCache)

Parameters:
QueryCache

setQueryExecutionPool

private void setQueryExecutionPool(QueryExecutionPool QueryExecutionPool)

Parameters:
QueryExecutionPool

setSingularKey

private void setSingularKey(QueryExecution queryExec, [TransferObject transfer], [Object object], [string key], [boolean setOperator='yes'])
sets the singular key value

Parameters:
queryExec - the query object
transfer - the transfer object
object - The Object BO
key - the key to set the primary key value to
setOperator - adds the equals operator

setTransaction

private void setTransaction(Transaction transaction)

Parameters:
transaction

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