forked from pspc-spac/supermodel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gateway.cfc
24 lines (19 loc) · 808 Bytes
/
gateway.cfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<cfcomponent>
<cffunction name="init" access="public" returntype="void">
<cfargument name="dsn" type="string" required="yes" />
<cfset variables.dsn = arguments.dsn />
<cfset configure() />
</cffunction>
<cffunction name="configure" access="private" returntype="void">
<!--- Implemented in child class if needed --->
</cffunction>
<cffunction name="list" access="private" returntype="list">
<cfargument name="component" type="string" required="yes" />
<cfargument name="query" type="query" required="yes" />
<cfset var list = createObject('component', 'list') />
<cfset var object = createObject('component', arguments.component) />
<cfset object.init(variables.dsn) />
<cfset list.init(object, query) />
<cfreturn list />
</cffunction>
</cfcomponent>