Class AbstractApogeeDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.datasource.AbstractMyBatisDAO
org.ametys.plugins.odfsync.apogee.AbstractApogeeDAO
- All Implemented Interfaces:
LogEnabled,PluginAware,Component,Configurable,Contextualizable,Serviceable
- Direct Known Subclasses:
ApogeeDAO,ApogeePreviousYearsFieldsDAO
Data access object to the remote DB Apogee
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringThe name of request attribute for the datasource idFields inherited from class org.ametys.core.datasource.AbstractMyBatisDAO
_manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_configureDatasource(Configuration configuration) Configure datasource_executeSearch(String dataSourceId, Map<String, Object> sccParams, Map<String, Object> params, String query) Returns the Apogee objects matching the search criteria on the asked statement.protected StringGet datasource idprotected ConfigurationGet the mybatis configurationprotected RequestGet the requestprotected voidCommon method to prepare the SQL request to executevoidcontextualize(Context context) Methods inherited from class org.ametys.core.datasource.AbstractMyBatisDAO
configure, getSession, getSession, reload, service, setPluginInfoMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
DATASOURCE_REQUEST_ATTR
The name of request attribute for the datasource id
-
-
Constructor Details
-
AbstractApogeeDAO
public AbstractApogeeDAO()
-
-
Method Details
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Overrides:
contextualizein classAbstractMyBatisDAO- Throws:
ContextException
-
_getMyBatisConfiguration
Description copied from class:AbstractMyBatisDAOGet the mybatis configuration- Overrides:
_getMyBatisConfigurationin classAbstractMyBatisDAO- Parameters:
env- the mybatis environnement- Returns:
- the mybatis configuration
-
_configureDatasource
Description copied from class:AbstractMyBatisDAOConfigure datasource- Overrides:
_configureDatasourcein classAbstractMyBatisDAO- Parameters:
configuration- the configuration- Throws:
ConfigurationException- if an error occurred
-
_getDataSourceId
Description copied from class:AbstractMyBatisDAOGet datasource id- Overrides:
_getDataSourceIdin classAbstractMyBatisDAO- Returns:
- the datasource id
-
_getRequest
Get the request- Returns:
- the request
-
_executeSearch
protected List<Map<String,Object>> _executeSearch(String dataSourceId, Map<String, Object> sccParams, Map<String, Object> params, String query) Returns the Apogee objects matching the search criteria on the asked statement.- Parameters:
dataSourceId- The id of data source. Can not be null.sccParams- the parameters values of the Apogee synchronizable collectionparams- The parameters for search criteriaquery- The query identifier to execute- Returns:
- the list Apogee objects matching the search criteria
-
_prepareSqlRequest
protected void _prepareSqlRequest(String dataSourceId, Map<String, Object> sccParams, Map<String, Object> params) Common method to prepare the SQL request to execute- Parameters:
dataSourceId- The id of data source. Can not be null.sccParams- the parameters values of the used Apogee synchronizable collectionparams- the SQL parameters
-