Transfer version 1.1

transfer.com
Class TransferObjectProxy

WEB-INF.cftags.component
        extended by transfer.com.TransferObject
            extended by transfer.com.TransferObjectProxy

public class TransferObjectProxy
extends TransferObject

A Proxy for TransferObjects


Constructor Summary
init(string className, any key, Object object, Transfer transfer, DynamicManager dynamicManager, struct propertyMap)
          Constructor
 
Method Summary
 TransferObject clone()
          Get a deep clone of this object
private DynamicManager getDynamicManager()
private string getFlatKey()
 boolean getIsDirty()
          If this object's data is differnt from that stored in the DB.
 boolean getIsLoaded()
          Whether or not the proxy has loaded the the object its proxying
 boolean getIsPersisted()
          If this object is stored in the database
 boolean getIsProxy()
          returns whether or not this is a proxy object
private any getKey()
 TransferObject getLoadedObject()
          Returns the proxied object. This will force a loading of the object
 struct getMemento()
          If not loaded, returns the proxy memento, else, proxy's the method
 TransferObject getOriginalTransferObject([boolean returnProxyOnNotLoaded='false'])
          Returns the underlying TransferObject, will never return the proxy, or the decorator (forces a load)
private AbstractBaseKey getPrimaryKey()
private string getPrimaryKeyMethod()
private struct getPropertyMap()
private struct getProxyMemento()
          returns the memento for this proxy
private TransferObject getTransferObject()
 any onMissingMethod(string missingMethodName, struct missingMethodArguments)
          wires the invocation to the tranfserObject proxy
private any proxy(string methodName, [struct args='[runtime expression]'])
          proxy a method, and arguments
private void setDynamicManager(DynamicManager dynamicManager)
private void setFlatKey(string flatKey)
package void setIsClone(boolean isClone)
package void setIsDirty(boolean isDirty)
private void setIsLoaded(boolean isLoaded)
package void setIsPersisted(boolean isPersisted)
private void setKey(any key)
private void setPrimaryKey(AbstractBaseKey PrimaryKey)
private void setPrimaryKeyMethod(string PrimaryKeyMethod)
private void setPropertyMap(struct propertyMap)
private void setTransferObject(TransferObject TransferObject)
 
Methods inherited from class transfer.com.TransferObject
createTransferObject, getClassName, getComposite, getIsClone, getLoaded, getNullable, getSystem, getThisObject, getTransfer, getUtility, sameTransfer, setClassName, setLoaded, setNullable, setSystem, setThisObject, setTransfer, setUtility, throw
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(string className, any key, Object object, Transfer transfer, DynamicManager dynamicManager, struct propertyMap)
Constructor

Parameters:
className - the class name of the proxy
key - the primary key value
object - the object that represents this Transfer Object
transfer - the transfer lib
dynamicManager - the dynamic manager
propertyMap - a property map of values that are stored for sorting, and structure keys
Method Detail

clone

public TransferObject clone()
Get a deep clone of this object

Overrides:
clone in class TransferObject

getDynamicManager

private DynamicManager getDynamicManager()


getFlatKey

private string getFlatKey()


getIsDirty

public boolean getIsDirty()
If this object's data is differnt from that stored in the DB.

Overrides:
getIsDirty in class TransferObject

getIsLoaded

public boolean getIsLoaded()
Whether or not the proxy has loaded the the object its proxying

Overrides:
getIsLoaded in class TransferObject

getIsPersisted

public boolean getIsPersisted()
If this object is stored in the database

Overrides:
getIsPersisted in class TransferObject

getIsProxy

public boolean getIsProxy()
returns whether or not this is a proxy object

Overrides:
getIsProxy in class TransferObject

getKey

private any getKey()


getLoadedObject

public TransferObject getLoadedObject()
Returns the proxied object. This will force a loading of the object

Overrides:
getLoadedObject in class TransferObject

getMemento

public struct getMemento()
If not loaded, returns the proxy memento, else, proxy's the method


getOriginalTransferObject

public TransferObject getOriginalTransferObject([boolean returnProxyOnNotLoaded='false'])
Returns the underlying TransferObject, will never return the proxy, or the decorator (forces a load)

Overrides:
getOriginalTransferObject in class TransferObject
Parameters:
returnProxyOnNotLoaded - if the proxied object is not loaded, force a return of the proxy instead. This is used for setIsDirty, setIsPersisted and setIsClone

getPrimaryKey

private AbstractBaseKey getPrimaryKey()


getPrimaryKeyMethod

private string getPrimaryKeyMethod()


getPropertyMap

private struct getPropertyMap()


getProxyMemento

private struct getProxyMemento()
returns the memento for this proxy


getTransferObject

private TransferObject getTransferObject()


onMissingMethod

public any onMissingMethod(string missingMethodName, struct missingMethodArguments)
wires the invocation to the tranfserObject proxy

Parameters:
missingMethodName -
missingMethodArguments -

proxy

private any proxy(string methodName, [struct args='[runtime expression]'])
proxy a method, and arguments

Parameters:
methodName - the method name
args - the arguments

setDynamicManager

private void setDynamicManager(DynamicManager dynamicManager)

Parameters:
dynamicManager

setFlatKey

private void setFlatKey(string flatKey)

Parameters:
flatKey

setIsClone

package void setIsClone(boolean isClone)

Overrides:
setIsClone in class TransferObject
Parameters:
isClone

setIsDirty

package void setIsDirty(boolean isDirty)

Overrides:
setIsDirty in class TransferObject
Parameters:
isDirty

setIsLoaded

private void setIsLoaded(boolean isLoaded)

Parameters:
isLoaded

setIsPersisted

package void setIsPersisted(boolean isPersisted)

Overrides:
setIsPersisted in class TransferObject
Parameters:
isPersisted

setKey

private void setKey(any key)

Parameters:
key

setPrimaryKey

private void setPrimaryKey(AbstractBaseKey PrimaryKey)

Parameters:
PrimaryKey

setPrimaryKeyMethod

private void setPrimaryKeyMethod(string PrimaryKeyMethod)

Parameters:
PrimaryKeyMethod

setPropertyMap

private void setPropertyMap(struct propertyMap)

Parameters:
propertyMap

setTransferObject

private void setTransferObject(TransferObject TransferObject)

Parameters:
TransferObject

Transfer version 1.1