org.openmrs
Class Relationship

java.lang.Object
  extended by org.openmrs.BaseOpenmrsObject
      extended by org.openmrs.BaseOpenmrsData
          extended by org.openmrs.Relationship
All Implemented Interfaces:
java.io.Serializable, Auditable, OpenmrsData, OpenmrsObject, Voidable

public class Relationship
extends BaseOpenmrsData
implements java.io.Serializable

Relationship

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Fields inherited from class org.openmrs.BaseOpenmrsData
creator
 
Constructor Summary
Relationship()
          default constructor
Relationship(java.lang.Integer relationshipId)
          constructor with id
Relationship(Person personA, Person personB, RelationshipType type)
           
 
Method Summary
 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(java.lang.Object obj)
          Compares two objects for similarity
 java.lang.Integer getId()
           
 Person getPersonA()
           
 Person getPersonB()
           
 java.lang.Integer getRelationshipId()
           
 RelationshipType getRelationshipType()
           
 java.lang.Boolean getVoided()
          Deprecated. Use isVoided()
 int hashCode()
           
 void setId(java.lang.Integer id)
           
 void setPersonA(Person personA)
           
 void setPersonB(Person personB)
           
 void setRelationshipId(java.lang.Integer relationshipId)
           
 void setRelationshipType(RelationshipType type)
           
 java.lang.String toString()
           
 
Methods inherited from class org.openmrs.BaseOpenmrsData
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReason
 
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

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

Relationship

public Relationship()
default constructor


Relationship

public Relationship(java.lang.Integer relationshipId)
constructor with id


Relationship

public Relationship(Person personA,
                    Person personB,
                    RelationshipType type)
Method Detail

copy

public Relationship copy()
Does a shallow copy of this Relationship. Does NOT copy relationshipId

Returns:
a copy of this relationship

copyHelper

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.

Parameters:
target - a Relationship that will have the state of this copied into it
Returns:
the Relationship that was passed in, with state copied into it

equals

public boolean equals(java.lang.Object obj)
Compares two objects for similarity

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
boolean true/false whether or not they are the same objects

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getPersonA

public Person getPersonA()
Returns:
Returns the personA.

setPersonA

public void setPersonA(Person personA)
Parameters:
personA - The person to set.

getRelationshipType

public RelationshipType getRelationshipType()
Returns:
Returns the relationship type.

setRelationshipType

public void setRelationshipType(RelationshipType type)
Parameters:
type - The relationship type to set.

getRelationshipId

public java.lang.Integer getRelationshipId()
Returns:
Returns the relationshipId.

setRelationshipId

public void setRelationshipId(java.lang.Integer relationshipId)
Parameters:
relationshipId - The relationshipId to set.

getPersonB

public Person getPersonB()
Returns:
Returns the personB.

setPersonB

public void setPersonB(Person personB)
Parameters:
personB - The relative to set.

getVoided

public java.lang.Boolean getVoided()
Deprecated. Use isVoided()

Description copied from class: BaseOpenmrsData
This method delegates to 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.

Overrides:
getVoided in class BaseOpenmrsData
Returns:
Returns the voided.
See Also:
BaseOpenmrsData.isVoided()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getId

public java.lang.Integer getId()
Specified by:
getId in interface OpenmrsObject
Returns:
id - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.getId()

setId

public void setId(java.lang.Integer id)
Specified by:
setId in interface OpenmrsObject
Parameters:
id - - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.setId(java.lang.Integer)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change