public abstract class AbstractMyBatisDAO extends AbstractLogEnabled implements Contextualizable, Serviceable, PluginAware, Configurable, Component
Modifier and Type | Class and Description |
---|---|
(package private) class |
AbstractMyBatisDAO.SqlMap |
Modifier and Type | Field and Description |
---|---|
private String |
_contextPath |
private boolean |
_dataSourceConfigurationParameter |
private String |
_dataSourceId |
private String |
_dataSourceParameter |
private ServiceManager |
_manager |
private String |
_pluginName |
private SqlSessionFactory |
_sessionFactory |
private SQLDataSourceManager |
_sqlDataSourceManager |
private Set<AbstractMyBatisDAO.SqlMap> |
_sqlMaps |
Constructor and Description |
---|
AbstractMyBatisDAO() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration configuration) |
void |
contextualize(Context context) |
protected SqlSession |
getSession()
Returns the myBatis
SqlSession . |
protected SqlSession |
getSession(boolean autoCommit)
Returns the myBatis
SqlSession . |
private SQLDataSourceManager |
getSQLDataSourceManager() |
protected void |
reload()
Reload configuration and object for mybatis
|
void |
service(ServiceManager manager) |
void |
setPluginInfo(String pluginName,
String featureName,
String id)
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level. |
getLogger, setLogger
private SqlSessionFactory _sessionFactory
private SQLDataSourceManager _sqlDataSourceManager
private String _contextPath
private String _pluginName
private String _dataSourceId
private String _dataSourceParameter
private boolean _dataSourceConfigurationParameter
private Set<AbstractMyBatisDAO.SqlMap> _sqlMaps
private ServiceManager _manager
public AbstractMyBatisDAO()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
private SQLDataSourceManager getSQLDataSourceManager()
public void setPluginInfo(String pluginName, String featureName, String id)
PluginAware
setPluginInfo
in interface PluginAware
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this componentpublic void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
protected void reload()
protected SqlSession getSession()
SqlSession
.SqlSession
.protected SqlSession getSession(boolean autoCommit)
SqlSession
.autoCommit
- if the underlying Connection should auto commit statements.SqlSession
.