@Entity public class Relationship extends BaseChangeableOpenmrsData
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.
|
Date |
getEndDate()
If not null, this indicates that the relationship ended on a particular date
|
Integer |
getId() |
Person |
getPersonA() |
Person |
getPersonB() |
Integer |
getRelationshipId() |
RelationshipType |
getRelationshipType() |
Date |
getStartDate()
If not null, this indicates that the relationship started on a particular date
|
void |
setEndDate(Date endDate) |
void |
setId(Integer id) |
void |
setPersonA(Person personA) |
void |
setPersonB(Person personB) |
void |
setRelationshipId(Integer relationshipId) |
void |
setRelationshipType(RelationshipType type) |
void |
setStartDate(Date startDate) |
String |
toString()
Returns a string equal to the value of: ClassName{hashCode=...,
uuid=...}
|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReason
equals, getUuid, hashCode, 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 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 Date getStartDate()
public void setStartDate(Date startDate)
startDate
- relationship's start date.public Date getEndDate()
public void setEndDate(Date endDate)
endDate
- relationship's end date.public String toString()
BaseOpenmrsObject
ClassName{hashCode=..., uuid=...}
If the uuid
field is null
, it returns:
ClassName{hashCode=...}Should include hashCode if uuid is null Should include uuid if not null
toString
in class BaseOpenmrsObject
public Integer getId()
OpenmrsObject.getId()
public void setId(Integer id)
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
Copyright © 2024 OpenMRS Inc.. All rights reserved.