public class FormField extends BaseChangeableOpenmrsMetadata implements Serializable, Comparable<FormField>
fields
on a form
A form can
have many 0 to n fields associated with it in a hierarchical manor. This FormField object governs
what/how that takes placeForm
,
Field
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
FormField.DefaultComparator
Provides a default comparator.
|
Modifier and Type | Field and Description |
---|---|
protected Field |
field |
protected Integer |
fieldNumber |
protected String |
fieldPart |
protected Form |
form |
protected Integer |
formFieldId |
protected Integer |
maxOccurs |
protected Integer |
minOccurs |
protected Integer |
pageNumber |
protected FormField |
parent |
protected Boolean |
required |
static long |
serialVersionUID |
protected Float |
sortWeight |
Constructor and Description |
---|
FormField()
default constructor
|
FormField(Integer formFieldId)
constructor with id
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(FormField other) |
Field |
getField() |
Integer |
getFieldNumber() |
String |
getFieldPart() |
Form |
getForm() |
Integer |
getFormFieldId() |
Integer |
getId() |
Integer |
getMaxOccurs() |
Integer |
getMinOccurs() |
Integer |
getPageNumber() |
FormField |
getParent() |
Boolean |
getRequired() |
Float |
getSortWeight() |
Boolean |
isRequired()
Deprecated.
as of 2.0, use
getRequired() |
void |
setField(Field field) |
void |
setFieldNumber(Integer fieldNumber) |
void |
setFieldPart(String fieldPart) |
void |
setForm(Form form) |
void |
setFormFieldId(Integer formFieldId) |
void |
setId(Integer id) |
void |
setMaxOccurs(Integer maxOccurs) |
void |
setMinOccurs(Integer minOccurs) |
void |
setPageNumber(Integer pageNumber) |
void |
setParent(FormField parent) |
void |
setRequired(Boolean required) |
void |
setSortWeight(Float sortWeight) |
String |
toString()
Returns a string equal to the value of: ClassName{hashCode=...,
uuid=...}
|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateRetired, getDescription, getName, getRetired, getRetiredBy, getRetireReason, isRetired, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateRetired, setDescription, setName, setRetired, setRetiredBy, setRetireReason
equals, getUuid, hashCode, setUuid
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
protected Integer formFieldId
protected FormField parent
protected Form form
protected Field field
protected Integer fieldNumber
protected String fieldPart
protected Integer pageNumber
protected Integer minOccurs
protected Integer maxOccurs
protected Boolean required
protected Float sortWeight
public FormField()
public FormField(Integer formFieldId)
public Integer getFormFieldId()
public void setFormFieldId(Integer formFieldId)
formFieldId
- The formFieldId to set.public FormField getParent()
public void setParent(FormField parent)
parent
- The formField to set as parent.public Form getForm()
public void setForm(Form form)
form
- The form to set.public Field getField()
public void setField(Field field)
field
- The field to set.public Integer getFieldNumber()
public void setFieldNumber(Integer fieldNumber)
fieldNumber
- The fieldNumber to set.public String getFieldPart()
public void setFieldPart(String fieldPart)
fieldPart
- The fieldPart to set.public Integer getPageNumber()
public void setPageNumber(Integer pageNumber)
pageNumber
- The pageNumber to set.public Integer getMinOccurs()
public void setMinOccurs(Integer minOccurs)
minOccurs
- The minOccurs to set.public Integer getMaxOccurs()
public void setMaxOccurs(Integer maxOccurs)
maxOccurs
- The maxOccurs to set.@Deprecated public Boolean isRequired()
getRequired()
public Boolean getRequired()
public void setRequired(Boolean required)
required
- The required status to set.public Float getSortWeight()
public void setSortWeight(Float sortWeight)
sortWeight
- The weight to order the formFields on.public String toString()
BaseOpenmrsObject
ClassName{hashCode=..., uuid=...}
If the uuid
field is null
, it returns:
ClassName{hashCode=...}Should include hashCode if uuid is null Should include uuid if not null
toString
in class BaseOpenmrsObject
Object.toString()
public 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 int compareTo(FormField other)
compareTo
in interface Comparable<FormField>
Copyright © 2024 OpenMRS Inc.. All rights reserved.