public class Relationship extends BaseOpenmrsData implements java.io.Serializable
| Modifier and Type | Field and Description | 
|---|---|
| static long | serialVersionUID | 
creator| Constructor and Description | 
|---|
| Relationship()default constructor | 
| Relationship(java.lang.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. | 
| java.util.Date | getEndDate()If not null, this indicates that the relationship ended on a particular date | 
| java.lang.Integer | getId() | 
| Person | getPersonA() | 
| Person | getPersonB() | 
| java.lang.Integer | getRelationshipId() | 
| RelationshipType | getRelationshipType() | 
| java.util.Date | getStartDate()If not null, this indicates that the relationship started on a particular date | 
| java.lang.Boolean | getVoided()Deprecated. 
 Use isVoided() | 
| void | setEndDate(java.util.Date endDate) | 
| void | setId(java.lang.Integer id) | 
| void | setPersonA(Person personA) | 
| void | setPersonB(Person personB) | 
| void | setRelationshipId(java.lang.Integer relationshipId) | 
| void | setRelationshipType(RelationshipType type) | 
| void | setStartDate(java.util.Date startDate) | 
| java.lang.String | toString()Returns a string consisting of the name of the class of which the object is an instance and
 the  uuidfield surrounded by[and]. | 
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReasonequals, getUuid, hashCode, setUuidclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetUuid, setUuidpublic static final long serialVersionUID
public Relationship()
public Relationship(java.lang.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 java.lang.Integer getRelationshipId()
public void setRelationshipId(java.lang.Integer relationshipId)
relationshipId - The relationshipId to set.public Person getPersonB()
public void setPersonB(Person personB)
personB - The relative to set.public java.util.Date getStartDate()
public void setStartDate(java.util.Date startDate)
Sets - relationship's start date.public java.util.Date getEndDate()
public void setEndDate(java.util.Date endDate)
Sets - relationship's end date.public java.lang.Boolean getVoided()
BaseOpenmrsDataBaseOpenmrsData.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 BaseOpenmrsDataBaseOpenmrsData.isVoided()public java.lang.String toString()
BaseOpenmrsObjectuuid field surrounded by [ and ]. In other words,
 this method returns a string equal to the value of: getClass().getName() + '[' + uuid + ']'
 If the uuid field is null, it delegates to
 Object.toString()
toString in class BaseOpenmrsObjectObject.toString()public java.lang.Integer getId()
getId in interface OpenmrsObjectOpenmrsObject.getId()public void setId(java.lang.Integer id)
setId in interface OpenmrsObjectid - - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)Copyright © 2018 OpenMRS Inc.. All Rights Reserved.