Transfer version 1.1

transfer.com.dynamic
Class KeyRationalise

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

public class KeyRationalise
extends WEB-INF.cftags.component

Handles and standardises the key values of a TransferObject


Constructor Summary
init(ObjectManager objectManager, Utility utility)
          Constructor
 
Method Summary
private string buildCompositeKey(Object object, struct key)
          builds the composite key string from the struct
 struct buildCompositeKeyMapFromQuery(CompositeKey compositeKey, query query)
          builds a composite key from the query
 string cleanKey(Property property, string key)
          Makes sure the key is formatted properly
private ObjectManager getObjectManager()
private Utility getUtility()
 string rationaliseKey(string class, any key)
          builds the key to a string, formatting depending on the primary key type
private void setObjectManager(ObjectManager ObjectManager)
private void setUtility(Utility Utility)
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(ObjectManager objectManager, Utility utility)
Constructor

Parameters:
objectManager - Need to object manager for making queries
utility - Util class
Method Detail

buildCompositeKey

private string buildCompositeKey(Object object, struct key)
builds the composite key string from the struct

Parameters:
object - the object to build the composite key string for
key - the identifier key for the object

buildCompositeKeyMapFromQuery

public struct buildCompositeKeyMapFromQuery(CompositeKey compositeKey, query query)
builds a composite key from the query

Parameters:
compositeKey - the composite key obejct
query - the query to pull data from, assumed single row

cleanKey

public string cleanKey(Property property, string key)
Makes sure the key is formatted properly

Parameters:
property - the property to clean from
key - The key for the id of the data

getObjectManager

private ObjectManager getObjectManager()


getUtility

private Utility getUtility()


rationaliseKey

public string rationaliseKey(string class, any key)
builds the key to a string, formatting depending on the primary key type

Parameters:
class - The name of the class
key - The key for the id of the data

setObjectManager

private void setObjectManager(ObjectManager ObjectManager)

Parameters:
ObjectManager

setUtility

private void setUtility(Utility Utility)

Parameters:
Utility

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