Transfer version 1.1

transfer.com.sql
Class TransferUpdater

WEB-INF.cftags.component
        extended by transfer.com.sql.AbstractBaseTransfer
            extended by transfer.com.sql.TransferUpdater

public class TransferUpdater
extends AbstractBaseTransfer

Does the update of a transfer object on the DB


Constructor Summary
init(Datasource Datasource, ObjectManager objectManager, Nullable nullable, TQLConverter tQLConverter, QueryExecutionPool queryExecutionPool, QueryCache queryCache, Transaction transaction)
          Constructor
 
Method Summary
private Query buildDeleteManyToMany(TransferObject transfer, ManyToMany manytomany)
          builds the many to many delete
 Query buildInsertManyToMany(Object object, ManyToMany manytomany)
          builds tehe query for inserting a many to many
private Query buildUpdateBasic(TransferObject transfer)
          builds the query for the basic update
private void deleteManyToMany(TransferObject transfer, ManyToMany manytomany)
          deletes all the many to many connections
private Nullable getNullable()
private TQLConverter getTQLConverter()
private void insertManyToMany(TransferObject transfer, ManyToMany manytomany)
          Updates the many to many portion of the transfer
private void setNullable(Nullable Nullable)
private void setTQLConverter(TQLConverter TQLConverter)
 void update(TransferObject transfer, boolean useTransaction)
          Updates the Transfer in the DB
private void updateBasic(TransferObject transfer)
          Updates the single table portion of the transfer element table
private void updateBlock(TransferObject transfer)
          run the update
private void updateManyToMany(TransferObject transfer)
          Updates the many to many portion of the transfer
 
Methods inherited from class transfer.com.sql.AbstractBaseTransfer
andSeperator, commaSeperator, equalsString, getDatasource, getMethodInvoker, getObjectManager, getQueryCache, getQueryExecutionPool, getTransaction, invokeGetPrimaryKey, isString, mapCompositeKey, mapPrimaryKey, mapSingularKey, nullString, setCompositeKey, setDatasource, setMethodInvoker, setObjectManager, setPrimaryKey, setQueryCache, setQueryExecutionPool, setSingularKey, setTransaction, throw
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(Datasource Datasource, ObjectManager objectManager, Nullable nullable, TQLConverter tQLConverter, QueryExecutionPool queryExecutionPool, QueryCache queryCache, Transaction transaction)
Constructor

Parameters:
Datasource - The datasource BO
objectManager - Need to object manager for making queries
nullable - The nullable class
tQLConverter - Converter for {property} statements
queryExecutionPool - the query execution pool
queryCache - the query object cache
transaction
Method Detail

buildDeleteManyToMany

private Query buildDeleteManyToMany(TransferObject transfer, ManyToMany manytomany)
builds the many to many delete

Parameters:
transfer - The transferObject to update
manytomany - the many to many to delete

buildInsertManyToMany

public Query buildInsertManyToMany(Object object, ManyToMany manytomany)
builds tehe query for inserting a many to many

Parameters:
object - the object that the insert is for
manytomany - the many to many that is being inserted

buildUpdateBasic

private Query buildUpdateBasic(TransferObject transfer)
builds the query for the basic update

Parameters:
transfer - The transferObject to update

deleteManyToMany

private void deleteManyToMany(TransferObject transfer, ManyToMany manytomany)
deletes all the many to many connections

Parameters:
transfer - The transferObject to update
manytomany - the many to many to delete

getNullable

private Nullable getNullable()


getTQLConverter

private TQLConverter getTQLConverter()


insertManyToMany

private void insertManyToMany(TransferObject transfer, ManyToMany manytomany)
Updates the many to many portion of the transfer

Parameters:
transfer - The transferObject to update
manytomany - the many to many to delete

setNullable

private void setNullable(Nullable Nullable)

Parameters:
Nullable

setTQLConverter

private void setTQLConverter(TQLConverter TQLConverter)

Parameters:
TQLConverter

update

public void update(TransferObject transfer, boolean useTransaction)
Updates the Transfer in the DB

Parameters:
transfer - The transferObject to update
useTransaction - Whether or not to use an internal transaction block

updateBasic

private void updateBasic(TransferObject transfer)
Updates the single table portion of the transfer element table

Parameters:
transfer - The transferObject to update

updateBlock

private void updateBlock(TransferObject transfer)
run the update

Parameters:
transfer - The transferObject to update

updateManyToMany

private void updateManyToMany(TransferObject transfer)
Updates the many to many portion of the transfer

Parameters:
transfer - The transferObject to update

Transfer version 1.1