org.openmrs
Class FormField

java.lang.Object
  extended by org.openmrs.BaseOpenmrsObject
      extended by org.openmrs.BaseOpenmrsMetadata
          extended by org.openmrs.FormField
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FormField>, Auditable, OpenmrsMetadata, OpenmrsObject, Retireable

public class FormField
extends BaseOpenmrsMetadata
implements java.io.Serializable, java.lang.Comparable<FormField>

The FormField object relates/orders the 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 place

See Also:
Form, Field, Serialized Form

Field Summary
protected  Field field
           
protected  java.lang.Integer fieldNumber
           
protected  java.lang.String fieldPart
           
protected  Form form
           
protected  java.lang.Integer formFieldId
           
protected  java.lang.Integer maxOccurs
           
protected  java.lang.Integer minOccurs
           
protected  java.lang.Integer pageNumber
           
protected  FormField parent
           
protected  java.lang.Boolean required
           
static long serialVersionUID
           
protected  java.lang.Float sortWeight
           
 
Constructor Summary
FormField()
          default constructor
FormField(java.lang.Integer formFieldId)
          constructor with id
 
Method Summary
 int compareTo(FormField f)
          Sort order for the form fields in the schema.
 boolean equals(java.lang.Object obj)
          Compares two objects for similarity
 Field getField()
           
 java.lang.Integer getFieldNumber()
           
 java.lang.String getFieldPart()
           
 Form getForm()
           
 java.lang.Integer getFormFieldId()
           
 java.lang.Integer getId()
           
 java.lang.Integer getMaxOccurs()
           
 java.lang.Integer getMinOccurs()
           
 java.lang.Integer getPageNumber()
           
 FormField getParent()
           
 java.lang.Boolean getRequired()
           
 java.lang.Float getSortWeight()
           
 int hashCode()
           
 java.lang.Boolean isRequired()
           
 void setField(Field field)
           
 void setFieldNumber(java.lang.Integer fieldNumber)
           
 void setFieldPart(java.lang.String fieldPart)
           
 void setForm(Form form)
           
 void setFormFieldId(java.lang.Integer formFieldId)
           
 void setId(java.lang.Integer id)
           
 void setMaxOccurs(java.lang.Integer maxOccurs)
           
 void setMinOccurs(java.lang.Integer minOccurs)
           
 void setPageNumber(java.lang.Integer pageNumber)
           
 void setParent(FormField parent)
           
 void setRequired(java.lang.Boolean required)
           
 void setSortWeight(java.lang.Float sortWeight)
           
 java.lang.String toString()
           
 
Methods inherited from class org.openmrs.BaseOpenmrsMetadata
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateRetired, getDescription, getName, getRetired, getRetiredBy, getRetireReason, isRetired, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateRetired, setDescription, setName, setRetired, setRetiredBy, setRetireReason
 
Methods inherited from class org.openmrs.BaseOpenmrsObject
getUuid, setUuid
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openmrs.OpenmrsObject
getUuid, setUuid
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

formFieldId

protected java.lang.Integer formFieldId

parent

protected FormField parent

form

protected Form form

field

protected Field field

fieldNumber

protected java.lang.Integer fieldNumber

fieldPart

protected java.lang.String fieldPart

pageNumber

protected java.lang.Integer pageNumber

minOccurs

protected java.lang.Integer minOccurs

maxOccurs

protected java.lang.Integer maxOccurs

required

protected java.lang.Boolean required

sortWeight

protected java.lang.Float sortWeight
Constructor Detail

FormField

public FormField()
default constructor


FormField

public FormField(java.lang.Integer formFieldId)
constructor with id

Method Detail

equals

public boolean equals(java.lang.Object obj)
Compares two objects for similarity

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
boolean true/false whether or not they are the same objects
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

compareTo

public int compareTo(FormField f)
Sort order for the form fields in the schema. Attempts: 1) sortWeight 2) fieldNumber 3) fieldPart 4) fieldName

Specified by:
compareTo in interface java.lang.Comparable<FormField>
Parameters:
f - FormField to compare this object to
Returns:
-1, 0, or +1 depending on the difference between the FormFields

getFormFieldId

public java.lang.Integer getFormFieldId()
Returns:
Returns the formFieldId.

setFormFieldId

public void setFormFieldId(java.lang.Integer formFieldId)
Parameters:
formFieldId - The formFieldId to set.

getParent

public FormField getParent()
Returns:
Returns the parent FormField.

setParent

public void setParent(FormField parent)
Parameters:
parent - The formField to set as parent.

getForm

public Form getForm()
Returns:
Returns the form.

setForm

public void setForm(Form form)
Parameters:
form - The form to set.

getField

public Field getField()
Returns:
Returns the field.

setField

public void setField(Field field)
Parameters:
field - The field to set.

getFieldNumber

public java.lang.Integer getFieldNumber()
Returns:
Returns the fieldNumber.

setFieldNumber

public void setFieldNumber(java.lang.Integer fieldNumber)
Parameters:
fieldNumber - The fieldNumber to set.

getFieldPart

public java.lang.String getFieldPart()
Returns:
Returns the fieldPart.

setFieldPart

public void setFieldPart(java.lang.String fieldPart)
Parameters:
fieldPart - The fieldPart to set.

getPageNumber

public java.lang.Integer getPageNumber()
Returns:
Returns the pageNumber.

setPageNumber

public void setPageNumber(java.lang.Integer pageNumber)
Parameters:
pageNumber - The pageNumber to set.

getMinOccurs

public java.lang.Integer getMinOccurs()
Returns:
Returns the minOccurs.

setMinOccurs

public void setMinOccurs(java.lang.Integer minOccurs)
Parameters:
minOccurs - The minOccurs to set.

getMaxOccurs

public java.lang.Integer getMaxOccurs()
Returns:
Returns the maxOccurs.

setMaxOccurs

public void setMaxOccurs(java.lang.Integer maxOccurs)
Parameters:
maxOccurs - The maxOccurs to set.

isRequired

public java.lang.Boolean isRequired()
Returns:
Returns the required status.

getRequired

public java.lang.Boolean getRequired()
Returns:
same as isRequired()

setRequired

public void setRequired(java.lang.Boolean required)
Parameters:
required - The required status to set.

getSortWeight

public java.lang.Float getSortWeight()
Returns:
Returns the sortWeight.

setSortWeight

public void setSortWeight(java.lang.Float sortWeight)
Parameters:
sortWeight - The weight to order the formFields on.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getId

public java.lang.Integer getId()
Specified by:
getId in interface OpenmrsObject
Returns:
id - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.getId()

setId

public void setId(java.lang.Integer id)
Specified by:
setId in interface OpenmrsObject
Parameters:
id - - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.setId(java.lang.Integer)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change