List of usage examples for org.hibernate Query list
List<R> list();
From source file:au.org.theark.core.dao.StudyDao.java
License:Open Source License
@SuppressWarnings("unchecked") public List<SubjectCustomFieldData> getSubjectCustomFieldDataFor(Collection customFieldDisplaysThatWeNeed, List subjectUIDsToBeIncluded) { if (customFieldDisplaysThatWeNeed == null || customFieldDisplaysThatWeNeed.isEmpty() || subjectUIDsToBeIncluded == null || subjectUIDsToBeIncluded.isEmpty()) { return new ArrayList<SubjectCustomFieldData>(); } else {/*from w ww . j a va 2 s . c om*/ String queryString = "select scfd " + " from SubjectCustomFieldData scfd " + " where scfd.linkSubjectStudy in (:subjectUIDsToBeIncluded) " + " and scfd.customFieldDisplay in (:customFieldDisplaysThatWeNeed) "; Query query = getSession().createQuery(queryString); query.setParameterList("subjectUIDsToBeIncluded", subjectUIDsToBeIncluded); query.setParameterList("customFieldDisplaysThatWeNeed", customFieldDisplaysThatWeNeed); return query.list(); } }
From source file:au.org.theark.core.dao.StudyDao.java
License:Open Source License
public Collection<ConsentStatusField> getSelectedConsentStatusFieldsForSearch(Search search) { String queryString = "select csfs.consentStatusField" + " from ConsentStatusFieldSearch csfs " + " where csfs.search=:search " + " order by csfs.consentStatusField.entity "; Query query = getSession().createQuery(queryString); query.setParameter("search", search); log.info("QueryString: " + query.getQueryString()); log.info("getselectedconsentstatusfieldforsearch results:"); for (ConsentStatusField c : (List<ConsentStatusField>) query.list()) { log.info(c.getPublicFieldName()); }/*from w ww.j a va2 s.co m*/ return query.list(); }
From source file:au.org.theark.core.dao.StudyDao.java
License:Open Source License
public List<ConsentStatusField> getSelectedConsentStatusFieldsForSearch(Search search, Entity entityEnumToRestrictOn) { String queryString = "select csfs.consentStatusField from ConsentStatusFieldSearch csfs where csfs.search=:search " + " and csfs.consentStatusField.entity=:entityEnumToRestrictOn "; Query query = getSession().createQuery(queryString); query.setParameter("search", search); query.setParameter("entityEnumToRestrictOn", entityEnumToRestrictOn); return query.list(); }
From source file:au.org.theark.core.dao.StudyDao.java
License:Open Source License
public List<DemographicField> getSelectedDemographicFieldsForSearch(Search search) { String queryString = "select dfs.demographicField " + " from DemographicFieldSearch dfs " + " where dfs.search=:search " + " order by dfs.demographicField.entity "; Query query = getSession().createQuery(queryString); query.setParameter("search", search); return query.list(); }
From source file:au.org.theark.core.dao.StudyDao.java
License:Open Source License
public List<DemographicField> getSelectedDemographicFieldsForSearch(Search search, Entity entityEnumToRestrictOn) { String queryString = "select dfs.demographicField from DemographicFieldSearch dfs where dfs.search=:search " + " and dfs.demographicField.entity=:entityEnumToRestrictOn "; Query query = getSession().createQuery(queryString); query.setParameter("search", search); query.setParameter("entityEnumToRestrictOn", entityEnumToRestrictOn); return query.list(); }
From source file:au.org.theark.core.dao.StudyDao.java
License:Open Source License
public List<BiospecimenField> getSelectedBiospecimenFieldsForSearch(Search search) { String queryString = "select bsfs.biospecimenField from BiospecimenFieldSearch bsfs " + " where bsfs.search=:search "; Query query = getSession().createQuery(queryString); query.setParameter("search", search); return query.list(); }
From source file:au.org.theark.core.dao.StudyDao.java
License:Open Source License
public List<BiocollectionField> getSelectedBiocollectionFieldsForSearch(Search search) { String queryString = "select bcfs.biocollectionField " + " from BiocollectionFieldSearch bcfs " + " where bcfs.search=:search "; Query query = getSession().createQuery(queryString); query.setParameter("search", search); return query.list(); }
From source file:au.org.theark.core.dao.StudyDao.java
License:Open Source License
@Deprecated public List<CustomFieldDisplay> getSelectedPhenoCustomFieldDisplaysForSearch(Search search) { String queryString = "select cfds.customFieldDisplay " + " from CustomFieldDisplaySearch cfds " + " where cfds.search=:search " + " and cfds.customFieldDisplay.customField.arkFunction=:arkFunction ";// + // " order by cfds.customFieldDisplay.customFieldGroup.name "; Query query = getSession().createQuery(queryString); query.setParameter("search", search); query.setParameter("arkFunction", getArkFunctionByName(Constants.FUNCTION_KEY_VALUE_PHENO_COLLECTION)); return query.list(); }
From source file:au.org.theark.core.dao.StudyDao.java
License:Open Source License
public List<PhenoDataSetFieldDisplay> getSelectedPhenoDataSetFieldDisplaysForSearch(Search search) { String queryString = "select pdfds.phenoDataSetFieldDisplay " + " from PhenoDataSetFieldDisplaySearch pdfds " + "where pdfds.search=:search " + " and pdfds.phenoDataSetFieldDisplay.phenoDataSetField.arkFunction=:arkFunction"; Query query = getSession().createQuery(queryString); query.setParameter("search", search); query.setParameter("arkFunction", getArkFunctionByName(Constants.FUNCTION_KEY_VALUE_DATA_DICTIONARY)); return query.list(); }
From source file:au.org.theark.core.dao.StudyDao.java
License:Open Source License
public List<CustomFieldDisplay> getSelectedSubjectCustomFieldDisplaysForSearch(Search search) { String queryString = "select cfds.customFieldDisplay " + " from CustomFieldDisplaySearch cfds " + " where cfds.search=:search " + " and cfds.customFieldDisplay.customField.arkFunction=:arkFunction"; Query query = getSession().createQuery(queryString); query.setParameter("search", search); query.setParameter("arkFunction", getArkFunctionByName(Constants.FUNCTION_KEY_VALUE_SUBJECT_CUSTOM_FIELD)); return query.list(); }