|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibatis.dao.engine.impl.StandardDaoManager
| Field Summary | |
private java.lang.ThreadLocal |
contextInTransactionList
|
private static java.lang.String |
DAO_EXPLICIT_TX
|
private java.util.Map |
daoImplMap
|
private java.util.Map |
idContextMap
|
private java.lang.ThreadLocal |
transactionMode
|
private java.util.Map |
typeContextMap
|
| Constructor Summary | |
StandardDaoManager()
|
|
| Method Summary | |
void |
addContext(DaoContext context)
|
void |
addContextInTransaction(DaoContext ctx)
|
void |
commitTransaction()
Commits all transactions currently started for all DAO contexts managed by this DaoManager. |
void |
endTransaction()
Ends all transactions currently started for all DAO contexts managed by this DaoManager. |
private java.util.List |
getContextInTransactionList()
|
Dao |
getDao(java.lang.Class iface)
Gets a Dao instance for the requested interface type. |
Dao |
getDao(java.lang.Class iface,
java.lang.String contextId)
Gets a Dao instance for the requested interface type registered under the context with the specified id. |
DaoTransaction |
getTransaction(Dao dao)
Gets the transaction that the provided Dao is currently working under. |
boolean |
isExplicitTransaction()
|
void |
startTransaction()
Starts a transaction scope managed by this DaoManager. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String DAO_EXPLICIT_TX
private java.lang.ThreadLocal transactionMode
private java.lang.ThreadLocal contextInTransactionList
private java.util.Map idContextMap
private java.util.Map typeContextMap
private java.util.Map daoImplMap
| Constructor Detail |
public StandardDaoManager()
| Method Detail |
public void addContext(DaoContext context)
public Dao getDao(java.lang.Class iface)
DaoManager
getDao in interface DaoManageriface - The interface or generic type for which an implementation
should be returned.
public Dao getDao(java.lang.Class iface,
java.lang.String contextId)
DaoManager
getDao in interface DaoManageriface - The interface or generic type for which an implementation
should be returned.contextId - The ID of the context under which to find the DAO
implementation (use for multiple interface defs).
public void startTransaction()
DaoManager
startTransaction in interface DaoManagerpublic void commitTransaction()
DaoManager
commitTransaction in interface DaoManagerpublic void endTransaction()
DaoManager
endTransaction in interface DaoManagerpublic DaoTransaction getTransaction(Dao dao)
DaoManager
getTransaction in interface DaoManagerdao - The Dao to find a transaction for.
public boolean isExplicitTransaction()
public void addContextInTransaction(DaoContext ctx)
private java.util.List getContextInTransactionList()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||