com.softslate.commerce.daos.core
Interface DAOFactory

All Known Implementing Classes:
BaseDAOFactory, HibernateDAOFactory, LegacyDAOFactory

public interface DAOFactory

Author:
David Tobey

Method Summary
 void beginTransaction()
           
 void closeSession()
           
 void commitTransaction()
           
 java.lang.Object createDAO(java.lang.String type)
          Creates and initializes a data access object for use by the application.
 java.lang.Object createDAOFromClassName(java.lang.String className)
          Creates and initializes a data access object for use by the application using the incoming class name.
 java.lang.Object createSettingsDAO()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void evictCache()
           
 java.util.Properties getAppComponents()
          Retrieves this factory's component settings.
 java.util.Properties getAppSettings()
          Retrieves this factory's application settings; the current application settings for the system.
 java.lang.String getDatabaseDriver()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getDatabasePassword()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getDatabaseType()
           
 java.lang.String getDatabaseURL()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getDatabaseUserName()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 javax.sql.DataSource getDataSource()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getDataSourceName()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.util.Properties getHibernateSettings()
          Retrieves this factory's Hibernate settings.
 java.lang.String getJndiContext()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 javax.sql.DataSource getJndiDataSource()
          Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory.
 java.lang.String getMaxActive()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getMaxIdle()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getMaxWait()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.util.StringTokenizer getModuleList()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getModuleListString()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getPaymentPrivateKeyFile()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getPaymentPublicKeyFile()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getRemoveAbandoned()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getRemoveAbandonedTimeout()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 org.hibernate.Session getSession()
           
 org.hibernate.SessionFactory getSessionFactory()
          Retrieves this factory's Hibernate SessionFactory.
 Settings getSettings()
          Retrieves this factory's Settings instance.
 java.util.Map getSqlMap()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 java.lang.String getTwoWayKeyFile()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void initialize()
          Initializes this DAOFactory.
 void initialize(java.lang.String settingsLocation)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void initializeDataSource()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void initializeSQLProperties()
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void rollbackTransaction()
           
 void setAppComponents(java.util.Properties appComponents)
           
 void setAppSettings(java.util.Properties appSettings)
           
 void setDatabaseDriver(java.lang.String databaseDriver)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setDatabasePassword(java.lang.String databasePassword)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setDatabaseType(java.lang.String databaseType)
           
 void setDatabaseURL(java.lang.String databaseURL)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setDatabaseUserName(java.lang.String databaseUserName)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setDataSource(javax.sql.DataSource dataSource)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setDataSourceName(java.lang.String dataSourceName)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setHibernateSettings(java.util.Properties hibernateSettings)
           
 void setJndiContext(java.lang.String jndiContext)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setMaxActive(java.lang.String maxActive)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setMaxIdle(java.lang.String maxIdle)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setMaxWait(java.lang.String maxWait)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setModuleList(java.util.StringTokenizer moduleList)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setModuleListString(java.lang.String moduleList)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setPaymentPrivateKeyFile(java.lang.String paymentPrivateKeyFile)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setPaymentPublicKeyFile(java.lang.String paymentPublicKeyFile)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setRemoveAbandoned(java.lang.String removeAbandoned)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setRemoveAbandonedTimeout(java.lang.String removeAbandonedTimeout)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
           
 void setSettings(Settings settings)
           
 void setTwoWayKeyFile(java.lang.String twoWayKeyFile)
          Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory
 org.hibernate.Session startSession()
           
 

Method Detail

getModuleListString

java.lang.String getModuleListString()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setModuleListString

void setModuleListString(java.lang.String moduleList)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getModuleList

java.util.StringTokenizer getModuleList()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setModuleList

void setModuleList(java.util.StringTokenizer moduleList)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getDataSource

javax.sql.DataSource getDataSource()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setDataSource

void setDataSource(javax.sql.DataSource dataSource)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getDataSourceName

java.lang.String getDataSourceName()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setDataSourceName

void setDataSourceName(java.lang.String dataSourceName)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getJndiContext

java.lang.String getJndiContext()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setJndiContext

void setJndiContext(java.lang.String jndiContext)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getDatabaseDriver

java.lang.String getDatabaseDriver()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setDatabaseDriver

void setDatabaseDriver(java.lang.String databaseDriver)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getDatabaseURL

java.lang.String getDatabaseURL()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setDatabaseURL

void setDatabaseURL(java.lang.String databaseURL)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getDatabaseUserName

java.lang.String getDatabaseUserName()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setDatabaseUserName

void setDatabaseUserName(java.lang.String databaseUserName)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getDatabasePassword

java.lang.String getDatabasePassword()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setDatabasePassword

void setDatabasePassword(java.lang.String databasePassword)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getMaxIdle

java.lang.String getMaxIdle()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setMaxIdle

void setMaxIdle(java.lang.String maxIdle)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getMaxActive

java.lang.String getMaxActive()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setMaxActive

void setMaxActive(java.lang.String maxActive)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getMaxWait

java.lang.String getMaxWait()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setMaxWait

void setMaxWait(java.lang.String maxWait)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getRemoveAbandoned

java.lang.String getRemoveAbandoned()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setRemoveAbandoned

