Loaded via coldspring
<cffunction name="onApplicationStart" returnType="boolean"
output="false">
<cfset coldspringConfig =
"/quickconnects/config/coldspring.xml">
<cfset application.coldspring = createObject('component',
'coldspring.beans.DefaultXmlBeanFactory').init() >
<cfset application.coldspring.loadBeans(coldspringConfig)>
<cfset application.settings = application.coldspring.getBean
("configBean").getEnvironmentByUrl(CGI.SERVER_NAME)>
<cfset application.userService = application.coldspring.getBean
("UserService")>
<cfreturn true>
</cffunction>
I have an abstract service
<cffunction name="new" access="public" output="false"
returntype="any" hint="I return a new transfer object by object
name.">
<cfreturn getGateway(getClassName()).new()>
</cffunction>
<cffunction name="get" access="public" output="false"
returntype="any" hint="I return a Transfer object by object name and
key.">
<cfargument name="key" type="any" required="false" default="0"
hint="The key to retireve the object by.">
<cfif arguments.key EQ 0>
<cfreturn new()>
<cfelse>
<cfreturn getGateway(getClassName()).get(arguments.key)>
</cfif>
</cffunction>
That calls a gateway
<cffunction name="get" access="public" output="false"
returntype="any" hint="I return a Transfer object by key.">
<cfargument name="key" type="any" required="true" hint="The key
used
to retrieve a Transfer object. Can be a simple value for objects with
a single Primary key, or a struct for object with a composite id.">
<cfreturn getTransfer().get(getClassName(),arguments.key)>
</cffunction>
--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
You received this message because you are subscribed to the Google Groups
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---