org.openmrs
Class BaseOpenmrsData

java.lang.Object
  extended by org.openmrs.BaseOpenmrsObject
      extended by org.openmrs.BaseOpenmrsData
All Implemented Interfaces:
Auditable, OpenmrsData, OpenmrsObject, Voidable
Direct Known Subclasses:
ActiveListItem, Cohort, Encounter, Obs, Order, PatientIdentifier, PatientProgram, PatientState, Person, PersonAddress, PersonAttribute, PersonName, Relationship

public abstract class BaseOpenmrsData
extends BaseOpenmrsObject
implements OpenmrsData

In OpenMRS, we distinguish between data and metadata within our data model. Data (as opposed to metadata) generally represent person- or patient-specific data. This provides a default abstract implementation of the OpenmrsData interface

Since:
1.5
See Also:
OpenmrsData

Field Summary
protected  User creator
           
 
Constructor Summary
BaseOpenmrsData()
          Default Constructor
 
Method Summary
 User getChangedBy()
           
 User getCreator()
           
 java.util.Date getDateChanged()
           
 java.util.Date getDateCreated()
           
 java.util.Date getDateVoided()
           
 java.lang.Boolean getVoided()
          This method delegates to isVoided().
 User getVoidedBy()
           
 java.lang.String getVoidReason()
           
 java.lang.Boolean isVoided()
           
 void setChangedBy(User changedBy)
           
 void setCreator(User creator)
           
 void setDateChanged(java.util.Date dateChanged)
           
 void setDateCreated(java.util.Date dateCreated)
           
 void setDateVoided(java.util.Date dateVoided)
           
 void setVoided(java.lang.Boolean voided)
           
 void setVoidedBy(User voidedBy)
           
 void setVoidReason(java.lang.String voidReason)
           
 
Methods inherited from class org.openmrs.BaseOpenmrsObject
getUuid, setUuid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openmrs.OpenmrsObject
getId, getUuid, setId, setUuid
 

Field Detail

creator

protected User creator
Constructor Detail

BaseOpenmrsData

public BaseOpenmrsData()
Default Constructor

Method Detail

getCreator

public User getCreator()
Specified by:
getCreator in interface Auditable
Returns:
User - the user who created the object
See Also:
Auditable.getCreator()

setCreator

public void setCreator(User creator)
Specified by:
setCreator in interface Auditable
Parameters:
creator - - the user who created the object
See Also:
Auditable.setCreator(org.openmrs.User)

getDateCreated

public java.util.Date getDateCreated()
Specified by:
getDateCreated in interface Auditable
Returns:
Date - the date the object was created
See Also:
Auditable.getDateCreated()

setDateCreated

public void setDateCreated(java.util.Date dateCreated)
Specified by:
setDateCreated in interface Auditable
Parameters:
dateCreated - - the date the object was created
See Also:
Auditable.setDateCreated(java.util.Date)

getChangedBy

public User getChangedBy()
Specified by:
getChangedBy in interface Auditable
Returns:
User - the user who last changed the object
See Also:
Auditable.getChangedBy()

setChangedBy

public void setChangedBy(User changedBy)
Specified by:
setChangedBy in interface Auditable
Parameters:
changedBy - - the user who last changed the object
See Also:
Auditable.setChangedBy(org.openmrs.User)

getDateChanged

public java.util.Date getDateChanged()
Specified by:
getDateChanged in interface Auditable
Returns:
Date - the date the object was last changed
See Also:
Auditable.getDateChanged()

setDateChanged

public void setDateChanged(java.util.Date dateChanged)
Specified by:
setDateChanged in interface Auditable
Parameters:
dateChanged - - the date the object was last changed
See Also:
Auditable.setDateChanged(java.util.Date)

isVoided

public java.lang.Boolean isVoided()
Specified by:
isVoided in interface Voidable
Returns:
Boolean - whether of not this object is voided
See Also:
Voidable.isVoided()

getVoided

public java.lang.Boolean getVoided()
This method delegates to 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.

See Also:
Voidable.isVoided()

setVoided

public void setVoided(java.lang.Boolean voided)
Specified by:
setVoided in interface Voidable
Parameters:
voided - - whether of not this object is voided
See Also:
Voidable.setVoided(java.lang.Boolean)

getDateVoided

public java.util.Date getDateVoided()
Specified by:
getDateVoided in interface Voidable
Returns:
Date - the date the object was voided
See Also:
Voidable.getDateVoided()

setDateVoided

public void setDateVoided(java.util.Date dateVoided)
Specified by:
setDateVoided in interface Voidable
Parameters:
dateVoided - - the date the object was voided
See Also:
Voidable.setDateVoided(java.util.Date)

getVoidedBy

public User getVoidedBy()
Specified by:
getVoidedBy in interface Voidable
Returns:
User - the user who voided the object
See Also:
Voidable.getVoidedBy()

setVoidedBy

public void setVoidedBy(User voidedBy)
Specified by:
setVoidedBy in interface Voidable
Parameters:
voidedBy - - the user who voided the object
See Also:
Voidable.setVoidedBy(org.openmrs.User)

getVoidReason

public java.lang.String getVoidReason()
Specified by:
getVoidReason in interface Voidable
Returns:
String - the reason the object was voided
See Also:
Voidable.getVoidReason()

setVoidReason

public void setVoidReason(java.lang.String voidReason)
Specified by:
setVoidReason in interface Voidable
Parameters:
voidReason - - the reason the object was voided
See Also:
Voidable.setVoidReason(java.lang.String)

OpenMRS-1.7.x

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