Package org.javarosa.core.model
Class DataBinding
java.lang.Object
org.javarosa.core.model.DataBinding
- All Implemented Interfaces:
Externalizable
public class DataBinding extends Object implements Externalizable
A data binding is an object that represents how a
data element is to be used in a form entry interaction.
It contains a reference to where the data should be retreived
and stored, as well as the preload parameters, and the
conditional logic for the question.
The class relies on any Data References that are used
in a form to be registered with the FormDefRMSUtility's
prototype factory in order to properly deserialize.
- Author:
- Drew Roos
-
Field Summary
Fields Modifier and Type Field Description RecalculatecalculateIConditionExprconstraintStringconstraintMessagebooleanreadonlyAbsoluteConditionreadonlyConditionConditionrelevancyConditionbooleanrelevantAbsolutebooleanrequiredAbsoluteConditionrequiredCondition -
Constructor Summary
Constructors Constructor Description DataBinding() -
Method Summary
Modifier and Type Method Description List<TreeElement>getAdditionalAttributes()intgetDataType()StringgetId()StringgetPreload()StringgetPreloadParams()IDataReferencegetReference()voidreadExternal(DataInputStream in, PrototypeFactory pf)voidsetAdditionalAttribute(String namespace, String name, String value)voidsetDataType(int dataType)voidsetId(String id)voidsetPreload(String preload)voidsetPreloadParams(String preloadParams)voidsetReference(IDataReference ref)voidwriteExternal(DataOutputStream out)
-
Field Details
-
relevancyCondition
-
relevantAbsolute
public boolean relevantAbsolute -
requiredCondition
-
requiredAbsolute
public boolean requiredAbsolute -
readonlyCondition
-
readonlyAbsolute
public boolean readonlyAbsolute -
constraint
-
calculate
-
constraintMessage
-
-
Constructor Details
-
DataBinding
public DataBinding()
-
-
Method Details
-
getReference
- Returns:
- The data reference
-
setReference
- Parameters:
ref- the reference to set
-
getId
- Returns:
- the id
-
setId
- Parameters:
id- the id to set
-
getDataType
public int getDataType()- Returns:
- the dataType
-
setDataType
public void setDataType(int dataType)- Parameters:
dataType- the dataType to set
-
getPreload
- Returns:
- the preload
-
setPreload
- Parameters:
preload- the preload to set
-
getPreloadParams
- Returns:
- the preloadParams
-
setPreloadParams
- Parameters:
preloadParams- the preloadParams to set
-
setAdditionalAttribute
-
getAdditionalAttributes
-
readExternal
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionDeserializationException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-