public class HibernateConceptDAO extends Object implements ConceptDAO
ConceptService
to access these methodsConceptService
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
HibernateConceptDAO() |
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public ConceptComplex getConceptComplex(Integer conceptId)
ConceptDAO
getConceptComplex
in interface ConceptDAO
ConceptDAO.getConceptComplex(java.lang.Integer)
public Concept saveConcept(Concept concept) throws DAOException
saveConcept
in interface ConceptDAO
DAOException
ConceptDAO.saveConcept(org.openmrs.Concept)
public void purgeConcept(Concept concept) throws DAOException
purgeConcept
in interface ConceptDAO
DAOException
ConceptDAO.purgeConcept(org.openmrs.Concept)
public Concept getConcept(Integer conceptId) throws DAOException
getConcept
in interface ConceptDAO
DAOException
ConceptDAO.getConcept(java.lang.Integer)
public ConceptName getConceptName(Integer conceptNameId) throws DAOException
getConceptName
in interface ConceptDAO
DAOException
ConceptDAO.getConceptName(java.lang.Integer)
public ConceptAnswer getConceptAnswer(Integer conceptAnswerId) throws DAOException
getConceptAnswer
in interface ConceptDAO
DAOException
ConceptDAO.getConceptAnswer(java.lang.Integer)
public List<Concept> getAllConcepts(String sortBy, boolean asc, boolean includeRetired) throws DAOException
getAllConcepts
in interface ConceptDAO
DAOException
ConceptDAO.getAllConcepts(java.lang.String, boolean, boolean)
public Drug saveDrug(Drug drug) throws DAOException
saveDrug
in interface ConceptDAO
DAOException
ConceptDAO.saveDrug(org.openmrs.Drug)
public Drug getDrug(Integer drugId) throws DAOException
getDrug
in interface ConceptDAO
DAOException
ConceptDAO.getDrug(java.lang.Integer)
public List<Drug> getDrugs(String drugName, Concept concept, boolean includeRetired) throws DAOException
ConceptDAO
getDrugs
in interface ConceptDAO
DAOException
ConceptDAO.getDrugs(java.lang.String, org.openmrs.Concept, boolean)
public List<Drug> getDrugs(String phrase) throws DAOException
getDrugs
in interface ConceptDAO
DAOException
ConceptDAO.getDrugs(java.lang.String)
public ConceptClass getConceptClass(Integer i) throws DAOException
getConceptClass
in interface ConceptDAO
DAOException
ConceptDAO.getConceptClass(java.lang.Integer)
public List<ConceptClass> getConceptClasses(String name) throws DAOException
getConceptClasses
in interface ConceptDAO
DAOException
ConceptDAO.getConceptClasses(java.lang.String)
public List<ConceptClass> getAllConceptClasses(boolean includeRetired) throws DAOException
getAllConceptClasses
in interface ConceptDAO
DAOException
ConceptDAO.getAllConceptClasses(boolean)
public ConceptClass saveConceptClass(ConceptClass cc) throws DAOException
saveConceptClass
in interface ConceptDAO
DAOException
ConceptDAO.saveConceptClass(org.openmrs.ConceptClass)
public void purgeConceptClass(ConceptClass cc) throws DAOException
purgeConceptClass
in interface ConceptDAO
DAOException
ConceptDAO.purgeConceptClass(org.openmrs.ConceptClass)
public ConceptDatatype getConceptDatatype(Integer i)
getConceptDatatype
in interface ConceptDAO
ConceptDAO.getConceptDatatype(java.lang.Integer)
public List<ConceptDatatype> getAllConceptDatatypes(boolean includeRetired) throws DAOException
getAllConceptDatatypes
in interface ConceptDAO
DAOException
ConceptDAO.getAllConceptDatatypes(boolean)
public List<ConceptDatatype> getConceptDatatypes(String name) throws DAOException
getConceptDatatypes
in interface ConceptDAO
DAOException
ConceptDAO.getConceptDatatypes(java.lang.String)
public ConceptDatatype getConceptDatatypeByName(String name) throws DAOException
getConceptDatatypeByName
in interface ConceptDAO
ConceptDatatype
that matches name exactly or null if one does
not exist.DAOException
ConceptDAO.getConceptDatatypeByName(String)
public ConceptDatatype saveConceptDatatype(ConceptDatatype cd) throws DAOException
saveConceptDatatype
in interface ConceptDAO
DAOException
ConceptDAO.saveConceptDatatype(org.openmrs.ConceptDatatype)
public void purgeConceptDatatype(ConceptDatatype cd) throws DAOException
purgeConceptDatatype
in interface ConceptDAO
DAOException
ConceptDAO.purgeConceptDatatype(org.openmrs.ConceptDatatype)
public ConceptNumeric getConceptNumeric(Integer i)
getConceptNumeric
in interface ConceptDAO
ConceptDAO.getConceptNumeric(java.lang.Integer)
public List<Concept> getConcepts(String name, Locale loc, boolean searchOnPhrase, List<ConceptClass> classes, List<ConceptDatatype> datatypes) throws DAOException
ConceptDAO
getConcepts
in interface ConceptDAO
searchOnPhrase
- This puts wildcard characters around the concept name search criteriaDAOException
ConceptDAO.getConcepts(java.lang.String, java.util.Locale, boolean,
java.util.List, java.util.List)
public List<ConceptWord> getConceptWords(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept, Integer start, Integer size) throws DAOException
public List<Concept> getConceptsByAnswer(Concept concept)
getConceptsByAnswer
in interface ConceptDAO
ConceptDAO.getConceptsByAnswer(org.openmrs.Concept)
public Concept getPrevConcept(Concept c)
getPrevConcept
in interface ConceptDAO
ConceptDAO.getPrevConcept(org.openmrs.Concept)
public Concept getNextConcept(Concept c)
getNextConcept
in interface ConceptDAO
ConceptDAO.getNextConcept(org.openmrs.Concept)
public List<Concept> getConceptsWithDrugsInFormulary()
getConceptsWithDrugsInFormulary
in interface ConceptDAO
ConceptDAO.getConceptsWithDrugsInFormulary()
public void purgeDrug(Drug drug) throws DAOException
purgeDrug
in interface ConceptDAO
DAOException
ConceptDAO.purgeDrug(org.openmrs.Drug)
public void updateConceptWord(Concept concept) throws DAOException
updateConceptWord
in interface ConceptDAO
DAOException
ConceptDAO.updateConceptWord(org.openmrs.Concept)
public ConceptProposal saveConceptProposal(ConceptProposal cp) throws DAOException
saveConceptProposal
in interface ConceptDAO
DAOException
ConceptDAO.saveConceptProposal(org.openmrs.ConceptProposal)
public void purgeConceptProposal(ConceptProposal cp) throws DAOException
purgeConceptProposal
in interface ConceptDAO
DAOException
ConceptDAO.purgeConceptProposal(org.openmrs.ConceptProposal)
public List<ConceptProposal> getAllConceptProposals(boolean includeCompleted) throws DAOException
getAllConceptProposals
in interface ConceptDAO
DAOException
ConceptDAO.getAllConceptProposals(boolean)
public ConceptProposal getConceptProposal(Integer conceptProposalId) throws DAOException
getConceptProposal
in interface ConceptDAO
DAOException
ConceptDAO.getConceptProposal(java.lang.Integer)
public List<ConceptProposal> getConceptProposals(String text) throws DAOException
getConceptProposals
in interface ConceptDAO
DAOException
ConceptDAO.getConceptProposals(java.lang.String)
public List<Concept> getProposedConcepts(String text) throws DAOException
getProposedConcepts
in interface ConceptDAO
DAOException
ConceptDAO.getProposedConcepts(java.lang.String)
public List<ConceptSet> getConceptSetsByConcept(Concept concept)
getConceptSetsByConcept
in interface ConceptDAO
ConceptDAO.getConceptSetsByConcept(org.openmrs.Concept)
public List<ConceptSet> getSetsContainingConcept(Concept concept)
getSetsContainingConcept
in interface ConceptDAO
ConceptDAO.getSetsContainingConcept(org.openmrs.Concept)
public void updateConceptSetDerived() throws DAOException
updateConceptSetDerived
in interface ConceptDAO
DAOException
ConceptDAO.updateConceptSetDerived()
public void updateConceptSetDerived(Concept concept) throws DAOException
updateConceptSetDerived
in interface ConceptDAO
DAOException
ConceptDAO.updateConceptSetDerived(org.openmrs.Concept)
public Set<Locale> getLocalesOfConceptNames()
getLocalesOfConceptNames
in interface ConceptDAO
ConceptDAO.getLocalesOfConceptNames()
public ConceptNameTag getConceptNameTag(Integer i)
getConceptNameTag
in interface ConceptDAO
ConceptDAO.getConceptNameTag(java.lang.Integer)
public ConceptNameTag getConceptNameTagByName(String name)
getConceptNameTagByName
in interface ConceptDAO
ConceptDAO.getConceptNameTagByName(java.lang.String)
public List<ConceptNameTag> getAllConceptNameTags()
getAllConceptNameTags
in interface ConceptDAO
ConceptDAO.getAllConceptNameTags()
public ConceptSource getConceptSource(Integer conceptSourceId)
getConceptSource
in interface ConceptDAO
ConceptDAO.getConceptSource(java.lang.Integer)
public List<ConceptSource> getAllConceptSources()
getAllConceptSources
in interface ConceptDAO
ConceptDAO.getAllConceptSources()
public ConceptSource deleteConceptSource(ConceptSource cs) throws DAOException
deleteConceptSource
in interface ConceptDAO
DAOException
ConceptDAO.deleteConceptSource(org.openmrs.ConceptSource)
public ConceptSource saveConceptSource(ConceptSource conceptSource) throws DAOException
saveConceptSource
in interface ConceptDAO
DAOException
ConceptDAO.saveConceptSource(org.openmrs.ConceptSource)
public ConceptNameTag saveConceptNameTag(ConceptNameTag nameTag)
saveConceptNameTag
in interface ConceptDAO
ConceptDAO.saveConceptNameTag(org.openmrs.ConceptNameTag)
public Integer getMinConceptId()
ConceptDAO.getMaxConceptId()
public Integer getMaxConceptId()
getMaxConceptId
in interface ConceptDAO
ConceptDAO.getMaxConceptId()
public Iterator<Concept> conceptIterator()
conceptIterator
in interface ConceptDAO
ConceptDAO.conceptIterator()
public List<Concept> getConceptsByMapping(String code, String sourceName, boolean includeRetired)
getConceptsByMapping
in interface ConceptDAO
org.openmrs.api.db.ConceptDAO#getConceptsByMapping(java.lang.String, java.lang.String)
public Concept getConceptByUuid(String uuid)
ConceptDAO
getConceptByUuid
in interface ConceptDAO
ConceptDAO.getConceptByUuid(java.lang.String)
public ConceptClass getConceptClassByUuid(String uuid)
ConceptDAO
getConceptClassByUuid
in interface ConceptDAO
ConceptDAO.getConceptClassByUuid(java.lang.String)
public ConceptAnswer getConceptAnswerByUuid(String uuid)
getConceptAnswerByUuid
in interface ConceptDAO
public ConceptName getConceptNameByUuid(String uuid)
getConceptNameByUuid
in interface ConceptDAO
public ConceptSet getConceptSetByUuid(String uuid)
getConceptSetByUuid
in interface ConceptDAO
public ConceptSetDerived getConceptSetDerivedByUuid(String uuid)
getConceptSetDerivedByUuid
in interface ConceptDAO
public ConceptSource getConceptSourceByUuid(String uuid)
getConceptSourceByUuid
in interface ConceptDAO
public ConceptWord getConceptWordByUuid(String uuid)
getConceptWordByUuid
in interface ConceptDAO
public ConceptDatatype getConceptDatatypeByUuid(String uuid)
ConceptDAO
getConceptDatatypeByUuid
in interface ConceptDAO
ConceptDAO.getConceptDatatypeByUuid(java.lang.String)
public ConceptNumeric getConceptNumericByUuid(String uuid)
ConceptDAO
getConceptNumericByUuid
in interface ConceptDAO
ConceptDAO.getConceptNumericByUuid(java.lang.String)
public ConceptProposal getConceptProposalByUuid(String uuid)
ConceptDAO
getConceptProposalByUuid
in interface ConceptDAO
ConceptDAO.getConceptProposalByUuid(java.lang.String)
public Drug getDrugByUuid(String uuid)
ConceptDAO
getDrugByUuid
in interface ConceptDAO
ConceptDAO.getDrugByUuid(java.lang.String)
public DrugIngredient getDrugIngredientByUuid(String uuid)
getDrugIngredientByUuid
in interface ConceptDAO
public Map<Integer,String> getConceptUuids()
getConceptUuids
in interface ConceptDAO
ConceptDAO.getConceptUuids()
public ConceptDescription getConceptDescriptionByUuid(String uuid)
getConceptDescriptionByUuid
in interface ConceptDAO
ConceptDAO.getConceptDescriptionByUuid(java.lang.String)
public ConceptNameTag getConceptNameTagByUuid(String uuid)
getConceptNameTagByUuid
in interface ConceptDAO
ConceptDAO.getConceptNameTagByUuid(java.lang.String)
public List<ConceptMap> getConceptsByConceptSource(ConceptSource conceptSource) throws DAOException
getConceptsByConceptSource
in interface ConceptDAO
DAOException
org.openmrs.api.db.ConceptDAO#getConceptsByConceptSourceName(java.lang.String,
java.lang.String)
public ConceptSource getConceptSourceByName(String conceptSourceName) throws DAOException
getConceptSourceByName
in interface ConceptDAO
DAOException
ConceptDAO.getConceptSourceByName(java.lang.String)
public ConceptDatatype getSavedConceptDatatype(Concept concept)
ConceptDAO
getSavedConceptDatatype
in interface ConceptDAO
concept
- for which the conceptDatatype should be fetchedConceptDAO.getSavedConceptDatatype(org.openmrs.Concept)
public ConceptName getSavedConceptName(ConceptName conceptName)
ConceptDAO
getSavedConceptName
in interface ConceptDAO
conceptName
- ConceptName to fetch from the databaseConceptDAO.getSavedConceptName(org.openmrs.ConceptName)
public Integer getCountOfConceptWords(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept, boolean forUniqueConcepts)
ConceptDAO
getCountOfConceptWords
in interface ConceptDAO
phrase
- text to search onlocales
- the locales to restrict toincludeRetired
- Specifies whether to include retired conceptsrequireClasses
- ListexcludeClasses
- ListrequireDatatypes
- ListexcludeDatatypes
- ListanswersToConcept
- all results will be a possible answer to this conceptforUniqueConcepts
- Specifies if conceptWords that are associated to multiple
conceptWords should be counted one or more times.org.openmrs.api.db.ConceptDAO#getCountOfConceptWords(String, List, boolean, List, List,
List, List, Concept)
public Integer getCountOfDrugs(String drugName, Concept concept, boolean searchOnPhrase, boolean searchDrugConceptNames, boolean includeRetired) throws DAOException
getCountOfDrugs
in interface ConceptDAO
DAOException
ConceptService#getCountOfDrugs(String, Concept, boolean, boolean)
public List<Drug> getDrugs(String drugName, Concept concept, boolean searchOnPhrase, boolean searchDrugConceptNames, boolean includeRetired, Integer start, Integer length) throws DAOException
getDrugs
in interface ConceptDAO
DAOException
ConceptService.getDrugs(String, Concept, boolean, boolean, boolean, Integer, Integer)
public List<ConceptSearchResult> getConcepts(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept, Integer start, Integer size) throws DAOException
getConcepts
in interface ConceptDAO
DAOException
ConceptDAO.getConcepts(String, List, boolean, List, List, List, List, Concept, Integer,
Integer)
public Double weighConceptWord(ConceptWord word)
ConceptDAO
weighConceptWord
in interface ConceptDAO
word
- the word for which to compute the weightConceptDAO.weighConceptWord(ConceptWord)
public List<Concept> getConceptsByName(String name, Locale locale, Boolean exactLocale)
getConceptsByName
in interface ConceptDAO
ConceptDAO.getConceptsByName(java.lang.String, java.util.Locale,
java.lang.Boolean)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.