Transfer version 1.1

transfer.com.dynamic
Class TransferPopulator

WEB-INF.cftags.component
        extended by transfer.com.dynamic.TransferPopulator

public class TransferPopulator
extends WEB-INF.cftags.component

Populates a Transfer Objects with Query information


Constructor Summary
init(SQLManager sqlManager, ObjectManager objectManager, JavaLoader javaLoader)
          Constructor
 
Method Summary
 any _dump([any s], [any abort='true'])
private void buildCompositeKeyMemento(struct memento, Object object, query query)
          builds the composite key memento
private struct buildMemento(query qObject, [boolean lazyLoad='false'])
          Builds a memento from a object and query
private JavaLoader getJavaLoader()
private MethodInvoker getMethodInvoker()
private ObjectManager getObjectManager()
private SQLManager getSQLManager()
 struct invokeCompositeKey(TransferObject transfer, CompositeKey primaryKey)
          returns a composite key for the given object
private any invokePrimarykey(TransferObject transfer, AbstractBaseKey primaryKey)
          returns a primary key value for a given object
 void populate(TransferObject transfer, any key)
          Populates a Transfer object with query data
private void populateCollectionProperty(struct memento, Object object, Collection collection, query qObject)
          populates the memento with the collection property value
private void populateCompositeParentOneToManyMemento(struct memento, CompositeKey compositeKey, query qObject)
          populates the memento with parent one to many values, from a composite. Used for proxies
 void populateManyToMany(TransferObject transfer, string name)
          populates manytomany data into the object for lazy load
 void populateManyToOne(TransferObject transfer, string name)
          populates many to one data into the object for lazy load
 void populateOneToMany(TransferObject transfer, string name)
          populates onetomany data into the object for lazy load
 void populateParentOneToMany(TransferObject transfer, string name)
          populates parent onetomany data into the object for lazy load
private void populateParentOneToManyMemento(struct memento, Object object, query qObject)
          populates the memento with parent one to many values
private void populateParentOneToManyMementoByIterator(struct memento, any iterator, query qObject)
          populates the memento with parent one to many values, with a passed in iterator
private void populatePropertyMemento(struct memento, Object object, query qObject)
          populates the memento with property values
private void populateProxyPropertyMapMemento(struct memento, Object object, query qObject)
          populates the memento with parent one to many values
private void setJavaLoader(JavaLoader JavaLoader)
private void setMethodInvoker(MethodInvoker MethodInvoker)
private void setObjectManager(ObjectManager ObjectManager)
private void setSQLManager(SQLManager SQLManager)
private any throw(string type, string message, [string detail=''])
          Throws an Exception
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(SQLManager sqlManager, ObjectManager objectManager, JavaLoader javaLoader)
Constructor

Parameters:
sqlManager - The SQL Manager
objectManager - Need to object manager for making queries
javaLoader - The java loader for the apache commons
Method Detail

_dump

public any _dump([any s], [any abort='true'])

Parameters:
s
abort

buildCompositeKeyMemento

private void buildCompositeKeyMemento(struct memento, Object object, query query)
builds the composite key memento

Parameters:
memento - the memento to append to
object - the object BO
query - the query that the data is coming from

buildMemento

private struct buildMemento(query qObject, [boolean lazyLoad='false'])
Builds a memento from a object and query

Parameters:
qObject - The query that has the data
lazyLoad - if this is a lazy load

getJavaLoader

private JavaLoader getJavaLoader()


getMethodInvoker

private MethodInvoker getMethodInvoker()


getObjectManager

private ObjectManager getObjectManager()


getSQLManager

private SQLManager getSQLManager()


invokeCompositeKey

public struct invokeCompositeKey(TransferObject transfer, CompositeKey primaryKey)
returns a composite key for the given object

Parameters:
transfer - The transfer to load into
primaryKey - the primary key

invokePrimarykey

private any invokePrimarykey(TransferObject transfer, AbstractBaseKey primaryKey)
returns a primary key value for a given object

Parameters:
transfer - The transfer to load into
primaryKey - the primary key

populate

public void populate(TransferObject transfer, any key)
Populates a Transfer object with query data

Parameters:
transfer - The transfer object to populate
key - Key for the BO

populateCollectionProperty

private void populateCollectionProperty(struct memento, Object object, Collection collection, query qObject)
populates the memento with the collection property value

Parameters:
memento - the memento to be set
object - the object meta data
collection - the collection meta data
qObject - the query for teh object

populateCompositeParentOneToManyMemento

private void populateCompositeParentOneToManyMemento(struct memento, CompositeKey compositeKey, query qObject)
populates the memento with parent one to many values, from a composite. Used for proxies

Parameters:
memento - the memento to be set
compositeKey - the composite id
qObject - the query for teh object

populateManyToMany

public void populateManyToMany(TransferObject transfer, string name)
populates manytomany data into the object for lazy load

Parameters:
transfer - The transfer to load into
name - The name of the manytoone to load

populateManyToOne

public void populateManyToOne(TransferObject transfer, string name)
populates many to one data into the object for lazy load

Parameters:
transfer - The transfer to load into
name - The name of the manytoone to load

populateOneToMany

public void populateOneToMany(TransferObject transfer, string name)
populates onetomany data into the object for lazy load

Parameters:
transfer - The transfer to load into
name - The name of the manytoone to load

populateParentOneToMany

public void populateParentOneToMany(TransferObject transfer, string name)
populates parent onetomany data into the object for lazy load

Parameters:
transfer - The transfer to load into
name - The name of the external onetomany to load

populateParentOneToManyMemento

private void populateParentOneToManyMemento(struct memento, Object object, query qObject)
populates the memento with parent one to many values

Parameters:
memento - the memento to be set
object - the object meta data
qObject - the query for teh object

populateParentOneToManyMementoByIterator

private void populateParentOneToManyMementoByIterator(struct memento, any iterator, query qObject)
populates the memento with parent one to many values, with a passed in iterator

Parameters:
memento - the memento to be set
iterator - a java.util.Iterator containing ParentOneToMany
qObject - the query for teh object

populatePropertyMemento

private void populatePropertyMemento(struct memento, Object object, query qObject)
populates the memento with property values

Parameters:
memento - the memento to be set
object - the object meta data
qObject - the query for teh object

populateProxyPropertyMapMemento

private void populateProxyPropertyMapMemento(struct memento, Object object, query qObject)
populates the memento with parent one to many values

Parameters:
memento - the memento to be set
object - the object meta data
qObject - the query for teh object

setJavaLoader

private void setJavaLoader(JavaLoader JavaLoader)

Parameters:
JavaLoader

setMethodInvoker

private void setMethodInvoker(MethodInvoker MethodInvoker)

Parameters:
MethodInvoker

setObjectManager

private void setObjectManager(ObjectManager ObjectManager)

Parameters:
ObjectManager

setSQLManager

private void setSQLManager(SQLManager SQLManager)

Parameters:
SQLManager

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