DAOFactory

Package: machii_info_sample.model.dao
Method Summary
public DAOFactory init(string dsn)
public any getCategoryDAO()
public any getCommentDAO()
public DAOFactory getDAOFactory(string factoryType)
public any getFaqDAO()
public any getUserDAO()
Method Detail
getCategoryDAO

public any getCategoryDAO( )

Parameters:

Code:

	<cffunction name="getCategoryDAO" access="public" >
		<cfabort showerror="This Method is Abstract and needs to be overridden">
	</cffunction> 

getCommentDAO

public any getCommentDAO( )

Parameters:

Code:

	<cffunction name="getCommentDAO" access="public" >
		<cfabort showerror="This Method is Abstract and needs to be overridden">
	</cffunction> 

getDAOFactory

public DAOFactory getDAOFactory( string factoryType )

Parameters:
string factoryType

Code:

	<cffunction name="getDAOFactory" access="public" returntype="machii_info_sample.model.dao.DAOFactory" output="false">
		<cfargument name="factoryType" type="string" required="Yes" />  
		<cfset var returnDAOFactory = "">	  
		<cfswitch expression="#ucase(arguments.factoryType)#">
			<cfcase value="ACCESS">
				<cfset returnDAOFactory = createObject("component","machii_info_sample.model.dao.DAOFactory_access").init(variables.dsn) />
			</cfcase>
			<cfcase value="MSSQL">
				
				<cfset returnDAOFactory = createObject("component","machii_info_sample.model.dao.DAOFactory_mssql").init(variables.dsn) />
			</cfcase>
			<cfcase value="MYSQL">
				<cfset returnDAOFactory = createObject("component","machii_info_sample.model.dao.DAOFactory_mysql").init(variables.dsn) />
			</cfcase>
		</cfswitch>
		<cfreturn returnDAOFactory />
	</cffunction> 

getFaqDAO

public any getFaqDAO( )

Parameters:

Code:

	<cffunction name="getFaqDAO" access="public" >
		<cfabort showerror="This Method is Abstract and needs to be overridden">
	</cffunction> 

getUserDAO

public any getUserDAO( )

Parameters:

Code:

	<cffunction name="getUserDAO" access="public" >
		<cfabort showerror="This Method is Abstract and needs to be overridden">
	</cffunction> 

init

public DAOFactory init( string dsn )

Parameters:
string dsn

Code:

	<cffunction name="init" access="public" returntype="machii_info_sample.model.dao.DAOFactory">		
		<cfargument name="dsn" type="string" required="true" />		
		<cfscript>			
			variables.dsn = arguments.dsn;
		</cfscript>		
		<cfreturn this />
	</cffunction>