AT - OwningType - @MappedSuperclass public abstract class BaseAttribute<AT extends AttributeType,OwningType extends Customizable<?>> extends BaseChangeableOpenmrsData implements Attribute<AT,OwningType>, 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() |
OwningType |
getOwner() |
Object |
getValue()
Convenience method to get the typed version of the serializedValue.
|
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(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, getDateChanged, setChangedBy, setDateChangedgetCreator, getDateCreated, setCreator, setDateCreatedgetId, getUuid, setId, setUuidgetDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setDateVoided, setVoided, setVoidedBy, setVoidReasonpublic 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()
getDescriptor in interface SingleCustomValue<AT extends AttributeType>SingleCustomValue.getDescriptor()public String getValueReference()
getValueReference in interface SingleCustomValue<AT extends AttributeType>SingleCustomValue.getValueReference()public void setValueReferenceInternal(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 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.getReferenceStringForValue(Object)setValue in interface SingleCustomValue<AT extends AttributeType>InvalidCustomValueExceptionSingleCustomValue.setValue(java.lang.Object)public boolean isDirty()
isDirty in interface SingleCustomValue<AT extends AttributeType>public int compareTo(Attribute other)
compareTo in interface Comparable<Attribute>Note: this comparator imposes orderings that are inconsistent with equals.Copyright © 2024 OpenMRS Inc.. All rights reserved.