public class FormResource extends BaseOpenmrsObject implements CustomValueDescriptor, SingleCustomValue<FormResource>
Constructor and Description |
---|
FormResource() |
FormResource(FormResource old)
Create a copy of a provided FormResource, ignoring the uuid and id of the original
|
Modifier and Type | Method and Description |
---|---|
User |
getChangedBy() |
String |
getDatatypeClassname()
Return the name of a class that implements
CustomDatatype . |
String |
getDatatypeConfig()
May be null.
|
Date |
getDateChanged() |
FormResource |
getDescriptor() |
boolean |
getDirty() |
Form |
getForm()
gets the form
|
Integer |
getFormResourceId()
gets the form resource id
|
String |
getHandlerConfig()
May be null.
|
Integer |
getId() |
String |
getName()
gets the name of the resource
|
String |
getPreferredHandlerClassname()
May be null.
|
Object |
getValue()
Convenience method to get the typed version of the serializedValue.
|
String |
getValueReference() |
boolean |
isDirty()
Deprecated.
as of 2.0, use
getDirty() |
void |
setChangedBy(User changedBy) |
void |
setDatatypeClassname(String datatypeClassname) |
void |
setDatatypeConfig(String datatypeConfig) |
void |
setDateChanged(Date dateChanged) |
void |
setForm(Form form)
sets the form
|
void |
setFormResourceId(Integer formResourceId)
sets the form resource id
|
void |
setHandlerConfig(String handlerConfig) |
void |
setId(Integer id) |
void |
setName(String name)
sets the name of the resource
|
void |
setPreferredHandlerClassname(String preferredHandlerClassname) |
<T> void |
setValue(T typedValue)
Sets the typed value.
|
void |
setValueReferenceInternal(String valueToPersist)
Directly set the String value that OpenMRS should persist in the database
in a varchar column.
|
public FormResource()
public FormResource(FormResource old)
old
- the original FormResource to be copiedpublic Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
public Form getForm()
public void setForm(Form form)
form
- the formpublic Integer getFormResourceId()
public void setFormResourceId(Integer formResourceId)
formResourceId
- the form resource's idpublic String getName()
public void setName(String name)
name
- the name of the resourcepublic String getDatatypeClassname()
CustomValueDescriptor
CustomDatatype
.getDatatypeClassname
in interface CustomValueDescriptor
CustomValueDescriptor.getDatatypeClassname()
public void setDatatypeClassname(String datatypeClassname)
datatypeClassname
- the datatypeClassname to setpublic String getDatatypeConfig()
CustomValueDescriptor
getDatatypeConfig
in interface CustomValueDescriptor
CustomValueDescriptor.getDatatypeConfig()
public void setDatatypeConfig(String datatypeConfig)
datatypeConfig
- the datatypeConfig to setpublic String getPreferredHandlerClassname()
CustomValueDescriptor
getPreferredHandlerClassname
in interface CustomValueDescriptor
CustomDatatypeHandler
chosen by the
system administrator for this attribute type.CustomValueDescriptor.getPreferredHandlerClassname()
public void setPreferredHandlerClassname(String preferredHandlerClassname)
preferredHandlerClassname
- the preferredHandlerClassname to setpublic String getHandlerConfig()
CustomValueDescriptor
getHandlerConfig
in interface CustomValueDescriptor
CustomValueDescriptor.getHandlerConfig()
public void setHandlerConfig(String handlerConfig)
handlerConfig
- the handlerConfig to setpublic FormResource getDescriptor()
getDescriptor
in interface SingleCustomValue<FormResource>
SingleCustomValue.getDescriptor()
public String getValueReference()
getValueReference
in interface SingleCustomValue<FormResource>
SingleCustomValue.getValueReference()
public Object getValue()
SingleCustomValue
CustomDatatype.fromReferenceString(String)
.)getValue
in interface SingleCustomValue<FormResource>
SingleCustomValue.getValue()
public <T> void setValue(T typedValue)
SingleCustomValue
CustomDatatype.getReferenceStringForValue(Object)
setValue
in interface SingleCustomValue<FormResource>
SingleCustomValue.setValue(java.lang.Object)
public void setValueReferenceInternal(String valueToPersist)
SingleCustomValue
InvalidCustomValueException
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<FormResource>
SingleCustomValue.setValueReferenceInternal(java.lang.String)
@Deprecated public boolean isDirty()
getDirty()
isDirty
in interface SingleCustomValue<FormResource>
CustomDatatype.save(Object, String)
needs to be calledSingleCustomValue.isDirty()
public boolean getDirty()
public User getChangedBy()
public void setChangedBy(User changedBy)
changedBy
- The user that changed this objectpublic Date getDateChanged()
public void setDateChanged(Date dateChanged)
dateChanged
- The date this object was changedCopyright © 2024 OpenMRS Inc.. All rights reserved.