org.openmrs
Class EncounterType
java.lang.Object
org.openmrs.BaseOpenmrsObject
org.openmrs.BaseOpenmrsMetadata
org.openmrs.EncounterType
- All Implemented Interfaces:
- java.io.Serializable, Auditable, OpenmrsMetadata, OpenmrsObject, Retireable
public class EncounterType
- extends BaseOpenmrsMetadata
- implements java.io.Serializable
An EncounterType defines how a certain kind of Encounter
.
- See Also:
Encounter
,
Serialized Form
Constructor Summary |
EncounterType()
default constructor |
EncounterType(java.lang.Integer encounterTypeId)
Constructor with id |
EncounterType(java.lang.String name,
java.lang.String description)
Required values constructor. |
Methods inherited from class org.openmrs.BaseOpenmrsMetadata |
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateRetired, getDescription, getName, getRetired, getRetiredBy, getRetireReason, isRetired, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateRetired, setDescription, setName, setRetired, setRetiredBy, setRetireReason |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
EncounterType
public EncounterType()
- default constructor
EncounterType
public EncounterType(java.lang.Integer encounterTypeId)
- Constructor with id
- Expected behavior:
- set encounter type id with given parameter
EncounterType
public EncounterType(java.lang.String name,
java.lang.String description)
- Required values constructor. This is the minimum number of values that must be non-null in
order to have a successful save to the database
- Parameters:
name
- the name of this encounter typedescription
- a short description of why this encounter type exists
equals
public boolean equals(java.lang.Object obj)
- Compares two EncounterType objects for similarity
- Overrides:
equals
in class java.lang.Object
- Parameters:
obj
-
- Returns:
- boolean true/false whether or not they are the same objects
- Expected behavior:
- have equal encounter type objects by encounter type id, not have equal encounter type objects by encounterTypeId, have equal encounter type objects with no encounterTypeId, not have equal encounter type objects when one has null encounterTypeId
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
- See Also:
Object.hashCode()
- Expected behavior:
- get hashCode even with null attributes
getEncounterTypeId
public java.lang.Integer getEncounterTypeId()
- Returns:
- Returns the encounterTypeId.
setEncounterTypeId
public void setEncounterTypeId(java.lang.Integer encounterTypeId)
- Parameters:
encounterTypeId
- The encounterTypeId to set.
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)
Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change