Transfer version 1.1

transfer.com.dynamic
Class ObjectTreeWalker

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

public class ObjectTreeWalker
extends WEB-INF.cftags.component

Allows for traversal of object graphs


Constructor Summary
init(ObjectManager objectManager, MethodInvoker methodInvoker)
          Constructor
 
Method Summary
private MethodInvoker getMethodInvoker()
private ObjectManager getObjectManager()
private any getSystem()
private boolean invokeHas(TransferObject transfer, string name)
          checks to see if the object has a record for a single collection
private void setMethodInvoker(MethodInvoker methodInvoker)
private void setObjectManager(ObjectManager ObjectManager)
private void setSystem(any System)
private void traverse(TransferObject transfer, any visitor, string visitingMethod, struct visitArgs, numeric maxDepth, boolean topDown, boolean forceLoading, [numeric currentDepth='0'], [struct visitedHashs='[runtime expression]'])
          traverses the object graph
private void traverseCollection(TransferObject transfer, string name, boolean forceLoading, struct state)
          traverses a collection of objects
private void traverseSingle(TransferObject transfer, string name, boolean forceLoading, struct state)
          traverses a single link to an object
 void visit(TransferObject transfer, any visitor, string visitingMethod, struct visitArgs, [numeric depth='0'], [boolean topDown='true'], [boolean forceLoading='false'])
          visit each of the objects in the graph
private void visitTransfer(TransferObject transfer, any visitor, string visitingMethod, struct visitArgs)
          visit a single object with the method that is provided
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(ObjectManager objectManager, MethodInvoker methodInvoker)
Constructor

Parameters:
objectManager - Need to object manager for making queries
methodInvoker - The method invoker
Method Detail

getMethodInvoker

private MethodInvoker getMethodInvoker()


getObjectManager

private ObjectManager getObjectManager()


getSystem

private any getSystem()


invokeHas

private boolean invokeHas(TransferObject transfer, string name)
checks to see if the object has a record for a single collection

Parameters:
transfer - the transfer object
name - the name of the collection

setMethodInvoker

private void setMethodInvoker(MethodInvoker methodInvoker)

Parameters:
methodInvoker

setObjectManager

private void setObjectManager(ObjectManager ObjectManager)

Parameters:
ObjectManager

setSystem

private void setSystem(any System)

Parameters:
System

traverse

private void traverse(TransferObject transfer, any visitor, string visitingMethod, struct visitArgs, numeric maxDepth, boolean topDown, boolean forceLoading, [numeric currentDepth='0'], [struct visitedHashs='[runtime expression]'])
traverses the object graph

Parameters:
transfer - the starting object to visit
visitor - the visitor object
visitingMethod - the name of the method that is being visited
visitArgs - visiting arguments, if there are any
maxDepth - the max depth to go to
topDown - travel top down, rather than bottom up
forceLoading - if not loaded, force loading
currentDepth - the max depth to go to
visitedHashs - A struct of the identity hash codes, so we know what has been hit

traverseCollection

private void traverseCollection(TransferObject transfer, string name, boolean forceLoading, struct state)
traverses a collection of objects

Parameters:
transfer - the transfer object
name - the name of the collection
forceLoading - if not loaded, force loading
state - the state of the traversal

traverseSingle

private void traverseSingle(TransferObject transfer, string name, boolean forceLoading, struct state)
traverses a single link to an object

Parameters:
transfer - the transfer object
name - the name of the collection
forceLoading - if not loaded, force loading
state - the state of the traversal

visit

public void visit(TransferObject transfer, any visitor, string visitingMethod, struct visitArgs, [numeric depth='0'], [boolean topDown='true'], [boolean forceLoading='false'])
visit each of the objects in the graph

Parameters:
transfer - the starting object to visit
visitor - the visitor object
visitingMethod - the name of the method that is being visited
visitArgs - visiting arguments, if there are any
depth - the max depth to go to
topDown - travel top down, rather than bottom up
forceLoading - if not loaded, force loading

visitTransfer

private void visitTransfer(TransferObject transfer, any visitor, string visitingMethod, struct visitArgs)
visit a single object with the method that is provided

Parameters:
transfer - the starting object to visit
visitor - the visitor object
visitingMethod - the name of the method that is being visited
visitArgs - visiting arguments, if there are any

Transfer version 1.1