public interface DaoFactory
| Modifier and Type | Method and Description |
|---|---|
void |
addDaoFactoryListener(DaoFactoryListener listener)
Adds a factory listener.
|
void |
begin()
Begins a transaction.
|
void |
commit()
Commits a transaction.
|
<K extends Serializable,B extends GeneralBO<K>> |
getDaoFor(B o)
Returns the correct DAO for the given model object.
|
<K extends Serializable,T extends GeneralDTO<K>> |
getDaoFor(T o)
Returns the correct DAO for the given transfer object.
|
DaoMaster |
getDaoMaster(String id)
Returns the DAO master with given ID.
|
String |
getParameter(String name)
Returns the factory parameter.
|
Iterator<String> |
getParameterKeys()
Returns an iterator of all property keys.
|
URL |
getParameterUrl(String name)
Returns the factory parameter as a URL.
|
Object |
getProperty(String name)
Returns the factory property.
|
Transaction |
getTransaction()
Returns the current active transaction.
|
TransactionManager |
getTransactionManager()
Returns the TX manager used.
|
URLTransformer |
getUrlTransformer()
Returns the urlTransformer.
|
void |
removeDaoFactoryListener(DaoFactoryListener listener)
Removes a factory listener.
|
void |
rollback()
Rolls back a transaction.
|
void |
setProperty(String name,
Object value)
Sets the property.
|
void |
setTransactionManager(TransactionManager txManager)
Sets the given TX manager to be used.
|
void |
setUrlTransformer(URLTransformer urlTransformer)
Sets the urlTransformer.
|
Object getProperty(String name)
name - name of propertyvoid setProperty(String name, Object value)
name - name of propertyvalue - value of propertyString getParameter(String name)
name - name of parameterURL getParameterUrl(String name) throws MalformedURLException
name - name of parameterMalformedURLExceptionURLTransformer getUrlTransformer()
void setUrlTransformer(URLTransformer urlTransformer)
urlTransformer - the urlTransformer to setDaoMaster getDaoMaster(String id)
id - ID of masterIterator<String> getParameterKeys()
<K extends Serializable,T extends GeneralDTO<K>> GeneralDAO<K,?> getDaoFor(T o)
o - the object to look for<K extends Serializable,B extends GeneralBO<K>> GeneralDAO<K,B> getDaoFor(B o)
o - the object to look forTransactionManager getTransactionManager()
void setTransactionManager(TransactionManager txManager)
txManager - the TX manager.void begin()
void commit()
begin() did not start a new TX then
this method does nothing.void rollback()
begin() did not start a new TX then
this method does nothing.Transaction getTransaction() throws SystemException
SystemException - if there is a problemvoid addDaoFactoryListener(DaoFactoryListener listener)
listener - listenervoid removeDaoFactoryListener(DaoFactoryListener listener)
listener - listenerCopyright © 2013. All Rights Reserved.