Search in sources :

Example 1 with ReleaseContentsDataSource

use of org.nextprot.api.core.domain.release.ReleaseContentsDataSource in project nextprot-api by calipho-sib.

the class ReleaseStatsDaoImpl method findReleaseInfoDataSources.

@Override
public List<ReleaseContentsDataSource> findReleaseInfoDataSources() {
    Map<String, Object> params = new HashMap<>();
    params.put("cvNames", ReleaseDataSources.getDistinctCvNamesExcept(ReleaseDataSources.PeptideAtlas));
    List<ReleaseContentsDataSource> ds = new NamedParameterJdbcTemplate(dsLocator.getDataSource()).query(sqlDictionary.getSQLQuery("release-contents"), params, new ReleaseInfoRowMapper(null));
    ds.addAll(new NamedParameterJdbcTemplate(dsLocator.getDataSource()).query(sqlDictionary.getSQLQuery("release-contents-peptide-atlas"), params, new ReleaseInfoRowMapper(ReleaseDataSources.PeptideAtlas)));
    ds.sort((ds1, ds2) -> ds1.getSource().compareToIgnoreCase(ds2.getSource()));
    return ds;
}
Also used : ReleaseContentsDataSource(org.nextprot.api.core.domain.release.ReleaseContentsDataSource) HashMap(java.util.HashMap) NamedParameterJdbcTemplate(org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate)

Aggregations

HashMap (java.util.HashMap)1 ReleaseContentsDataSource (org.nextprot.api.core.domain.release.ReleaseContentsDataSource)1 NamedParameterJdbcTemplate (org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate)1