AT - OwningType - public abstract class BaseAttribute<AT extends AttributeType,OwningType extends Customizable<?>> extends BaseOpenmrsData implements Attribute<AT,OwningType>, java.lang.Comparable<Attribute>
Attribute. Actual implementations should be able to extend this
class, and have very little of their own code.creator| Constructor and Description |
|---|
BaseAttribute() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Attribute other) |
AT |
getAttributeType() |
AT |
getDescriptor()
The metadata describing this custom value
|
OwningType |
getOwner() |
java.lang.Object |
getValue()
Convenience method to get the typed version of the serializedValue.
|
java.lang.String |
getValueReference() |
boolean |
isDirty() |
void |
setAttributeType(AT attributeType) |
void |
setOwner(OwningType owner)
Sets the owner of this attribute
|
<T> void |
setValue(T typedValue)
Sets the typed value.
|
void |
setValueReferenceInternal(java.lang.String valueReference)
Directly set the String value that OpenMRS should persist in the database
in a varchar column.
|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReasonequals, getUuid, hashCode, setUuid, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetChangedBy, getCreator, getDateChanged, getDateCreated, setChangedBy, setCreator, setDateChanged, setDateCreatedgetDateVoided, getVoidedBy, getVoidReason, isVoided, setDateVoided, setVoided, setVoidedBy, setVoidReasongetId, getUuid, setId, setUuidpublic OwningType getOwner()
getOwner in interface Attribute<AT extends AttributeType,OwningType extends Customizable<?>>Attribute.getOwner()public void setOwner(OwningType owner)
AttributesetOwner in interface Attribute<AT extends AttributeType,OwningType extends Customizable<?>>Attribute.setOwner(org.openmrs.customdatatype.Customizable)public void setAttributeType(AT attributeType)
attributeType - the attributeType to setpublic AT getAttributeType()
getAttributeType in interface Attribute<AT extends AttributeType,OwningType extends Customizable<?>>Attribute.getAttributeType()public AT getDescriptor()
SingleCustomValuegetDescriptor in interface SingleCustomValue<AT extends AttributeType>SingleCustomValue.getDescriptor()public java.lang.String getValueReference()
getValueReference in interface SingleCustomValue<AT extends AttributeType>SingleCustomValue.getValueReference()public void setValueReferenceInternal(java.lang.String valueReference)
throws InvalidCustomValueException
SingleCustomValueInvalidCustomValueException if it's invalid, rather than setting it blindly.
If you are coding against the OpenMRS API, you should use SingleCustomValue.setValue(Object)
instead.setValueReferenceInternal in interface SingleCustomValue<AT extends AttributeType>InvalidCustomValueExceptionSingleCustomValue.setValueReferenceInternal(java.lang.String)public java.lang.Object getValue()
throws InvalidCustomValueException
SingleCustomValueCustomDatatype.fromReferenceString(String).)getValue in interface SingleCustomValue<AT extends AttributeType>InvalidCustomValueExceptionSingleCustomValue.getValue()public <T> void setValue(T typedValue)
throws InvalidCustomValueException
SingleCustomValueCustomDatatype#toReferenceString(Object)setValue in interface SingleCustomValue<AT extends AttributeType>InvalidCustomValueExceptionSingleCustomValue.setValue(java.lang.Object)public boolean isDirty()
isDirty in interface SingleCustomValue<AT extends AttributeType>Copyright © 2018 OpenMRS Inc.. All Rights Reserved.