Transfer version 1.1

transfer.com.object
Class ObjectDAO

WEB-INF.cftags.component
        extended by transfer.com.object.ObjectDAO

public class ObjectDAO
extends WEB-INF.cftags.component

DAO for object definitions


Constructor Summary
init(XMLFileReader configReader)
          Constructor
 
Method Summary
private void buildCollectionMemento(struct memento, xml xMany)
          Builds a collection memento
private void buildCompositeKeyMemento(string objectname, struct memento, xml xProperty)
          Builds a composite key memento
private void buildCompositionMemento(struct memento, xml xComposition)
          Builds a memento for a basic composition
private void buildFunctionArrayMemento(struct memento, xml xObject)
          Buils the memento for Custom Functions
private void buildManyToManyArrayMemento(struct memento, xml xObject, string class)
          Build a memento for ManyToMany links
private void buildManyToOneArrayMemento(struct memento, xml xObject)
          Build a memento for ManyToOne links
private void buildOneToManyArrayMemento(struct memento, xml xObject)
          Build a memento for OneToMany links
private void buildParentOneToManyArrayMemento(struct memento, string className)
          Builds a memento for the parents of this object
private void buildPrimaryKeyMemento(string objectname, struct memento, xml xProperty)
          Builds a primary key memento
private void buildPropertyArrayMemento(string objectname, struct memento, xml xObject)
          Builds the property part of the memento
private void buildPropertyMemento(string objectname, struct memento, xml xProperty)
          Builds a memento for a singular property
private query getClassNameByOneToManyLinkTo(string className)
          Retrives the class names of all objects that have a One to Many relationship with this class. Query Columns are: OneToManyName,className,linkColumn
private XMLFileReader getConfigReader()
 Object getObject(Object Object, string class)
          Gets the object BO of a given defintion
 string getObjectHash(string className, string configXML)
          returns the unique hash for an object
private string getParentPath(string Name, [string table=''], [string path=''], [string xpath=''])
          Gets the parent of an item
private void setConfigReader(XMLFileReader ConfigReader)
private void setMementoDefault(struct memento, string key, string default)
          Searches for a value, if it doesn't exist, sets a default
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(XMLFileReader configReader)
Constructor

Parameters:
configReader - The XML Reader for the config file
Method Detail

buildCollectionMemento

private void buildCollectionMemento(struct memento, xml xMany)
Builds a collection memento

Parameters:
memento - The memento to append the table to
xMany - The object xmlElem

buildCompositeKeyMemento

private void buildCompositeKeyMemento(string objectname, struct memento, xml xProperty)
Builds a composite key memento

Parameters:
objectname - The name of the object
memento - The memento to append the property to
xProperty - The composite xmlElem

buildCompositionMemento

private void buildCompositionMemento(struct memento, xml xComposition)
Builds a memento for a basic composition

Parameters:
memento - The memento to append the table to
xComposition - The composition xmlElem

buildFunctionArrayMemento

private void buildFunctionArrayMemento(struct memento, xml xObject)
Buils the memento for Custom Functions

Parameters:
memento - The memento to append the table to
xObject - The object xmlElem

buildManyToManyArrayMemento

private void buildManyToManyArrayMemento(struct memento, xml xObject, string class)
Build a memento for ManyToMany links

Parameters:
memento - The memento to append the table to
xObject - The object xmlElem
class - The name of the package and class

buildManyToOneArrayMemento

private void buildManyToOneArrayMemento(struct memento, xml xObject)
Build a memento for ManyToOne links

Parameters:
memento - The memento to append the table to
xObject - The object xmlElem

buildOneToManyArrayMemento

private void buildOneToManyArrayMemento(struct memento, xml xObject)
Build a memento for OneToMany links

Parameters:
memento - The memento to append the table to
xObject - The object xmlElem

buildParentOneToManyArrayMemento

private void buildParentOneToManyArrayMemento(struct memento, string className)
Builds a memento for the parents of this object

Parameters:
memento - The memento to append the property to
className - The classname of the object

buildPrimaryKeyMemento

private void buildPrimaryKeyMemento(string objectname, struct memento, xml xProperty)
Builds a primary key memento

Parameters:
objectname - The name of the object
memento - The memento to append the property to
xProperty - The property xmlElem

buildPropertyArrayMemento

private void buildPropertyArrayMemento(string objectname, struct memento, xml xObject)
Builds the property part of the memento

Parameters:
objectname - The name of the object
memento - The memento to append the table to
xObject - The object xmlElem

buildPropertyMemento

private void buildPropertyMemento(string objectname, struct memento, xml xProperty)
Builds a memento for a singular property

Parameters:
objectname - The name of the object
memento - The memento to append the property to
xProperty - The property xmlElem

getClassNameByOneToManyLinkTo

private query getClassNameByOneToManyLinkTo(string className)
Retrives the class names of all objects that have a One to Many relationship with this class. Query Columns are: OneToManyName,className,linkColumn

Parameters:
className - The classname to search on

getConfigReader

private XMLFileReader getConfigReader()


getObject

public Object getObject(Object Object, string class)
Gets the object BO of a given defintion

Parameters:
Object - The Object BO to populate
class - The name of the package and class

getObjectHash

public string getObjectHash(string className, string configXML)
returns the unique hash for an object

Parameters:
className - the name of the class
configXML - the xml config string

getParentPath

private string getParentPath(string Name, [string table=''], [string path=''], [string xpath=''])
Gets the parent of an item

Parameters:
Name - The name of the object
table - The name of the table for the object
path - The path we're on
xpath - The xpath that is currently set

setConfigReader

private void setConfigReader(XMLFileReader ConfigReader)

Parameters:
ConfigReader

setMementoDefault

private void setMementoDefault(struct memento, string key, string default)
Searches for a value, if it doesn't exist, sets a default

Parameters:
memento - The memento that is being built
key - The key that is to be checked
default - The default value to be set

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