Class SQLCollectionDAO
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.datasource.AbstractMyBatisDAO
-
- org.ametys.plugins.contentio.synchronize.impl.SQLCollectionDAO
-
- All Implemented Interfaces:
LogEnabled,PluginAware,Component,Configurable,Contextualizable,Serviceable
public class SQLCollectionDAO extends AbstractMyBatisDAO
DAO forSynchronizableContentsCollections which need to access a SQL database
-
-
Field Summary
Fields Modifier and Type Field Description protected String_dataSourceIdThe datesource idstatic StringROLEAvalon ROLE-
Fields inherited from class org.ametys.core.datasource.AbstractMyBatisDAO
_manager
-
-
Constructor Summary
Constructors Constructor Description SQLCollectionDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_configureDatasource(Configuration configuration)Configure datasourceprotected String_getDataSourceId()Get datasource idprotected org.apache.ibatis.session.Configuration_getMyBatisConfiguration(org.apache.ibatis.mapping.Environment env)Get the mybatis configurationprotected void_setDataSourceId(String dataSourceId)Set the datasource idintgetTotalCount(Map<String,Object> params, String dataSourceId)Get total count of synchronized contentList<Map<String,Object>>search(Map<String,Object> params, String dataSourceId)Get the list of synchronized content-
Methods inherited from class org.ametys.core.datasource.AbstractMyBatisDAO
configure, contextualize, getSession, getSession, reload, service, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_dataSourceId
protected String _dataSourceId
The datesource id
-
-
Constructor Detail
-
SQLCollectionDAO
public SQLCollectionDAO()
-
-
Method Detail
-
_getMyBatisConfiguration
protected org.apache.ibatis.session.Configuration _getMyBatisConfiguration(org.apache.ibatis.mapping.Environment env)
Description copied from class:AbstractMyBatisDAOGet the mybatis configuration- Overrides:
_getMyBatisConfigurationin classAbstractMyBatisDAO- Parameters:
env- the mybatis environnement- Returns:
- the mybatis configuration
-
search
public List<Map<String,Object>> search(Map<String,Object> params, String dataSourceId)
Get the list of synchronized content- Parameters:
params- the filter paramatersdataSourceId- the datasource ID- Returns:
- the list of synchronized content
-
getTotalCount
public int getTotalCount(Map<String,Object> params, String dataSourceId)
Get total count of synchronized content- Parameters:
params- the filter paramatersdataSourceId- the datasource ID- Returns:
- the total count of synchronized content
-
_configureDatasource
protected void _configureDatasource(Configuration configuration) throws ConfigurationException
Description copied from class:AbstractMyBatisDAOConfigure datasource- Overrides:
_configureDatasourcein classAbstractMyBatisDAO- Parameters:
configuration- the configuration- Throws:
ConfigurationException- if an error occurred
-
_getDataSourceId
protected String _getDataSourceId()
Description copied from class:AbstractMyBatisDAOGet datasource id- Overrides:
_getDataSourceIdin classAbstractMyBatisDAO- Returns:
- the datasource id
-
_setDataSourceId
protected void _setDataSourceId(String dataSourceId)
Set the datasource id- Parameters:
dataSourceId- the datasource id
-
-