@MappedSuperclass public abstract class BaseOpenmrsObject extends Object implements Serializable, OpenmrsObject
OpenmrsObject interface.| Constructor and Description |
|---|
BaseOpenmrsObject() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Returns
true if and only if x and y refer to the same
object (x == y has the value true) or both have the same
uuid (((x.uuid ! |
String |
getUuid() |
int |
hashCode()
Returns a hash code based on the
uuid field. |
void |
setUuid(String uuid) |
String |
toString()
Returns a string equal to the value of: ClassName{hashCode=...,
uuid=...}
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetId, setIdpublic String getUuid()
getUuid in interface OpenmrsObjectOpenmrsObject.getUuid()public void setUuid(String uuid)
setUuid in interface OpenmrsObjectuuid - a universally unique id for this objectOpenmrsObject.setUuid(java.lang.String)public int hashCode()
uuid field.
If the uuid field is null, it delegates to
Object.hashCode().
hashCode in class ObjectShould not fail if uuid is nullpublic boolean equals(Object obj)
true if and only if x and y refer to the same
object (x == y has the value true) or both have the same
uuid (((x.uuid != null) && x.uuid.equals(y.uuid)) has the value
true).equals in class ObjectShould return false if given obj is not instance of BaseOpenmrsObject
Should return false if given obj is null
Should return false if given obj has null uuid
Should return false if uuid is null
Should return true if objects are the same
Should return true if uuids are equalCopyright © 2024 OpenMRS Inc.. All rights reserved.