@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, wait
getId, setId
public String getUuid()
getUuid
in interface OpenmrsObject
OpenmrsObject.getUuid()
public void setUuid(String uuid)
setUuid
in interface OpenmrsObject
uuid
- 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 Object
Should not fail if uuid is null
public 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 Object
Should 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 equal
Copyright © 2024 OpenMRS Inc.. All rights reserved.