<commit_before>package uk.ac.ebi.phenotype.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Set;

import org.hibernate.HibernateException;

import uk.ac.ebi.phenotype.pojo.BiologicalModel;
import uk.ac.ebi.phenotype.pojo.Organisation;
import uk.ac.ebi.phenotype.pojo.Parameter;
import uk.ac.ebi.phenotype.pojo.SexType;
import uk.ac.ebi.phenotype.pojo.UnidimensionalResult;
import uk.ac.ebi.phenotype.pojo.UnidimensionalView;
import uk.ac.ebi.phenotype.pojo.ZygosityType;

public interface UnidimensionalStatisticsDAO {

	public List<Float> countControl(SexType sex, Parameter parameter, Integer populationId);
	public List<Float> countMutant(SexType sex, ZygosityType zygosity, Parameter parameter, Integer populationId);
	
	public List<BiologicalModel> getBiologicalModelsByParameterAndGene(Parameter parameter, String accessionId);
	public BiologicalModel getControlBiologicalModelByPopulation(Integer populationId);
	public BiologicalModel getMutantBiologicalModelByPopulation(Integer populationId);

	public Double getpValueByParameterAndBiologicalModel(Parameter parameter, BiologicalModel biologicalModel);
	
	public List<Integer> getPopulationIdsByParameterAndMutantBiologicalModel(Parameter parameter, BiologicalModel biologicalModel);

	public SexType getSexByPopulation(Integer populationId);
	public List<ZygosityType> getZygositiesByPopulation(Integer populationId);

	public void deleteUnidimensionalResultByParameter(Parameter parameter) throws HibernateException, SQLException;
	public void saveUnidimensionalResult(UnidimensionalResult result);
	public Set<UnidimensionalView> getUnidimensionalData(Parameter parameter, Organisation organization, String colonyId);
	
}<commit_msg>factor out common save method and introduce DAO inheritance for statistics DAOs<commit_after>package uk.ac.ebi.phenotype.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.hibernate.HibernateException;

import uk.ac.ebi.phenotype.pojo.BiologicalModel;
import uk.ac.ebi.phenotype.pojo.Organisation;
import uk.ac.ebi.phenotype.pojo.Parameter;
import uk.ac.ebi.phenotype.pojo.SexType;
import uk.ac.ebi.phenotype.pojo.UnidimensionalRecordDTO;
import uk.ac.ebi.phenotype.pojo.ZygosityType;

public interface UnidimensionalStatisticsDAO extends StatisticsDAO {

	public List<Float> getControlDataPointsForPopulation(Integer populationId) throws SQLException;

	public List<Float> getMutantDataPoints(SexType sex, ZygosityType zygosity, Parameter parameter, Integer populationId) throws SQLException;

	public List<BiologicalModel> getBiologicalModelsByParameterAndGene(Parameter parameter, String accessionId);

	public BiologicalModel getControlBiologicalModelByPopulation(Integer populationId);

	public BiologicalModel getMutantBiologicalModelByPopulation(Integer populationId);

	public Double getpValueByParameterAndBiologicalModel(Parameter parameter, BiologicalModel biologicalModel);

	public List<Integer> getPopulationIdsByParameterAndMutantBiologicalModel(Parameter parameter, BiologicalModel biologicalModel);

	public SexType getSexByPopulation(Integer populationId);

	public List<ZygosityType> getZygositiesByPopulation(Integer populationId);

	public void deleteUnidimensionalResultByParameter(Parameter parameter) throws HibernateException, SQLException;

	public Set<UnidimensionalRecordDTO> getUnidimensionalData(Parameter parameter, Organisation organization, String colonyId, ZygosityType zygosity) throws SQLException;

	public Set<ZygosityType> getZygosities(Parameter parameter, Organisation organisation, String colonyId) throws SQLException;

	public Set<Integer> getPopulationIds(Parameter parameter, Organisation organisation, String colonyId, ZygosityType zygosity) throws SQLException;

	public Set<String> getColoniesByParameter(Parameter parameter) throws SQLException;

	public List<Organisation> getOrganisationsByColonyAndParameter(String colony, Parameter parameter);

	public  List<Map<String,String>>  getListOfUniqueParametersAndGenes(int start, int length) throws SQLException;

}
{'fraction_non_alphanumeric': 0.06681297244574494, 'fraction_numerical': 0.0, 'mean_word_length': 9.004878048780487, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3437575', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1080, 'n_words': 251}