|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DAOFactory
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. |
void |
evictCache()
|
java.util.Properties |
getAppComponents()
Retrieves this factory's component settings. |
java.util.Properties |
getAppComponentsDefaults()
Retrieves this factory's default component settings. |
java.util.Properties |
getAppSettings()
Retrieves this factory's application settings; the current application settings for the system. |
java.lang.String |
getDatabaseType()
|
java.util.Properties |
getHibernateSettings()
Retrieves this factory's Hibernate settings. |
javax.sql.DataSource |
getJndiDataSource()
Used in 1.x with com.softslate.commerce.daos.core.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. |
void |
initialize()
Initializes this DAOFactory . |
void |
rollbackTransaction()
|
void |
setAppComponents(java.util.Properties appComponents)
|
void |
setAppComponentsDefaults(java.util.Properties appComponentsDefaults)
|
void |
setAppSettings(java.util.Properties appSettings)
|
void |
setDatabaseType(java.lang.String databaseType)
|
void |
setHibernateSettings(java.util.Properties hibernateSettings)
|
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
|
void |
setSettings(Settings settings)
|
org.hibernate.Session |
startSession()
|
Method Detail |
---|
javax.sql.DataSource getJndiDataSource() throws java.lang.Exception
HibernateDAOFactory
. Also used
in the 1.x to 2.x upgrade process (which is why it is not deprecated).
java.lang.Exception
java.lang.String getDatabaseType()
void setDatabaseType(java.lang.String databaseType)
Settings getSettings()
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.
void setSettings(Settings settings)
java.util.Properties getAppComponents()
void setAppComponents(java.util.Properties appComponents)
java.util.Properties getAppComponentsDefaults()
void setAppComponentsDefaults(java.util.Properties appComponentsDefaults)
java.util.Properties getAppSettings()
Settings
instance, which
stores settings drawn from the database.
void setAppSettings(java.util.Properties appSettings)
java.util.Properties getHibernateSettings()
void setHibernateSettings(java.util.Properties hibernateSettings)
org.hibernate.SessionFactory getSessionFactory()
SessionFactory
.
void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
void initialize() throws java.lang.Exception
DAOFactory
. Called by
BaseRequestProcessor
.
java.lang.Exception
java.lang.Object createDAO(java.lang.String type) throws java.lang.Exception
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.
type
- A String
associated with the class name of the
data access object to be created.
null
if initialization failed.
java.lang.Exception
java.lang.Object createDAOFromClassName(java.lang.String className) throws java.lang.Exception
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.
className
- A String
representing the class name of the
data access object to be created.
null
if initialization failed.
java.lang.Exception
org.hibernate.Session startSession()
org.hibernate.Session getSession()
void closeSession()
void beginTransaction()
void commitTransaction()
void rollbackTransaction()
void evictCache()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |