public interface PersonDAO
This is used by the PersonService. This should not be used directly, but rather used through the methods on the PersonService.
Use case:
PersonService ps = Context.getPersonService();
ps....
PersonService
,
Context
Modifier and Type | Method and Description |
---|---|
void |
deletePerson(Person person) |
void |
deletePersonAttributeType(PersonAttributeType type) |
void |
deleteRelationship(Relationship relationship) |
void |
deleteRelationshipType(RelationshipType relationshipType) |
java.util.List<PersonAttributeType> |
getAllPersonAttributeTypes(boolean includeRetired) |
java.util.List<PersonMergeLog> |
getAllPersonMergeLogs()
Gets all the PersonMergeLog objects in the model
|
java.util.List<Relationship> |
getAllRelationships(boolean includeVoided) |
java.util.List<RelationshipType> |
getAllRelationshipTypes(boolean includeRetired) |
PersonMergeLog |
getLosingPersonMergeLogs(Person person)
Finds the PersonMergeLog by loser
|
java.util.List<Person> |
getPeople(java.lang.String searchPhrase,
java.lang.Boolean dead) |
Person |
getPerson(java.lang.Integer personId) |
PersonAddress |
getPersonAddressByUuid(java.lang.String uuid) |
PersonAttribute |
getPersonAttribute(java.lang.Integer id) |
PersonAttribute |
getPersonAttributeByUuid(java.lang.String uuid) |
PersonAttributeType |
getPersonAttributeType(java.lang.Integer typeId) |
PersonAttributeType |
getPersonAttributeTypeByUuid(java.lang.String uuid)
Auto generated method comment
|
java.util.List<PersonAttributeType> |
getPersonAttributeTypes(java.lang.String exactName,
java.lang.String format,
java.lang.Integer foreignKey,
java.lang.Boolean searchable) |
Person |
getPersonByUuid(java.lang.String uuid)
Auto generated method comment
|
PersonMergeLog |
getPersonMergeLog(java.lang.Integer id)
Gets a
PersonMergeLog object from the model by id |
PersonMergeLog |
getPersonMergeLogByUuid(java.lang.String uuid)
Gets a PersonMergeLog object from the model using UUID
|
PersonName |
getPersonName(java.lang.Integer personNameId) |
PersonName |
getPersonNameByUuid(java.lang.String uuid) |
Relationship |
getRelationship(java.lang.Integer relationshipId) |
Relationship |
getRelationshipByUuid(java.lang.String uuid)
Auto generated method comment
|
java.util.List<Relationship> |
getRelationships(Person fromPerson,
Person toPerson,
RelationshipType relType) |
java.util.List<Relationship> |
getRelationships(Person fromPerson,
Person toPerson,
RelationshipType relType,
java.util.Date startEffectiveDate,
java.util.Date endEffectiveDate) |
RelationshipType |
getRelationshipType(java.lang.Integer relationshipTypeId) |
RelationshipType |
getRelationshipTypeByUuid(java.lang.String uuid)
Auto generated method comment
|
java.util.List<RelationshipType> |
getRelationshipTypes(java.lang.String relationshipTypeName,
java.lang.Boolean preferred) |
java.lang.String |
getSavedPersonAttributeTypeName(PersonAttributeType personAttributeType)
Gets the value of name currently saved in the database for the given personAttributeType,
bypassing any caches.
|
java.util.Set<Person> |
getSimilarPeople(java.lang.String name,
java.lang.Integer birthyear,
java.lang.String gender) |
java.util.List<PersonMergeLog> |
getWinningPersonMergeLogs(Person person)
Gets the PersonMergeLog objects by winner
|
Person |
savePerson(Person person) |
PersonAddress |
savePersonAddress(PersonAddress personAddress) |
PersonAttributeType |
savePersonAttributeType(PersonAttributeType type) |
PersonMergeLog |
savePersonMergeLog(PersonMergeLog personMergeLog)
Saves a
PersonMergeLog object to the database |
PersonName |
savePersonName(PersonName personName) |
Relationship |
saveRelationship(Relationship relationship) |
RelationshipType |
saveRelationshipType(RelationshipType relationshipType) |
java.util.Set<Person> getSimilarPeople(java.lang.String name, java.lang.Integer birthyear, java.lang.String gender) throws DAOException
java.util.List<Person> getPeople(java.lang.String searchPhrase, java.lang.Boolean dead) throws DAOException
DAOException
PersonService.getPeople(String, Boolean)
PersonAttributeType savePersonAttributeType(PersonAttributeType type) throws DAOException
void deletePersonAttributeType(PersonAttributeType type) throws DAOException
java.util.List<PersonAttributeType> getPersonAttributeTypes(java.lang.String exactName, java.lang.String format, java.lang.Integer foreignKey, java.lang.Boolean searchable) throws DAOException
java.util.List<PersonAttributeType> getAllPersonAttributeTypes(boolean includeRetired) throws DAOException
PersonAttributeType getPersonAttributeType(java.lang.Integer typeId) throws DAOException
DAOException
PersonService.getPersonAttributeType(java.lang.Integer)
PersonAttribute getPersonAttribute(java.lang.Integer id) throws DAOException
DAOException
PersonService.getPersonAttribute(java.lang.Integer)
Relationship getRelationship(java.lang.Integer relationshipId) throws DAOException
DAOException
PersonService.getRelationship(java.lang.Integer)
java.util.List<Relationship> getAllRelationships(boolean includeVoided) throws DAOException
DAOException
PersonService.getAllRelationships(boolean)
RelationshipType getRelationshipType(java.lang.Integer relationshipTypeId) throws DAOException
DAOException
PersonService.getRelationshipType(java.lang.Integer)
java.util.List<RelationshipType> getRelationshipTypes(java.lang.String relationshipTypeName, java.lang.Boolean preferred) throws DAOException
Person savePerson(Person person) throws DAOException
DAOException
PersonService.savePerson(org.openmrs.Person)
void deletePerson(Person person) throws DAOException
DAOException
PersonService.deletePerson(org.openmrs.Person)
Person getPerson(java.lang.Integer personId) throws DAOException
DAOException
PersonService.getPerson(java.lang.Integer)
Relationship saveRelationship(Relationship relationship) throws DAOException
DAOException
PersonService.saveRelationship(org.openmrs.Relationship)
void deleteRelationship(Relationship relationship) throws DAOException
DAOException
PersonService.purgeRelationship(org.openmrs.Relationship)
java.util.List<Relationship> getRelationships(Person fromPerson, Person toPerson, RelationshipType relType) throws DAOException
java.util.List<Relationship> getRelationships(Person fromPerson, Person toPerson, RelationshipType relType, java.util.Date startEffectiveDate, java.util.Date endEffectiveDate) throws DAOException
RelationshipType saveRelationshipType(RelationshipType relationshipType) throws DAOException
DAOException
PersonService.saveRelationshipType(org.openmrs.RelationshipType)
void deleteRelationshipType(RelationshipType relationshipType) throws DAOException
Person getPersonByUuid(java.lang.String uuid)
uuid
- PersonAddress getPersonAddressByUuid(java.lang.String uuid)
PersonAttribute getPersonAttributeByUuid(java.lang.String uuid)
PersonName getPersonName(java.lang.Integer personNameId)
PersonName getPersonNameByUuid(java.lang.String uuid)
Relationship getRelationshipByUuid(java.lang.String uuid)
uuid
- RelationshipType getRelationshipTypeByUuid(java.lang.String uuid)
uuid
- PersonAttributeType getPersonAttributeTypeByUuid(java.lang.String uuid)
uuid
- java.lang.String getSavedPersonAttributeTypeName(PersonAttributeType personAttributeType)
OpenmrsConstants.GLOBAL_PROPERTIES_OF_PERSON_ATTRIBUTES
and reference the given
personAttributeType. personAttributeType
- the personAttributeType get the the name ofjava.util.List<RelationshipType> getAllRelationshipTypes(boolean includeRetired)
org.openmrs.api.PersonService#getAllRelationshipTypes(java.lang.Boolean)
PersonMergeLog savePersonMergeLog(PersonMergeLog personMergeLog) throws DAOException
PersonMergeLog
object to the databasepersonMergeLog
- the PersonMergeLog
object to savePersonMergeLog
objectDAOException
PersonMergeLog getPersonMergeLog(java.lang.Integer id) throws DAOException
PersonMergeLog
object from the model by idid
- the id of the PersonMergeLog
object to retrievePersonMergeLog
objectDAOException
PersonMergeLog getPersonMergeLogByUuid(java.lang.String uuid) throws DAOException
uuid
- the UUID of the PersonMergeLog object to retrieveDAOException
java.util.List<PersonMergeLog> getAllPersonMergeLogs() throws DAOException
DAOException
java.util.List<PersonMergeLog> getWinningPersonMergeLogs(Person person) throws DAOException
person
- the winning personPersonMergeLog
objectsDAOException
PersonMergeLog getLosingPersonMergeLogs(Person person) throws DAOException
person
- PersonMergeLog
objectDAOException
PersonName savePersonName(PersonName personName)
PersonAddress savePersonAddress(PersonAddress personAddress)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.