Package org.javarosa.core.model.data
Class AnswerDataFactory
java.lang.Object
org.javarosa.core.model.data.AnswerDataFactory
public class AnswerDataFactory extends Object
This is not a factory, actually, since there's no drop-in component model, but
it could be in the future. Just wanted a centralized place to dispatch common
templating methods.
In the future this could be a legitimate factory which is stored in... say...
the evaluation context
- Author:
- ctsims
-
Constructor Summary
Constructors Constructor Description AnswerDataFactory() -
Method Summary
Modifier and Type Method Description static IAnswerDatatemplate(int controlType, int datatype)The one-template to rule them all.static IAnswerDatatemplateByDataType(int datatype)
-
Constructor Details
-
AnswerDataFactory
public AnswerDataFactory()
-
-
Method Details
-
template
The one-template to rule them all. Takes in a control type and a data type and returns the appropriate answer data template with which to cast incoming values. All enormous spaghetti ifs should be replaced with a call to this -
templateByDataType
-