use of ubic.gemma.model.genome.gene.phenotype.valueObject.PhenotypeValueObject in project Gemma by PavlidisLab.
the class PhenotypeAssociationDaoImpl method loadAllNeurocartaPhenotypes.
/**
* find all phenotypes in Neurocarta, this was requested by AspireBD
*/
@Override
public Collection<PhenotypeValueObject> loadAllNeurocartaPhenotypes() {
Collection<PhenotypeValueObject> phenotypeValueObjects = new HashSet<>();
List<?> res = this.getSessionFactory().getCurrentSession().createQuery("select distinct c.valueUri,c.value from PhenotypeAssociation p join p.phenotypes c").list();
for (Object o : res) {
Object[] oa = (Object[]) o;
String valueUri = (String) oa[0];
String value = (String) oa[1];
PhenotypeValueObject p = new PhenotypeValueObject(value, valueUri);
phenotypeValueObjects.add(p);
}
return phenotypeValueObjects;
}
Aggregations