void setRemoveAbandoned(java.lang.String removeAbandoned)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getRemoveAbandonedTimeout

java.lang.String getRemoveAbandonedTimeout()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setRemoveAbandonedTimeout

void setRemoveAbandonedTimeout(java.lang.String removeAbandonedTimeout)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getPaymentPrivateKeyFile

java.lang.String getPaymentPrivateKeyFile()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setPaymentPrivateKeyFile

void setPaymentPrivateKeyFile(java.lang.String paymentPrivateKeyFile)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getPaymentPublicKeyFile

java.lang.String getPaymentPublicKeyFile()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setPaymentPublicKeyFile

void setPaymentPublicKeyFile(java.lang.String paymentPublicKeyFile)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getTwoWayKeyFile

java.lang.String getTwoWayKeyFile()
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


setTwoWayKeyFile

void setTwoWayKeyFile(java.lang.String twoWayKeyFile)
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory


getJndiDataSource

javax.sql.DataSource getJndiDataSource()
                                       throws java.lang.Exception
Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory. Also used in the 1.x to 2.x upgrade process (which is why it is not deprecated).

Throws:
java.lang.Exception

getSqlMap

java.util.Map getSqlMap()
                        throws java.lang.Exception
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory

Throws:
java.lang.Exception

initializeDataSource

void initializeDataSource()
                          throws java.lang.Exception
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory

Throws:
java.lang.Exception

initializeSQLProperties

void initializeSQLProperties()
                             throws java.lang.Exception
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory

Throws:
java.lang.Exception

createSettingsDAO

java.lang.Object createSettingsDAO()
                                   throws java.lang.Exception
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory

Creates and initializes a settings bean data access object for use by the application.

Returns:
An instantiated and initialized settings bean data access object, or null if initialization failed.
Throws:
java.lang.Exception

initialize

void initialize(java.lang.String settingsLocation)
                throws java.lang.Exception
Deprecated. Used in 1.x with LegacyDAOFactory, which is replaced in 2.x with the HibernateDAOFactory

Initializes this DAOFactory using the settings defined in the file located at the imcoming settingLocation.

Parameters:
settingsLocation - The location of a file containing database settings.
Throws:
java.lang.Exception

getDatabaseType

java.lang.String getDatabaseType()

setDatabaseType

void setDatabaseType(java.lang.String databaseType)

getSettings

Settings getSettings()
Retrieves this factory's Settings instance. The current Settings, containing various settings to be used by DAOs created by this factory. This factory will pass the Settings to every object it creates.


setSettings

void setSettings(Settings settings)

getAppComponents

java.util.Properties getAppComponents()
Retrieves this factory's component settings. The component settings identify which Java class implement the various Interfaces used by the system.


setAppComponents

void setAppComponents(java.util.Properties appComponents)

getAppSettings

java.util.Properties getAppSettings()
Retrieves this factory's application settings; the current application settings for the system. This factory will pass the application settings to every DAO it creates. The application settings are settings for information unique to a given installation, such as the location of files on the server, as opposed to the Settings instance, which stores settings drawn from the database.


setAppSettings

void setAppSettings(java.util.Properties appSettings)

getHibernateSettings

java.util.Properties getHibernateSettings()
Retrieves this factory's Hibernate settings. The Hibernate settings are explicitly set for the HibernateDAOFactory before it is initialized, so that they can be changed after the installer tool is run.


setHibernateSettings

void setHibernateSettings(java.util.Properties hibernateSettings)

getSessionFactory

org.hibernate.SessionFactory getSessionFactory()
Retrieves this factory's Hibernate SessionFactory.


setSessionFactory

void setSessionFactory(org.hibernate.SessionFactory sessionFactory)

initialize

void initialize()
                throws java.lang.Exception
Initializes this DAOFactory. Called by BaseRequestProcessor.

Throws:
java.lang.Exception

createDAO

java.lang.Object createDAO(java.lang.String type)
                           throws java.lang.Exception
Creates and initializes a data access object for use by the application. Uses the appSettings property to look up the fully-qualified class name of the requested data access object.

Immediately after instantiating the requested DAO, this factory passes its own properties to it so that the newly created object can use them to communicate with the rest of the application.

Parameters:
type - A String associated with the class name of the data access object to be created.
Returns:
An instantiated and initialized data access object, or null if initialization failed.
Throws:
java.lang.Exception

createDAOFromClassName

java.lang.Object createDAOFromClassName(java.lang.String className)
                                        throws java.lang.Exception
Creates and initializes a data access object for use by the application using the incoming class name.

Immediately after instantiating the requested DAO, this factory passes its own properties to it so that the newly created object can use them to communicate with the rest of the application.

Parameters:
className - A String representing the class name of the data access object to be created.
Returns:
An instantiated and initialized data access object, or null if initialization failed.
Throws:
java.lang.Exception

startSession

org.hibernate.Session startSession()

getSession

org.hibernate.Session getSession()

closeSession

void closeSession()

beginTransaction

void beginTransaction()

commitTransaction

void commitTransaction()

rollbackTransaction

void rollbackTransaction()

evictCache

void evictCache()


Copyright ? SoftSlate, LLC 2003?2005