Package org.ametys.core.datasource
Class AbstractMyBatisDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.datasource.AbstractMyBatisDAO
- All Implemented Interfaces:
LogEnabled,PluginAware,Component,Configurable,Contextualizable,Serviceable
- Direct Known Subclasses:
ApogeeDAO,JdbcProfileAssignmentStorage,ResourceAccessComponent,ResourceAccessComponent,ResourceStatisticsComponent,RightProfilesDAO,SQLCollectionDAO,SQLUserSearchDAO,SubscribersDAO,SurveyAnswerDao,UserSignupManager
public abstract class AbstractMyBatisDAO
extends AbstractLogEnabled
implements Contextualizable, Serviceable, PluginAware, Configurable, Component
Interface to be implemented by any object that wishes to have
access to one or multiple SqlMapClient.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_configureDatasource(Configuration configuration) Configure datasourceprotected StringGet datasource idprotected ConfigurationGet the mybatis configurationvoidconfigure(Configuration configuration) voidcontextualize(Context context) protected SqlSessionReturns the myBatisSqlSession.protected SqlSessiongetSession(boolean autoCommit) Returns the myBatisSqlSession.protected voidreload()Reload configuration and object for mybatisvoidservice(ServiceManager manager) voidsetPluginInfo(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.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_manager
The service manager
-
-
Constructor Details
-
AbstractMyBatisDAO
public AbstractMyBatisDAO()
-
-
Method Details
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
setPluginInfo
Description copied from interface:PluginAwareSets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfoin interfacePluginAware- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)id- Unique identifier of this component
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
_configureDatasource
Configure datasource- Parameters:
configuration- the configuration- Throws:
ConfigurationException- if an error occurred
-
reload
Reload configuration and object for mybatis -
_getMyBatisConfiguration
Get the mybatis configuration- Parameters:
env- the mybatis environnement- Returns:
- the mybatis configuration
-
_getDataSourceId
Get datasource id- Returns:
- the datasource id
-
getSession
Returns the myBatisSqlSession.- Returns:
- the myBatis
SqlSession.
-
getSession
Returns the myBatisSqlSession.- Parameters:
autoCommit- if the underlying Connection should auto commit statements.- Returns:
- the myBatis
SqlSession.
-