|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.BaseOpenmrsObject org.openmrs.BaseOpenmrsMetadata org.openmrs.RelationshipType
public class RelationshipType
Defines a type of relationship between two people in the database.
A relationship is two-way. There is a name for the relationship in both directions.
For example:
a) physician Joe
b) patient Bob
Joe is the "physician of" Bob and Bob is the patient of Joe. Once you can establish one of
the two relationships, you automatically know the other.
ALL relationships are two-way and can be defined as such.
RelationshipTypes should be defined as gender non-specific For example: A mother and her
son. Instead of having a RelationshipType defined as mother-son, it should be defined as
Parent-child. (This avoids the duplicative types that would come out like father-son,
father-daughter, mother-daughter)
In English, we run into a tricky RelationshipType with aunts and uncles. We have chosen to define
them as aunt/uncle-niece/nephew.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Constructor Summary | |
---|---|
RelationshipType()
default constructor |
|
RelationshipType(java.lang.Integer relationshipTypeId)
constructor with id |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Compares two RelationshipTypes for similarity |
java.lang.String |
getaIsToB()
The java bean specifications says that if an attribute has the second letter capitalized (as the "I" is), the initial "a" is not to be capitalized. |
java.lang.String |
getbIsToA()
|
java.lang.Integer |
getId()
|
java.lang.Integer |
getRelationshipTypeId()
|
java.lang.Integer |
getWeight()
|
int |
hashCode()
|
java.lang.Boolean |
isPreferred()
"Preferred" relationship types are those that should be shown as default types when adding/editing a person's relationships |
void |
setaIsToB(java.lang.String aisToB)
|
void |
setbIsToA(java.lang.String bisToA)
|
void |
setId(java.lang.Integer id)
|
void |
setPreferred(java.lang.Boolean preferred)
"Preferred" relationship types are those that should be shown as default types when adding/editing a person's relationships |
void |
setRelationshipTypeId(java.lang.Integer relationshipTypeId)
|
void |
setWeight(java.lang.Integer weight)
|
java.lang.String |
toString()
|
Methods inherited from class org.openmrs.BaseOpenmrsMetadata |
---|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateRetired, getDescription, getName, getRetired, getRetiredBy, getRetireReason, isRetired, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateRetired, setDescription, setName, setRetired, setRetiredBy, setRetireReason |
Methods inherited from class org.openmrs.BaseOpenmrsObject |
---|
getUuid, setUuid |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.openmrs.OpenmrsObject |
---|
getUuid, setUuid |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public RelationshipType()
public RelationshipType(java.lang.Integer relationshipTypeId)
Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- RelationshipType to compare to this object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.Integer getRelationshipTypeId()
public void setRelationshipTypeId(java.lang.Integer relationshipTypeId)
relationshipTypeId
- The relationshipTypeId to set.public java.lang.Integer getWeight()
public void setWeight(java.lang.Integer weight)
weight
- the weight to setpublic java.lang.String getaIsToB()
public void setaIsToB(java.lang.String aisToB)
aisToB
- the aIsToB to setpublic java.lang.String getbIsToA()
public java.lang.Boolean isPreferred()
public void setPreferred(java.lang.Boolean preferred)
preferred
- sets the preferred status of this relationship typepublic void setbIsToA(java.lang.String bisToA)
bisToA
- the bIsToA to setpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(java.lang.Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |