public class Relationship extends BaseOpenmrsData implements Serializable
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
creator
Constructor and Description |
---|
Relationship()
default constructor
|
Relationship(Integer relationshipId)
constructor with id
|
Relationship(Person personA,
Person personB,
RelationshipType type) |
Modifier and Type | Method and Description |
---|---|
Relationship |
copy()
Does a shallow copy of this Relationship.
|
protected Relationship |
copyHelper(Relationship target)
The purpose of this method is to allow subclasses of Relationship to delegate a portion of
their copy() method back to the superclass, in case the base class implementation changes.
|
boolean |
equals(Object obj)
Compares two objects for similarity
|
Integer |
getId() |
Person |
getPersonA() |
Person |
getPersonB() |
Integer |
getRelationshipId() |
RelationshipType |
getRelationshipType() |
Boolean |
getVoided()
Deprecated.
Use isVoided()
|
int |
hashCode() |
void |
setId(Integer id) |
void |
setPersonA(Person personA) |
void |
setPersonB(Person personB) |
void |
setRelationshipId(Integer relationshipId) |
void |
setRelationshipType(RelationshipType type) |
String |
toString() |
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReason
getUuid, setUuid
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
public Relationship()
public Relationship(Integer relationshipId)
public Relationship(Person personA, Person personB, RelationshipType type)
public Relationship copy()
protected Relationship copyHelper(Relationship target)
target
- a Relationship that will have the state of this
copied into itpublic boolean equals(Object obj)
public Person getPersonA()
public void setPersonA(Person personA)
personA
- The person to set.public RelationshipType getRelationshipType()
public void setRelationshipType(RelationshipType type)
type
- The relationship type to set.public Integer getRelationshipId()
public void setRelationshipId(Integer relationshipId)
relationshipId
- The relationshipId to set.public Person getPersonB()
public void setPersonB(Person personB)
personB
- The relative to set.public Boolean getVoided()
BaseOpenmrsData
BaseOpenmrsData.isVoided()
. This is only needed for jstl syntax like
${person.voided} because the return type is a Boolean object instead of a boolean primitive
type.getVoided
in class BaseOpenmrsData
BaseOpenmrsData.isVoided()
public Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.