public class HibernatePersonDAO extends Object implements PersonDAO
PersonService ps = Context.getPersonService();
ps.getPeople("name", false);
PersonDAO,
PersonService,
Context| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
HibernatePersonDAO() |
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory - public Set<Person> getSimilarPeople(String name, Integer birthyear, String gender) throws DAOException
getSimilarPeople in interface PersonDAODAOExceptionPersonService.getSimilarPeople(java.lang.String,java.lang.Integer,java.lang.String,java.lang.String),
org.openmrs.api.db.PersonDAO#getSimilarPeople(java.lang.String,java.lang.Integer,java.lang.String,java.lang.String)public List<Person> getPeople(String name, Boolean dead)
getPeople in interface PersonDAOPersonDAO.getPeople(java.lang.String, java.lang.Boolean)protected static Integer getMaximumSearchResults()
public Person getPerson(Integer personId)
getPerson in interface PersonDAOPersonService.getPerson(java.lang.Integer),
PersonDAO.getPerson(java.lang.Integer)public void deletePersonAttributeType(PersonAttributeType type)
public PersonAttributeType savePersonAttributeType(PersonAttributeType type)
public PersonAttributeType getPersonAttributeType(Integer typeId)
getPersonAttributeType in interface PersonDAOPersonService.getPersonAttributeType(java.lang.Integer),
PersonDAO.getPersonAttributeType(java.lang.Integer)public PersonAttribute getPersonAttribute(Integer id)
getPersonAttribute in interface PersonDAOPersonService.getPersonAttribute(java.lang.Integer),
PersonDAO.getPersonAttribute(java.lang.Integer)public List<PersonAttributeType> getAllPersonAttributeTypes(boolean includeRetired) throws DAOException
getAllPersonAttributeTypes in interface PersonDAODAOExceptionPersonService.getAllPersonAttributeTypes(boolean),
PersonDAO.getAllPersonAttributeTypes(boolean)public List<PersonAttributeType> getPersonAttributeTypes(String exactName, String format, Integer foreignKey, Boolean searchable) throws DAOException
getPersonAttributeTypes in interface PersonDAODAOExceptionPersonDAO.getPersonAttributeTypes(java.lang.String, java.lang.String,
java.lang.Integer, java.lang.Boolean)public Relationship getRelationship(Integer relationshipId) throws DAOException
getRelationship in interface PersonDAODAOExceptionPersonService.getRelationship(java.lang.Integer),
PersonDAO.getRelationship(java.lang.Integer)public List<Relationship> getAllRelationships(boolean includeVoided) throws DAOException
getAllRelationships in interface PersonDAODAOExceptionPersonService.getAllRelationships(boolean),
PersonDAO.getAllRelationships(boolean)public List<Relationship> getRelationships(Person fromPerson, Person toPerson, RelationshipType relType)
public RelationshipType getRelationshipType(Integer relationshipTypeId) throws DAOException
getRelationshipType in interface PersonDAODAOExceptionPersonService.getRelationshipType(java.lang.Integer),
PersonDAO.getRelationshipType(java.lang.Integer)public List<RelationshipType> getRelationshipTypes(String relationshipTypeName, Boolean preferred) throws DAOException
getRelationshipTypes in interface PersonDAODAOExceptionPersonService.getRelationshipTypes(java.lang.String, java.lang.Boolean),
PersonDAO.getRelationshipTypes(java.lang.String, java.lang.Boolean)public RelationshipType saveRelationshipType(RelationshipType relationshipType) throws DAOException
saveRelationshipType in interface PersonDAODAOExceptionPersonService.saveRelationshipType(org.openmrs.RelationshipType),
PersonDAO.saveRelationshipType(org.openmrs.RelationshipType)public void deleteRelationshipType(RelationshipType relationshipType) throws DAOException
deleteRelationshipType in interface PersonDAODAOExceptionPersonService.deleteRelationshipType(org.openmrs.RelationshipType),
PersonDAO.deleteRelationshipType(org.openmrs.RelationshipType)public void deletePerson(Person person) throws DAOException
deletePerson in interface PersonDAODAOExceptionPersonService.purgePerson(org.openmrs.Person),
PersonDAO.deletePerson(org.openmrs.Person)public Person savePerson(Person person) throws DAOException
savePerson in interface PersonDAODAOExceptionPersonService.savePerson(org.openmrs.Person),
PersonDAO.savePerson(org.openmrs.Person)public Relationship saveRelationship(Relationship relationship) throws DAOException
saveRelationship in interface PersonDAODAOExceptionPersonService.saveRelationship(org.openmrs.Relationship),
PersonDAO.saveRelationship(org.openmrs.Relationship)public void deleteRelationship(Relationship relationship) throws DAOException
deleteRelationship in interface PersonDAODAOExceptionPersonService.purgeRelationship(org.openmrs.Relationship),
PersonDAO.deleteRelationship(org.openmrs.Relationship)public static void deletePersonAndAttributes(org.hibernate.SessionFactory sessionFactory,
Person person)
sessionFactory - the session factory from which to pull the current sessionperson - the person to deletepublic PersonAttributeType getPersonAttributeTypeByUuid(String uuid)
PersonDAOgetPersonAttributeTypeByUuid in interface PersonDAOPersonDAO.getPersonAttributeTypeByUuid(java.lang.String)public String getSavedPersonAttributeTypeName(PersonAttributeType personAttributeType)
PersonDAOOpenmrsConstants.GLOBAL_PROPERTIES_OF_PERSON_ATTRIBUTES and reference the given
personAttributeType.
getSavedPersonAttributeTypeName in interface PersonDAOpersonAttributeType - the personAttributeType get the the name ofPersonDAO.getSavedPersonAttributeTypeName(org.openmrs.PersonAttributeType)public Person getPersonByUuid(String uuid)
PersonDAOgetPersonByUuid in interface PersonDAOPersonDAO.getPersonByUuid(java.lang.String)public PersonAddress getPersonAddressByUuid(String uuid)
getPersonAddressByUuid in interface PersonDAOpublic PersonAttribute getPersonAttributeByUuid(String uuid)
getPersonAttributeByUuid in interface PersonDAOpublic PersonName getPersonNameByUuid(String uuid)
getPersonNameByUuid in interface PersonDAOpublic Relationship getRelationshipByUuid(String uuid)
PersonDAOgetRelationshipByUuid in interface PersonDAOPersonDAO.getRelationshipByUuid(java.lang.String)public RelationshipType getRelationshipTypeByUuid(String uuid)
PersonDAOgetRelationshipTypeByUuid in interface PersonDAOPersonDAO.getRelationshipTypeByUuid(java.lang.String)public List<RelationshipType> getAllRelationshipTypes(boolean includeRetired)
getAllRelationshipTypes in interface PersonDAOPersonDAO.getAllRelationshipTypes(boolean)Copyright © 2018 OpenMRS LLC.. All Rights Reserved.