    public List<SampleAcquisition> findMatchingSamples(AbstractAnnotationCriterion criterion, Study study) {
        if (!criterion.getEntityType().equals(EntityTypeEnum.SAMPLE)) {
            return null;
        } else {
            Criteria sampleAcquisitionCrit = getHibernateTemplate().
                                             getSessionFactory().
                                             getCurrentSession().
                                             createCriteria(SampleAcquisition.class);
            Criteria valuesCrit = sampleAcquisitionCrit.createCriteria("annotationCollection");
            valuesCrit.add(AbstractAnnotationCriterionHandler.create(criterion).translate());
            return sampleAcquisitionCrit.list();
        }
    }

    public List<SampleAcquisition> findMatchingSamples(AbstractAnnotationCriterion criterion, Study study) {
        if (!criterion.getEntityType().equals(EntityTypeEnum.SAMPLE.getValue())) {
            return null;
        } else {
            Criteria sampleAcquisitionCrit = getHibernateTemplate().
                                             getSessionFactory().
                                             getCurrentSession().
                                             createCriteria(SampleAcquisition.class);
            Criteria valuesCrit = sampleAcquisitionCrit.createCriteria("annotationCollection");
            valuesCrit.add(AbstractAnnotationCriterionHandler.create(criterion).translate());
            return sampleAcquisitionCrit.list();
        }
    }
