org.openmrs
Class Field

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

public class Field
extends BaseOpenmrsMetadata
implements java.io.Serializable

Field

Version:
1.0
See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
Field()
          default constructor
Field(java.lang.Integer fieldId)
          constructor with id
 
Method Summary
 void addAnswer(FieldAnswer fieldAnswer)
          Adds a field answer to the list of field answers
 boolean equals(java.lang.Object obj)
          Compares two Field objects for similarity
 java.util.Set<FieldAnswer> getAnswers()
           
 java.lang.String getAttributeName()
           
 Concept getConcept()
           
 java.lang.String getDefaultValue()
           
 java.lang.Integer getFieldId()
           
 FieldType getFieldType()
           
 java.util.Set<Form> getForms()
          Deprecated. This method always returns null. Forms that a Field is on are managed through the FormField object
 java.lang.Integer getId()
           
 java.lang.Boolean getSelectMultiple()
           
 java.lang.String getTableName()
           
 int hashCode()
           
 java.lang.Boolean isSelectMultiple()
           
 void removeAnswer(FieldAnswer fieldAnswer)
          Removes a field answer from the list of field answers
 void setAnswers(java.util.Set<FieldAnswer> fieldAnswers)
           
 void setAttributeName(java.lang.String attributeName)
           
 void setConcept(Concept concept)
           
 void setDefaultValue(java.lang.String defaultValue)
           
 void setFieldId(java.lang.Integer fieldId)
           
 void setFieldType(FieldType fieldType)
           
 void setForms(java.util.Set<Form> forms)
          Deprecated. This method does nothing. Forms that a Field is on are managed through the FormField object
 void setId(java.lang.Integer id)
           
 void setSelectMultiple(java.lang.Boolean selectMultiple)
           
 void setTableName(java.lang.String tableName)
           
 
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, toString, 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
Constructor Detail

Field

public Field()
default constructor


Field

public Field(java.lang.Integer fieldId)
constructor with id

Method Detail

equals

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

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

hashCode

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

getFieldId

public java.lang.Integer getFieldId()
Returns:
Returns the fieldId.

setFieldId

public void setFieldId(java.lang.Integer fieldId)
Parameters:
fieldId - The fieldId to set.

getFieldType

public FieldType getFieldType()
Returns:
Returns the fieldType.

setFieldType

public void setFieldType(FieldType fieldType)
Parameters:
fieldType - The fieldType to set.

getConcept

public Concept getConcept()
Returns:
Returns the concept.

setConcept

public void setConcept(Concept concept)
Parameters:
concept - The concept to set.

getTableName

public java.lang.String getTableName()
Returns:
Returns the tableName.

setTableName

public void setTableName(java.lang.String tableName)
Parameters:
tableName - The tableName to set.

getAttributeName

public java.lang.String getAttributeName()
Returns:
Returns the attributeName.

setAttributeName

public void setAttributeName(java.lang.String attributeName)
Parameters:
attributeName - The attributeName to set.

getDefaultValue

public java.lang.String getDefaultValue()
Returns:
Returns the default value.

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Parameters:
defaultValue - The defaultValue to set.

isSelectMultiple

public java.lang.Boolean isSelectMultiple()

getSelectMultiple

public java.lang.Boolean getSelectMultiple()
Returns:
Returns the selectMultiple.

setSelectMultiple

public void setSelectMultiple(java.lang.Boolean selectMultiple)
Parameters:
selectMultiple - The selectMultiple to set.

getAnswers

public java.util.Set<FieldAnswer> getAnswers()
Returns:
Returns the fieldAnswers.

setAnswers

public void setAnswers(java.util.Set<FieldAnswer> fieldAnswers)
Parameters:
fieldAnswers - The fieldAnswers to set.

addAnswer

public void addAnswer(FieldAnswer fieldAnswer)
Adds a field answer to the list of field answers

Parameters:
fieldAnswer - FieldAnswer to be added

removeAnswer

public void removeAnswer(FieldAnswer fieldAnswer)
Removes a field answer from the list of field answers

Parameters:
fieldAnswer - FieldAnswer to be removed

getForms

@Deprecated
public java.util.Set<Form> getForms()
Deprecated. This method always returns null. Forms that a Field is on are managed through the FormField object


setForms

@Deprecated
public void setForms(java.util.Set<Form> forms)
Deprecated. This method does nothing. Forms that a Field is on are managed through the FormField object


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